You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Steve Deal <de...@gmail.com> on 2012/05/03 17:54:18 UTC

Unable to read PDF Form field values saved by Acrobat Reader

I posted this as a PDFBox Issue
https://issues.apache.org/jira/browse/PDFBOX-1294
but have subsequently realized that the User mailing list is probably a
better place to raise/ask the question.

I created an Acrobat PDF Form with a couple of default values.
When I run the PrintFields.java example code on a PDF file containing an
Interactive Form (AcroForm) it prints the field values that were initially
defined (e.g. default) when the form was created.

When the form is modified by a User with Acrobat Reader 9 PrintFields.java
fails to print the new values entered by the User. PrintFields.java only
prints the initial values of the fields.  Furhter investigation with other
tools shows that some show the values of original field objects and other
tools show the modified field objects.

A sample file has been attached to Issue PDFBOX-1294 that can be used to
demonstrate this behavior. Just modify it using Acrobat Reader.

Is this a bug in PDFBox or is there a different way to access the form
fields that are modified/created by Acrobat Reader 9?

Steve Deal

Re: Unable to read PDF Form field values saved by Acrobat Reader

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi Steve,

give it a try with 

doc = PDDocument.loadNonSeq( PDF_FILE, raBuf ); 

using the latest trunk. See PDFBOX-1199 for Details.

Kind regards

Maruan Sahyoun

Am 03.05.2012 um 17:54 schrieb Steve Deal:

> I posted this as a PDFBox Issue
> https://issues.apache.org/jira/browse/PDFBOX-1294
> but have subsequently realized that the User mailing list is probably a
> better place to raise/ask the question.
> 
> I created an Acrobat PDF Form with a couple of default values.
> When I run the PrintFields.java example code on a PDF file containing an
> Interactive Form (AcroForm) it prints the field values that were initially
> defined (e.g. default) when the form was created.
> 
> When the form is modified by a User with Acrobat Reader 9 PrintFields.java
> fails to print the new values entered by the User. PrintFields.java only
> prints the initial values of the fields.  Furhter investigation with other
> tools shows that some show the values of original field objects and other
> tools show the modified field objects.
> 
> A sample file has been attached to Issue PDFBOX-1294 that can be used to
> demonstrate this behavior. Just modify it using Acrobat Reader.
> 
> Is this a bug in PDFBox or is there a different way to access the form
> fields that are modified/created by Acrobat Reader 9?
> 
> Steve Deal