You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Sean Bridges (JIRA)" <ji...@apache.org> on 2009/05/14 20:58:45 UTC

[jira] Updated: (PDFBOX-474) invalid xref entry causes parser to fail

     [ https://issues.apache.org/jira/browse/PDFBOX-474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Bridges updated PDFBOX-474:
--------------------------------

    Attachment: patch

The line numbers in this patch will not be valid, but you should have enough info to figure out where to apply it.

This patch fixes it, and also fixes a potential index out of bounds exception.  It might be good to search for the "n" in any index >=2

> invalid xref entry causes parser to fail
> ----------------------------------------
>
>                 Key: PDFBOX-474
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-474
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 0.8.0-incubator
>            Reporter: Sean Bridges
>             Fix For: 0.8.0-incubator
>
>         Attachments: patch
>
>
> I have a pdf doc with an invalid xref of the form
> xref
> 55 117
> 0000000016 00000 n
> 0000048365 00000 n
> 0000072064 00000 00 n
> 0000110322 00000 n
> The problematic line is,
> 0000072064 00000 00 n
> Which fails to parse with an exception of,
> Caused by: java.io.IOException: Corrupt XRefTable Entry - ObjID:79
> 	at org.apache.pdfbox.pdfparser.PDFParser.parseXrefTable(PDFParser.java:645)
> 	at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:414)
> 	at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:169)
> The pdf is invalid, but it would be nice to parse it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.