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

"Page tree root must be a dictionary" on PDDocument.load

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.19
    • Fix Version/s: 2.0.21, 3.0.0 PDFBox
    • Component/s: Parsing
    • Labels:
      None

      Description

      Hi,

      i have a PDF file that throws the following exception:

      java.io.IOException: Page tree root must be a dictionaryjava.io.IOException: Page tree root must be a dictionary at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:198) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:226) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1222) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1122) ~[pdfbox-2.0.19.jar:2.0.19]

      This happens when loading the document from an InputStream.

      The document can be opened properly using Preview on Mac.

       

      I have checked the PDF structure (even though i don't know it very well), from what i can see it could be because the /Pages is not the first element under the /Root.

       

        Attachments

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              gotson Gauthier Roebroeck
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: