[ 
https://issues.apache.org/jira/browse/PDFBOX-3545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998558#comment-15998558
 ] 

Andreas Lehmkühler commented on PDFBOX-3545:
--------------------------------------------

The out of range startxref value wasn't the issue here, PDFBox is able to fix 
that. But at least the pdf [~tilman] attached is malformed. The trailer at the 
end of the pdf lacks of a root object. I've added a check for the root object. 
The trailer is rebuilt If it isn't present.

> COSParser.parseXref failing if startXrefOffset over pdf size
> ------------------------------------------------------------
>
>                 Key: PDFBOX-3545
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3545
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.3
>            Reporter: Matus Zamborsky
>            Assignee: Andreas Lehmkühler
>         Attachments: 000369.pdf
>
>
> Any PDF which had wrong startxref was parsed with warning in PdfBox 1.8 
> thanks to self healing mechanism.
> In version 2.0 the COSParser.parseXref (called from PDFParser) tries to seek 
> to the startxref position. 
> If the position is wrong, but within the file size, the PDF is parsed with 
> warning.
> But when the startxref is over the file size, the parsing ended with 
> exception.
> We could either test if startxref is not over source.length(), or catch the 
> exception.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to