Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.0.9, 3.0.0 PDFBox
    • Component/s: AcroForm
    • Labels:
      None

      Description

      Note: unfortunately I can not attach original file for confidentiality reasons

      I have a pdf containing some fields :

       

      /AcroForm 2 0 R

      ...

      2 0 obj
      <<
      /DR 5 0 R
      /Fields [ ...  15 0 R 16 0 R 17 0 R ...]
      >>

      and then for field object 17 :

      17 0 obj
      <<
      /DA (/Helv 8 Tf 0 g)
      /FT /Tx
      /Ff 1
      /Kids [17 0 R 88 0 R 89 0 R]
      /MaxLen 0
      /T (Nom)
      >>

      Here we see that this field is contained in its children list : this triggers a recursivity loop during parsing (or at least during method call getAcroForm() )

          at java.lang.StringBuilder.toString(StringBuilder.java:407)
          at org.apache.pdfbox.cos.PDFDocEncoding.toString(PDFDocEncoding.java:135)
          at org.apache.pdfbox.cos.COSString.getString(COSString.java:203)
          at org.apache.pdfbox.cos.COSDictionary.getString(COSDictionary.java:670)
          at org.apache.pdfbox.pdmodel.interactive.form.PDFieldFactory.createField(PDFieldFactory.java:64)
          at org.apache.pdfbox.pdmodel.interactive.form.PDField.fromDictionary(PDField.java:80)
          at org.apache.pdfbox.pdmodel.interactive.form.PDNonTerminalField.getChildren(PDNonTerminalField.java:139)
          at org.apache.pdfbox.pdmodel.interactive.form.PDFieldTree$FieldIterator.enqueueKids(PDFieldTree.java:99)
          at org.apache.pdfbox.pdmodel.interactive.form.PDFieldTree$FieldIterator.enqueueKids(PDFieldTree.java:102)

      ...

       

      I use pdfbox 2.0.8

      Similar problem with preflight parser.

      In this case a simple fix would be to ignore children fields that are the same as their parent ; however the references loop may be much more complicated.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              momaison Maison
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: