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

IOException "Invalid dictionary, found: 'r' but expected: '/' at offset 1148" on a valid PDF

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.3
    • 2.0.7, 3.0.0 PDFBox
    • Parsing
    • None
    • Windows 7 x64, JVM 1.8.0_101

    Description

      On the attached file, which loads fine with Adobe Reader, the PDDocument.load() methpod throws the following error:

      java.io.IOException: Unknown dir object c='>' cInt=62 peek='>' peekInt=62 at offset 1196
      at org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:982)
      at org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryValue(BaseParser.java:153)
      at org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionaryNameValuePair(BaseParser.java:277)
      at org.apache.pdfbox.pdfparser.BaseParser.parseCOSDictionary(BaseParser.java:210)
      at org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:885)
      at org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:757)
      at org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:726)
      at org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:657)
      at org.apache.pdfbox.pdfparser.COSParser.parseTrailerValuesDynamically(COSParser.java:2092)
      at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:203)
      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:252)
      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:957)
      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:913)
      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:861)
      at Temp.PDFTemp.App.main(App.java:19)

      Attachments

        1. resulprovao.pdf
          11 kB
          Seva Alekseyev
        2. UnknownDirObject.pdf
          8.79 MB
          Jay Askren

        Activity

          People

            lehmi Andreas Lehmkühler
            sevaa Seva Alekseyev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: