[Tex/LaTex] Checkboxes in PDF forms don’t show up in OS X

formshyperrefmac

I'm trying to create a PDF form using hyperref. The form looks fine, except for the checkboxes. In both Adobe Reader and Preview.app, the boxes do not appear. My cursor changes if I mouse over where the box is, and if I click on it I can even see the briefest flicker of the box and checkmark. Both promptly disappear.

In Adobe Reader on Windows, the checkboxes are initially invisible, but show up the first time I click on them. In FoxIt Reader they work exactly as expected.

Here is a minimum working example, which I copied from a tutorial:

\documentclass{memoir}
\usepackage[left=25mm,top=25mm,bottom=10mm,right=10mm]{geometry}
\usepackage{graphicx}
\usepackage{color}
\usepackage[
  xetex,a4paper=true,colorlinks=true,
  pdftitle={Key form},pdfsubject={Key},
  pdfauthor={ich},pdfpagemode=UseNone,pdfstartview=FitH,
  pagebackref,pdfhighlight={/N}
]{hyperref}
\begin{document}
\section*{Request for a key}
\begin{Form}
Front door: \CheckBox[name=ht]{}\\
\end{Form}
\end{document}

And here is a link to the output: http://dl.dropbox.com/u/2126832/ex0001.pdf

I am using XeTeX, but I tried compiling with PDFTeX and encountered the same issue. I recently upgraded to OS X 10.7 (Lion) and Texlive 2011.

I've spent a lot of time googling this issue and have found no mention of it elsewhere. Any assistance would be greatly appreciated.

Edit: Just in case it helps in diagnosing the issue, I should note that the checkboxes in the eforms manual work just fine. (I also tried using eforms, without any luck. No surprise, since eforms uses hyperref.)

Best Answer

I prepared two pdf documents with a further simplified input file

\documentclass{article}
%\pdfminorversion=1
\usepackage[unicode=true, verbose]{hyperref}
\begin{document}
\section{Request for a key}
\begin{Form}
Test: \CheckBox{}
\end{Form}
\end{document}

One document I prepared with a 10.6 computer, one with 10.7, both with TL2011 and LuaLaTex. The output files look identical to the eye if opened in a text editor. I used diff -a lion.pdf snow.pdf to show further details and got

218,219c218,219
< /CreationDate (D:20111027072803+02'00')
< /ModDate (D:20111027072803+02'00')
---
> /CreationDate (D:20111027091652+02'00')
> /ModDate (D:20111027091652+02'00')
250c250
< /ID [<1E45A68F3C173651B121446FAD778EB3> <1E45A68F3C173651B121446FAD778EB3>]
---
> /ID [<0CCBB711863F46770F8A748517E79A96> <0CCBB711863F46770F8A748517E79A96>]

So the files are virtually identical.

Please note that even the file prepared on Snow Leopard and TL2011 does not show the form with Adobe Acrobat Pro 9 on Snow Leopard. Preview is fine on the same computer.

I would conclude, that either

  1. TL does not and did not prepare proper pdf files and that bug got somehow visible now
  2. The pdf viewers do not display the pdf files properly, this is more likely, but not limited to Lion.