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'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.)

share|improve this question
1  
The checkbox appears in your sample document and in my version of this document I compiled it. It appears correctly in both Preview and Adobe Reader. I'm running 10.6.8, so maybe this is a Lion-specific problem. –  Alan Munn Oct 26 '11 at 19:14
1  
The check box works in Adobe Acrobat Pro. I am running 10.6.8 as well. –  Sony Oct 26 '11 at 19:15
2  
Your example pdf shows no checkboxes with AR9 on Linux, but the same document compiled on Linux with TL2011 does, so I assume it's a Mac issue. –  Martin Schröder Oct 26 '11 at 20:09
2  
Your pdf document does not work on my Lion system, neither with Preview nor with Acrobat Pro. If I try to compile the pdf using TeXLive 2011 and LuaLaTeX it doesn't work either. It seems to be Lion specific, but while compiling the document. –  Andy Oct 26 '11 at 20:25
2  
I am having a similar issue after upgrading to OSX Lion. My hyperlink boxes are invisible in the output PDFs now. –  user8881 Oct 27 '11 at 14:46

1 Answer 1

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.
share|improve this answer
    
Curiouser and curiouser. Thank you for the detective work. Can you tell me whether the Snow Leopard–compiled PDF displays properly in Lion’s Preview.app? –  mike Oct 27 '11 at 12:55
    
The Snow Leopard–compiled PDF does not display properly in Lion’s Preview.app. –  Andy Oct 27 '11 at 14:07
    
That is helpful. Given @MartinSchröder's comment above, I thought there was something wrong with the file itself. I guess it could be a display issue that is shared by Adobe Reader for Linux and Windows, but one would hope that Adobe's software would implement its own spec correctly. The strange thing is that Martin said that the same document displayed fine in AR for Linux when he compiled it himself with TL2011 on Linux. Maybe someone else could confirm this? –  mike Oct 27 '11 at 15:31
    
Your file does not work with TL2011, Linux and AR9. But changing \CheckBox{} to \CheckBox[name=foo]{} makes it work. Looks like a bug of hyperref to me. –  Martin Schröder Oct 27 '11 at 16:55
    
Maybe Martin should make that an answer. It actually helps what to do and makes the solution easier to find. –  Andy Oct 27 '11 at 17:00

Your Answer

 
discard

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

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