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

NPE in PDNonTerminalField.getChildren()

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • AcroForm
    • 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

          No work has yet been logged on this issue.

          People

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

            Dates

              Created:
              Updated:
              Resolved: