Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.10
    • Fix Version/s: 1.8.11
    • Component/s: AcroForm
    • Labels:
      None

      Description

      We have some simple code extracting FDF from a PDF like

      PDDocument pdf = PDDocument.load(inputStream);
      PDAcroForm form = pdf.getDocumentCatalog().getAcroForm();
      FDFDocument fdf = form.exportFDF();
      

      Everything was fine with previous versions of pdfbox (1.8.8 in particular) but version 1.8.10 throws an exception :

      java.lang.ClassCastException: org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget cannot be cast to org.apache.pdfbox.pdmodel.interactive.form.PDField
      	at org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.addFieldAndChildren(PDAcroForm.java:168)
      	at org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.exportFDF(PDAcroForm.java:145)
      

      I join the sample PDF that was used for this test

        Attachments

        1. formulaire_rempli.pdf
          1.84 MB
          Laurent Richard

          Activity

            People

            • Assignee:
              msahyoun Maruan Sahyoun
              Reporter:
              lrichard Laurent Richard
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: