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

NPE in PDNonTerminalField.getChildren()

    Details

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

      Description

      java.lang.NullPointerException
      	at org.apache.pdfbox.pdmodel.interactive.form.PDNonTerminalField.getChildren(PDNonTerminalField.java:130)
      	at org.apache.pdfbox.preflight.process.AcroFormValidationProcess.validateField(AcroFormValidationProcess.java:196)
      	at org.apache.pdfbox.preflight.process.AcroFormValidationProcess.exploreFields(AcroFormValidationProcess.java:114)
      	at org.apache.pdfbox.preflight.process.AcroFormValidationProcess.validate(AcroFormValidationProcess.java:64)
      	at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:84)
      	at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:122)
      	at org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:163)
      	at com.mycompany.preflightmasstest.PreflightChecker.run(PreflightChecker.java:52)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      

      The "field" / annotation that makes the problem is at "36 0 o", it is the link annotation.

      From my understanding, this is an incorrect PDF, a link annotation isn't a field. I tried returning just null, that change works with preflight.

        Attachments

        1. 437113.pdf
          60 kB
          Tilman Hausherr

          Activity

            People

            • Assignee:
              jahewson John Hewson
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: