Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1294

Unable to read values from PDF Form fields saved by Acrobat Reader

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.6.0
    • 1.7.0
    • AcroForm
    • Windows 7, eclipse Indigo, Java 1.6.0

    Description

      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.

      Attachments

        1. ReaderModifiedForm.pdf
          88 kB
          Steve Deal

        Activity

          People

            Unassigned Unassigned
            devodl Steve Deal
            Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: