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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.7, 3.0.0 PDFBox
    • Component/s: Parsing
    • Labels:
      None
    • Environment:
      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. UnknownDirObject.pdf
          8.79 MB
          Jay Askren
        2. resulprovao.pdf
          11 kB
          Seva Alekseyev

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: