Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.12, 1.8.13, 2.0.2, 2.0.3, 3.0.0 PDFBox
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: Unexpected RuntimeException from org.apache.tika.parser.pdf.PDFParser@349c1daf
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:282)
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.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.fontbox.cmap.CMapParser.increment(CMapParser.java:684)
at org.apache.fontbox.cmap.CMapParser.increment(CMapParser.java:672)
at org.apache.fontbox.cmap.CMapParser.parseBeginbfrange(CMapParser.java:393)
at org.apache.fontbox.cmap.CMapParser.parse(CMapParser.java:136)
at org.apache.pdfbox.pdmodel.font.CMapManager.parseCMap(CMapManager.java:73)
at org.apache.pdfbox.pdmodel.font.PDFont.readCMap(PDFont.java:178)
at org.apache.pdfbox.pdmodel.font.PDFont.<init>(PDFont.java:122)
at org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:119)
at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:83)
at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:123)
at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
at org.apache.pdfbox.text.PDFTextStreamEngine.processPage(PDFTextStreamEngine.java:136)
at org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:391)
at org.apache.tika.parser.pdf.PDF2XHTML.processPage(PDF2XHTML.java:144)
at org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:319)
at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:266)
at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:112)
at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:151)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
... 6 more
Please, find failing document and log with StackTrace in attachments.