"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I am essentially working toward he same end posted by merlyn some time ago in Filling out PDF forms with data from DBI?. The reply posted in Re^2: Filling out PDF forms with data from DBI? is very helpful, but indicates that for checkboxes:
On this particular form I noticed that the check boxes were not form fields. Randal, does your client require a check mark on the document, e.g. for "sole proprietor" or "Corporation?" The only reason I ask is because I don't see an easy means to add a check mark using CAM::PDF. PDF::API2 or PDF::Reuse can do that easily. However, they don't have the easy interface into forms the way CAM::PDF does. It might be a bit of a kludge, but running through CAM::PDF to fill in the forms and then running through PDF::API2 to add any checkmarks (or any kind of glyphs or graphics) would be pretty easy. I would like very much to avoid this method of populating checkboxes because it effectively breaks the PDF form -- that is to say that once something is printed over the top of a checkbox it can no longer be operated as a checkbox. I am not certain if it is because CAM::PDF or the PDF format has changed significantly since then, but getFormFieldList within CAM::PDF actually does return checkbox keys which are (to some degree) accessible through the same CAM::PDF object. I have used CAM::PDF to access the dictionary objects for these checkboxes using the W-9 at http://www.irs.gov/pub/irs-pdf/fw9.pdf as a test case. I have compared the objects for each checkbox from a form that is saved with and without the boxes checked. The checked boxes appear like so (the following example is from the first checkbox in the form, using Data::Dumper): and the checked boxes seem to have a small portion added: I have started with the following code that modifies the object to include the missing section, however I am still not seeing it in the form. I am not sure if there is just something I am missing or if this really is not feasible, but would gladly welcome suggestions. In reply to Filling PDF Form Checkboxes by steve
|
|