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

Unable to detect form - pdCatalog.getAcroForm() return null

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.3
    • Fix Version/s: None
    • Component/s: AcroForm
    • Labels:
      None
    • Environment:
      Latest macOS Sierra 10.12.1. Java 1.8.0_73

      Description

      I have a PDF document which has form. I can type either from browser, Adobe reader, they all have an editable form. But when I use getAcroForm(), it return null. The PDF https://drive.google.com/file/d/0B3Uah3i8yt9qTUVldFVWeTFob2c/view?usp=sharing

              PDDocument document = PDDocument.load(input);
              PDDocumentCatalog pdCatalog = document.getDocumentCatalog();
              PDAcroForm formPdf = pdCatalog.getAcroForm(); // here return null
              if (formPdf != null) {
                  formPdf.flatten();
              }
      

        Attachments

        1. w8ben.pdf
          127 kB
          Tilman Hausherr

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              steveneo steve neo
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: