19

I would like to create a fillable PDF form containing radio buttons using hyperref. The text fields turn out fine. The problem is with the radio boxes. Only one fillable radio box is visible when opened in evince and okular. Both boxes show up in skim and Preview on MacOS, but the checks are not saved (as opposed to the text fields).

(I am aware of the eforms package from the acrotex bundle, which makes the task easier, but forms created this way cannot be filled out by evince and okular.)

Here's my MWE:

\documentclass{article}
\usepackage{hyperref}

\def\LayoutTextField#1#2{\makebox[6em][l]{#1: }\raisebox{-.5ex}{#2}}
\def\LayoutChoiceField#1#2{\makebox[6em][l]{#1: }#2}
\newdimen\longline
\longline=\textwidth\advance\longline-6em

\begin{document}
\begin{Form}
\TextField[name=Name,width=\longline,borderwidth=0,bordersep=4pt,backgroundcolor={.85 .85 .85}]{Name}\vskip1ex

\TextField[name=Affiliation,width=\longline,borderwidth=0,backgroundcolor={.85 .85 .85},]{Affiliation}\vskip1ex

\ChoiceMenu[borderwidth=0,radio=true,backgroundcolor={.85 .85 .85}]{Are you a}{Student, Academic}\
\TextField[name=Comment,multiline=true,width=\longline,borderwidth=0,backgroundcolor={.85 .85 .85}]{Comments}\\
\end{Form}
\end{document}

What am I doing wrong with the radio boxes? Or is this an issue with the poppler library?

David Carlisle
  • 757,742
imnothere
  • 14,215
  • @LianTze: Not directly responding to your question – I get an error for bordergap, perhaps this should be bordersep? – doncherry Jun 07 '11 at 16:21
  • @doncherry So it should, thank you! I've corrected the error. – imnothere Jun 07 '11 at 23:58
  • 1
    After some further googling (sorry I didn't have time to do it properly yesterday), this seems to be a poppler bug as described at https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/531516.

    If a moderator feels that this question should then be closed, I will be happy to do so. In the meantime, PDF XChange Viewer (Windows only unfortunately) seems to be the best free tool for filling in these PDF forms.

    – imnothere Jun 09 '11 at 07:22
  • 2
    As for other viewers, Adobe Reader 10.0.1 on Win7 works fine with your example. – doncherry Jun 09 '11 at 09:03
  • 1
    @LianTze Lim: Adobe Reader isn't less free than PDF-XChange Viewer. They both are freeware. And all PDF viewers were, and are, behind Adobe Reader on functionality. – Karl Karlsson Jun 09 '11 at 09:34
  • 2
    @Karl Karlsson: I'm sorry, I meant "freeware", not "free" when I wrote about PDF XChange Viewer. Thanks for reminding me. @doncherry: The reason I didn't mention Adobe Reader, is because if you do not also have a copy of Adobe Acrobat, you will not be able to save the form as a PDF after it's been filled out; you can only export it to a plain text field-and-value file. XChange Viewer, on the other hand, does allow you to save the filled-out form as a PDF (under a different name). – imnothere Jun 09 '11 at 13:17
  • Based on @LianTze's comment, I'm closing this as 'off topic'. It's not actually related directly to TeX, but is a viewer issue. – Joseph Wright Jul 13 '11 at 07:38

0 Answers0