3

Look at the following MWE.

A checked checkbox should appear, but it isn't.

\documentclass{article}
\usepackage{hyperref}

\begin{document}
\begin{Form}[action={http://your-web-server.com/path/receiveform.cgi}]
\begin{tabular}{l}
    \TextField{Name} \\\\
    \CheckBox[checked=true,width=1em]{Check} \\\\
    \CheckBox[checked,width=1em]{Check} \\\\
    \CheckBox[width=1em]{Check} \\\\
    \Submit{Submit}\\
\end{tabular}
\end{Form}
\end{document}

Compiling with MiKTeX command-line twice:

pdflatex formularta.tex
pdflatex formularta.tex

Where is my fault? Did I forget anything?

EDIT1: I have reported this information to acrobat now (14.08.2014 14:01)

5
  • I tried your code and all three boxes are checked...
    – user31729
    Jul 3 '14 at 8:44
  • I should add: I use the latest TeXLive 2014 on Linux
    – user31729
    Jul 3 '14 at 9:19
  • For starters, you might want to use a unique label for each box. Alternatively, use the name option. It defaults to label, which is now the same in every box.
    – mvkorpel
    Jul 3 '14 at 9:24
  • @Christian Hupfer, ok, thanks for the interessing information. Don't know why it does not work @ miktex. Jul 3 '14 at 14:15
  • It doesn't work in TeXLive/Windows either. Jul 3 '14 at 14:18
1

This is not meant as answer itself, but rather to show that it works

\documentclass{article}
\usepackage{hyperref}

\begin{document}
\begin{Form}[action={http://your-web-server.com/path/receiveform.cgi}]
\begin{tabular}{l}
    \TextField{Name} \\\\
    \CheckBox[name=first,checked=true,width=1em]{Check} \\\\
    \CheckBox[name=second,checked,width=1em]{Check} \\\\
    \CheckBox[name=third,width=1em]{Check} \\\\
    \Submit{Submit}\\
\end{tabular}
\end{Form}
\end{document}

The checkboxes are checked initially, I used TeXLive 2014 on Linux

enter image description here

5
  • I triede it again, all boxes remain unchecked compiling with miktex and pdflatex twice. Jul 4 '14 at 8:30
  • @Goldnas: I used a Windows 7 notebook, installed TeXLive and TeXMaker on it and exactly the code from above, the PDF Previewer showed the checked boxes, however, the same file with Acrobat Reader 11 does not show them checked. I can confirm partially the issue you describe :-(
    – user31729
    Jul 4 '14 at 16:47
  • @Goldnas: I checked now, whether the file generated on Linux works in Adobe Reader on Windows--> no, the file generated on Windows however works on Linux, so it is most probably a issues with Adobe Reader on Windows OS rather than a TeX problem.
    – user31729
    Jul 4 '14 at 16:59
  • 1
    It seems to be a problem on acrobat installed on windows systems. I can confirm this bug, because the PDF-XChange Viewer displays everything correct. Jul 9 '14 at 6:01
  • @Goldnas: I do not have PDF-XChange Viewer installed, but I believe you ;-)
    – user31729
    Jul 9 '14 at 16:49
0

Using MiKTeX/TeXlipse on Windows 8.1 and @Christian Hupfer's code I've also seen no checked checkboxes on Chrome's PDF viewer. But with Adobe's Reader XI I get two checked checkboxes.

Christian Hupfer's test with chrome vs reader XI

It seems to me that the first 2 checkboxes should be checked as Adobe Reader 11 shows, or am I missing something? The 3rd checkbox has no checked attribute and can only be checked if the document default is set as checked. Is that right?

I don't know if we have the same problem, but it seems to me that Chrome may be missing its font for the checkmark. If I click on one of the check boxes in Chrome I get a red border, maybe indicating it now isn't selected. If this is the case then Chrome recognises 3 checked boxes, so I'm a little confused. Setting the 3rd checkbox to false has no effect on either Chrome or Reader.

Since Reader 11 works for me and not for @Christian Hupfer I'm wondering if this may be a font issue. Maybe some systems have the font and others don't. From the pdflatex terminal I see the font for C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/urw/zapfding/uzdr.pfb is installed. The checkmark code in zapf dingbats is the same as the number 4 in other fonts. I recall reading that someone else was complaining in an Adobe forum that instead of a nice checkmark, they got the number 4 in its place, which makes sense if a wrong font were substituted.

So does Chrome PDF viewer not recognise the zapf dingbat font and default to nothing? And if @Christian Hupfer's Reader 11 doesn't recogise the zapf dingbat font and mine does, what is going on? My Windows Fonts folder doesn't have these fonts and neither does my Adobe folder. Under Document Properties/Fonts in Adobe Reader (displaying this test code) it shows ZapfDingBats as included but not embedded, and the actual font used in it's place is AdobePiStd. Downloading and installing zapfdingbats into the Windows Fonts folder did nothing (not attempting a reboot of software or system).

Maybe we're looking at a PDF/A issue here since the zapf dingbat fonts aren't embedded.

EDIT --------------

After checking out @Werner's answer to changing the default symbol in radio buttons I tried a small experiment by combining @Werner's code with @Christian Hupfer's. Under Reader 11 both sections performed as expected, but under Chrome PDF viewer radio button symbols were displayed and checkbox symbols weren't. Further to that, Chrome could not accept more than one symbol definition on a page and had a smaller number of supported symbols. Evidently Chrome is finding the font but errs in it's use, therefore it's not an issue of not finding a font to use for zapf dingbats.

In my case I'll file a bug with Google or Chromium and give up on its use for now. With @Christian Hupfer's findings on Reader 11 there's still a problem to solve here.

1
  • 1
    No, I don't think that this is so. I have Windows 7 and Acrobt XI running here and opening the file makes all checkboxes unchecked. Maybe the combination of Arcobat XI and Windows 7 is an hint for acrobat, because as you told us, Acrobt XI and Windows 8.1 does not show the effect. I don't know what to do, but I will once more report the bug to acrobat unless any other suggestions in the community have any ideas.... Aug 14 '14 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.