[
https://issues.apache.org/jira/browse/PDFBOX-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915479#comment-13915479
]
Tilman Hausherr edited comment on PDFBOX-1738 at 2/28/14 6:03 AM:
------------------------------------------------------------------
Here's what I get with the unreleased 2.0 version, which is more lenient
towards malformed PDF files:
Exception in file: cruz 1.11.pdf
java.io.IOException: Premature end of file while dereferencing object xref at
offset 121313
at
org.apache.pdfbox.pdfparser.NonSequentialPDFParser.calculateFixingOffset(NonSequentialPDFParser.java:1882)
at
org.apache.pdfbox.pdfparser.NonSequentialPDFParser.calculateFixingOffset(NonSequentialPDFParser.java:1759)
at
org.apache.pdfbox.pdfparser.NonSequentialPDFParser.initialParse(NonSequentialPDFParser.java:370)
at
org.apache.pdfbox.pdfparser.NonSequentialPDFParser.parse(NonSequentialPDFParser.java:741)
at org.apache.pdfbox.pdmodel.PDDocument.loadNonSeq(PDDocument.java:1153)
at org.apache.pdfbox.pdmodel.PDDocument.loadNonSeq(PDDocument.java:1136)
(...)
A look into the file shows that there are two EOFs, two xref tables, and this:
{code}
<<
/ABCpdf 6109
/ID [ <C779C69CAA1212B23218A42048BB74A3>
<EAEB4C0260D83CD46B7708AE8534F1EA> ]
/Length 0
/Prev 121313
/Root 30 0 R
/Size 48
/Type /XRef
>>
>> {code}
121313 is an offset outside the file. I wonder what software was used to create
that file, the Adobe Viewer doesn't show any.
was (Author: tilman):
Exception in file: cruz 1.11.pdf
java.io.IOException: Premature end of file while dereferencing object xref at
offset 121313
at
org.apache.pdfbox.pdfparser.NonSequentialPDFParser.calculateFixingOffset(NonSequentialPDFParser.java:1882)
at
org.apache.pdfbox.pdfparser.NonSequentialPDFParser.calculateFixingOffset(NonSequentialPDFParser.java:1759)
at
org.apache.pdfbox.pdfparser.NonSequentialPDFParser.initialParse(NonSequentialPDFParser.java:370)
at
org.apache.pdfbox.pdfparser.NonSequentialPDFParser.parse(NonSequentialPDFParser.java:741)
at org.apache.pdfbox.pdmodel.PDDocument.loadNonSeq(PDDocument.java:1153)
at org.apache.pdfbox.pdmodel.PDDocument.loadNonSeq(PDDocument.java:1136)
(...)
A look into the file shows that there are two EOFs, two xref tables, and this:
{code}
<<
/ABCpdf 6109
/ID [ <C779C69CAA1212B23218A42048BB74A3>
<EAEB4C0260D83CD46B7708AE8534F1EA> ]
/Length 0
/Prev 121313
/Root 30 0 R
/Size 48
/Type /XRef
>>
>> {code}
121313 is an offset outside the file. I wonder what software was used to create
that file, the Adobe Viewer doesn't show any.
> PDF with parsing Exception
> --------------------------
>
> Key: PDFBOX-1738
> URL: https://issues.apache.org/jira/browse/PDFBOX-1738
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing, Text extraction
> Affects Versions: 1.8.2
> Environment: Windows , java 1.6.0_17
> Reporter: James Zou
> Attachments: Cruz 1.11.pdf
>
>
> when extract a content from a pdf file, after getting this error, the process
> hang!
> java.io.IOException: Error: Could not find font(COSName{Fabc21}) in
> map={Fabc19=org.apache.pdfbox.pdmodel.font.PDTrueTypeFont@a0dcd9,
> Fabc2=org.apache.pdfbox.pdmodel.font.PDType1Font@1d5550d,
> Fabc3=org.apache.pdfbox.pdmodel.font.PDTrueTypeFont@c21495,
> Fabc1=org.apache.pdfbox.pdmodel.font.PDTrueTypeFont@14b7453}
> at
> org.apache.pdfbox.util.operator.SetTextFont.process(SetTextFont.java:57)
> at
> org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:529)
> at
> org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:258)
> at
> org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:225)
> at
> org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:205)
> at
> org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:455)
> at
> org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:379)
> at
> org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:335)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)