# Losing check box entries when saving LaTeX-generated PDF form

The code below implements a simple PDF form. Some PDF readers can save the form after it has been filled to a PDF with the new state. This works for the text entry whose entry is saved but the state of any checkbox is lost. Any remedy?

\documentclass{minimal}
\usepackage[pdftex]{hyperref}

\begin{document}
\begin{Form}
\noindent
\TextField[name=textfield,width=3cm]{Text:}
\end{Form}
\end{document}


I noted on Mac OS X in the Preview.app that checking a check box alone does not lead the document to be considered as modified. Only entering text leads to a modified state and subsequently only a modified document can be saved. What is special about check boxes?

Maybe this is a reader issue and I would be interested to hear if the example above indeed works. There is a similar question How to get radio boxes right in PDF forms using hyperref? which was closed as off topic.

Edit: I have added name fields for the check boxes. On OS X with Preview.app this still does not solve the problem for me.

-
They seem to be working with Adobe Pro on Windows 7, although it came up with ...fixing form fields when it loaded the document. You also need to add names for the checkboxes. Any processing must be done with JavaScript. – Yiannis Lazarides Jan 21 '12 at 11:22

PDF forms are very similar to HTML forms. You need to add "name" for the CheckBoxes. this worked, when I tested it with Acrobat Pro.

\documentclass{minimal}
\usepackage[pdftex]{hyperref}
\begin{document}
\begin{Form}
\noindent

Any further processing must be done with JaVaScript. A good bundle of packages is provided by acrotex. The insdljs package provided by acrotex can be very useful for producing forms.
@ChristianLindig That's fine in the meantime you can open the pdf file with a TeX editor and post the code at about /Type /XObject /Subtype /Form /BBox [0 0 36.496 13.693] /FormType 1 it might help others to come with a better answer. – Yiannis Lazarides Jan 21 '12 at 12:28
I'd post the PDF code but it includes binary streams. Is there a way to force PDFLaTeX to generate more readable output? Option -8bit is not enough. – Christian Lindig Jan 21 '12 at 13:13