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

PDFBox throws NullPointerException when parsing PDF

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.0.9
    • Component/s: Parsing
    • Labels:
    • Environment:
      Linux, OpenJDK 8 and Oracle JDK 8

      Description

      I have a file that I can open with GhostScript, but PDFBox dies with a NullPointerException when I try to parse it with PDFBox. The error is as follows:

      org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:747) at org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:718) at org.apache.pdfbox.pdfparser.COSParser.getLength(COSParser.java:961) at org.apache.pdfbox.pdfparser.COSParser.parseCOSStream(COSParser.java:1020) at org.apache.pdfbox.pdfparser.COSParser.bfSearchForObjStreams(COSParser.java:1912) at org.apache.pdfbox.pdfparser.COSParser.bfSearchForObjects(COSParser.java:1538) at org.apache.pdfbox.pdfparser.COSParser.rebuildTrailer(COSParser.java:2091) at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:246) at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:189) at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:240) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1013) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:969) at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:917) at 
      

        Attachments

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              jaskren Jay Askren
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: