[ 
https://issues.apache.org/jira/browse/PDFBOX-1294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268399#comment-13268399
 ] 

Steve Deal commented on PDFBOX-1294:
------------------------------------

Yes, simply changing from load() to loadNonSeq() solved my problem. The file is 
not encrypted.
We create the form with Acrobat Pro X and then email it to Users who fill it 
out using Acrobat Reader. 
loadNonSeq() is the only way to read the field values modified using Acrobat 
Reader.
                
> Unable to read values from PDF Form fields saved by Acrobat Reader
> ------------------------------------------------------------------
>
>                 Key: PDFBOX-1294
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1294
>             Project: PDFBox
>          Issue Type: Wish
>          Components: PDModel.AcroForm
>    Affects Versions: 1.6.0
>         Environment: Windows 7, eclipse Indigo, Java 1.6.0
>            Reporter: Steve Deal
>              Labels: Form, PDF
>             Fix For: 1.7.0
>
>         Attachments: ReaderModifiedForm.pdf
>
>
> The Document Properties names and values are readable.
> The PDF Form fields names are readable but the values of the PDF Forms fields 
> are the initial values, not those saved using Acrobat Reader 9.
> Attached file demonstrates problem using this code:
>                  PDDocument pdDoc = PDDocument.load(filename);
>                  
>                  PDDocumentCatalog docCatalog = pdDoc.getDocumentCatalog();
>                  PDAcroForm acroForm = docCatalog.getAcroForm();       
>                  System.out.println("acroForm COSObject: 
> "+acroForm.getCOSObject().toString()); 
>                  List fldList = acroForm.getFields();
>                  Iterator fIter = fldList.iterator();
>                  while(fIter.hasNext()){
>                          PDField field = (PDField)fIter.next();
>                  
> System.out.println("----------------------------------------------");
>                  System.out.print("field FQN: " + 
> field.getFullyQualifiedName());
>                  System.out.print("   type: " + field.getFieldType() );
>                  System.out.println("    value: " + field.getValue() );
>          }
> It should be noted that the above code will print out the default form field 
> values that were saved to the form using Acrobat Pro X. However if the PDF 
> form is subsequently filled out and saved using Acrobat Reader, those values 
> are not accessible using PDFBox.
> Apparently form field values saved by Acrobat Reader are stored differently 
> than the default form field values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to