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

IOException at org.apache.pdfbox.pdfparser.BaseParser.readStringNumber

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.2
    • None
    • Text extraction

    Description

      Apache Tika 1.14-SNAPSHOT (PDF Box 2.0.2) throws following exception on text extraction from valid PDF document:

      org.apache.tika.exception.TikaException: TIKA-198: Illegal IOException from org.apache.tika.parser.pdf.PDFParser@6c25e6c4
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:286)
      at org.apache.tika.parser.ParserDecorator.parse(ParserDecorator.java:188)
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
      at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
      at com.wolterskluwer.atlas.transformer.processFileResources.DocumentsTextExtractor.extractText(DocumentsTextExtractor.java:44)
      at com.wolterskluwer.atlas.transformer.processFileResources.DocumentsTextExtractor.main(DocumentsTextExtractor.java:134)
      Caused by: java.io.IOException: Number '?·?Wk®)i?v' is getting too long, stop reading at offset 266260
      at org.apache.pdfbox.pdfparser.BaseParser.readStringNumber(BaseParser.java:1379)
      at org.apache.pdfbox.pdfparser.BaseParser.readLong(BaseParser.java:1341)
      at org.apache.pdfbox.pdfparser.BaseParser.readObjectNumber(BaseParser.java:1278)
      at org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:739)
      at org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:721)
      at org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:652)
      at org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:612)
      at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:215)
      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:249)
      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:840)
      at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:780)
      at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:130)
      at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
      ... 6 more

      Please, find failing document and log with StackTrace in attachments.

      Attachments

        1. 95s-0316-rpt0242-21-appendix-16-f-vol177.pdf
          4.35 MB
          Yauheni Salopiy
        2. PDFBOX-3452_LOG.txt
          2 kB
          Yauheni Salopiy
        3. screenshot-1.png
          380 kB
          Stacie Weffelmeyer

        Activity

          People

            Unassigned Unassigned
            Genstr Yauheni Salopiy
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: