pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Nibali <rnib...@gmail.com>
Subject Re: Fwd: Migrate form field entries from one pdf to another
Date Mon, 29 Jun 2015 09:43:22 GMT

                 else if (f instanceof PDCheckbox)
>>>                  {
>>>                      fieldValue = fieldValues.get(fieldName);
>>>  How is this supposed to work? The value one gets via getValue() from the
>> PDField is always null for PDCheckboxes.
> that part is not from PDFBox, this is the map that is set in the main()
> method, in this case "m.put("Check Box1", "true");".

Yep, that part I understood, nevertheless, the original map was filled most
probably using the .getValue() method, since the map definition is only
<string,string>, whereas I defined my map as map<string,PDfield>, to make
sure that at a later stage I can differentiate between the field types when
filling up the template PDF fields.

My question is: is a standard PDCheckbox field type supposed to have a
getValue() != null? If not, how could I set the checkbox otherwise, using
the PDCheckbox specific enhancements in the type class?

Adobe Acrobat seems to handle it just fine, albeit that's an easy thing to
say. Preview under MacOSX also cannot properly handle those PDFs, btw.
Haven't tried any Linux tools yet, but my time is extremely limited.

Best regards

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message