[poppler] [PATCH] For for Checkboxes not Displaying

Michael Vrable mvrable at cs.ucsd.edu
Mon Feb 11 10:59:45 PST 2008


The current code for displaying a check when a checkbox is toggled 
includes the comment:

     According to the PDF spec the off state must be named "Off", and the
     on state can be named anything, but Acrobat apparently looks for
     "Yes" and treats anything else as off.

However, my experience is that this is not true--the form at 
http://www.irs.gov/pub/irs-pdf/f1040.pdf includes some checkboxes with 
differently-named states.  (Specifically, near the end of the second 
page, "Third Party Designee" has a "Yes" and a "No" checkbox, both part 
of the same group so that only one can be selected at a time.  The first 
checkbox has states called /Yes and /Off, but the second has states /No 
and /Off.)

The attached patch changes this behavior, so that it is possible to 
select any of the checkboxes in the document.

(I wonder about the documents the comment referred to; this patch would 
presumably break those.  The behavior of Acrobat is presumably a bit 
more complex.  It might be that more complete processing of the 
appearance dictionary is needed, but that would be a more intrusive 
patch.)

--Michael Vrable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checkbox.patch
Type: text/x-diff
Size: 752 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20080211/6faabadc/attachment.patch 


More information about the poppler mailing list