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

PDDocument.load() Error: Expected a long type at offset 2, instead got 'DF-1.4'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Parsing
    • None
    • Mac OS X 10.10.5

    Description

      Simple PDDocument.load failed to heal attached PDF (pdfbox 2.0.0 RC2):

      Exception in thread "main" java.io.IOException: Error: Expected a long type at offset 2, instead got 'DF-1.4'
      at org.apache.pdfbox.pdfparser.BaseParser.readLong(BaseParser.java:1340)
      at org.apache.pdfbox.pdfparser.BaseParser.readObjectNumber(BaseParser.java:1268)
      at org.apache.pdfbox.pdfparser.COSParser.parseXrefObjStream(COSParser.java:321)
      at org.apache.pdfbox.pdfparser.COSParser.parseXref(COSParser.java:287)
      at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:189)
      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:246)
      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:855)
      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:811)
      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:765)

      Reproduced using 2.0.0 RC2 from maven and with code from trunk svn.

      File in question:

      http://coobers.com/bucket/ikona_free.pdf

      Attachments

        Activity

          People

            lehmi Andreas Lehmkühler
            coobers Jedrzej Majko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: