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)

2 Answers2

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

  • I triede it again, all boxes remain unchecked compiling with miktex and pdflatex twice. – Peter Ebelsberger Jul 04 '14 at 08: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 :-( –  Jul 04 '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. –  Jul 04 '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. – Peter Ebelsberger Jul 09 '14 at 06:01
  • @Goldnas: I do not have PDF-XChange Viewer installed, but I believe you ;-) –  Jul 09 '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.

r3mnant
  • 101
  • 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....

    – Peter Ebelsberger Aug 14 '14 at 11:46