Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to create a form with a preselected choice.

\documentclass{article}
\usepackage{hyperref}

\begin{document}
\begin{Form}    
  \ChoiceMenu[default=y,radio,name=test1]{Question:}{yes=y,no=n}\\
  \ChoiceMenu[default=n,radio,name=test2]{Question:}{yes=y,no=n}
\end{Form}
\end{document}

The pdf is generated with pdflatex

Unfortunately, the default parameter does not work for the second form.

enter image description here

Btw. The PDF is wrong in evince/gimp. Maybe this is related. Here, the result is:

enter image description here

$ pdflatex -version
pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.2.49; using libpng 1.2.49
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.24.3

How can I fix this?

update [2014-01-14]

If I uncompress the resulting PDF with

pdftk test.pdf output test2.pdf uncompress

and replace in test2.pdf the first occurence of

/V /Off
/T (test2)

by

/V /n
/T (test2)

then it works. It seems that the generated PDF is wrong.

share|improve this question
    
I suspect the weird display is some kind of interaction with poppler because I get the same with Okular. I've seen this before and I can't remember whether I found an answer or, if so, what it was... –  cfr Jan 11 at 0:36
    
For some reason, I think poppler-based pdf viewers are trying to print the commas which separate the buttons in the display. No idea why, obviously. I don't think this will help directly, but it does suggest there are at least some bugs in the vicinity: tex.stackexchange.com/questions/58447/…. –  cfr Jan 11 at 0:49
    
This all refers to the wrong display problem with poppler-based viewers. For Abobe Reader everything works except the default selection (second line of first example). Could this be a problem of hyperref? –  Thorsten Jan 12 at 21:43
    
This might be related but is only in German: de.comp.text.tex.narkive.com/t4iwEKxi/… –  Thorsten Jan 13 at 7:34
    
I provided a workaround for this hyperref problem: puszcza.gnu.org.ua/bugs/?202 –  Thorsten Jan 14 at 12:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.