[
https://issues.apache.org/jira/browse/PDFBOX-3058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15064187#comment-15064187
]
Tim Allison edited comment on PDFBOX-3058 at 12/18/15 5:00 PM:
---------------------------------------------------------------
I forgot to mention that I haven't looked through the results at all
yet...there will likely continue to be non-issues that appear to be issues
because of the code and the corpus.
Upon a quick scan of the 940 files with content lost because of a new exception
in 2.0, 744 exceptions were roughly this:
{noformat}
java.io.IOException: Error reading stream, expected='endstream' actual='' at
offset 131072
at
org.apache.pdfbox.pdfparser.COSParser.parseCOSStream(COSParser.java:982)
at
org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:759)
at
org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:720)
at
org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:651)
at
org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:612)
at
org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:212)
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:246)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:837)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:777)
{noformat}
Given the very common offsets (e.g. 32768, 24576, 16384) and the few I manually
reviewed, these look like truncated files. So, ignore that non-problem. Is
there any way in PDFBox 2.0 to extract content from truncated files? Users
can't fall back to the old parser...right?
and 102 were the following:
{noformat}
java.lang.IllegalArgumentException: root cannot be null
at org.apache.pdfbox.pdmodel.PDPageTree.<init>(PDPageTree.java:75)
at
org.apache.pdfbox.pdmodel.PDDocumentCatalog.getPages(PDDocumentCatalog.java:128)
at
org.apache.pdfbox.pdmodel.PDDocument.getNumberOfPages(PDDocument.java:1154)
at
org.apache.tika.parser.pdf.PDFParser.extractMetadata(PDFParser.java:214)
at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:131)
{noformat}
Again, manual inspection of a few files suggests truncation.
Need more curation of our corpus...
was (Author: [email protected]):
I forgot to mention that I haven't looked through the results at all
yet...there will likely continue to be non-issues that appear to be issues
because of the code and the corpus.
Upon a quick scan of the 940 files with content lost because of a new exception
in 2.0, 744 exceptions were roughly this:
{noformat}
java.io.IOException: Error reading stream, expected='endstream' actual='' at
offset 131072
at
org.apache.pdfbox.pdfparser.COSParser.parseCOSStream(COSParser.java:982)
at
org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:759)
at
org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:720)
at
org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:651)
at
org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:612)
at
org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:212)
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:246)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:837)
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:777)
{noformat}
Given the very common offsets (e.g. 32768, 24576, 16384) and the few I manually
reviewed, these look like truncated files. So, ignore that non-problem. Is
there any way in PDFBox 2.0 to extract content from truncated files? Users
can't fall back to the old parser...right?
and 102 were:
{noformat}
java.lang.IllegalArgumentException: root cannot be null
at org.apache.pdfbox.pdmodel.PDPageTree.<init>(PDPageTree.java:75)
at
org.apache.pdfbox.pdmodel.PDDocumentCatalog.getPages(PDDocumentCatalog.java:128)
at
org.apache.pdfbox.pdmodel.PDDocument.getNumberOfPages(PDDocument.java:1154)
at
org.apache.tika.parser.pdf.PDFParser.extractMetadata(PDFParser.java:214)
at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:131)
{noformat}
> Support TIKA Migration to PDFBox 2.0
> ------------------------------------
>
> Key: PDFBOX-3058
> URL: https://issues.apache.org/jira/browse/PDFBOX-3058
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Maruan Sahyoun
> Attachments: NZAZKTQYKDD2HSBCSJJN6XSEA4KJEONU_1_8_10.json,
> NZAZKTQYKDD2HSBCSJJN6XSEA4KJEONU_2_0.json, content_diffs-1.8-to-2.0.xlsx,
> textLostFromACausedByNewExceptionsInB.zip
>
>
> This issue is to track fixing issues which came up as part of TIKA-1285
> (Upgrade to PDFBox 2.0.0 when available) mainly
> - new exceptions compared to PDFBox 1.8.x
> - regressions in text extraction
> - lower quality text extraction
> There should be individual issues to track tasks/bugs arising from that.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]