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

Daan de Wit updated PDFBOX-498:
-------------------------------

    Attachment: PDFParser.java.diff

Attached a diff-file that contains a simple fix for this issue (similar to the 
fix for PDFBOX-195)

> some pdf-files have no newline after endobj, pdfbox fails on that
> -----------------------------------------------------------------
>
>                 Key: PDFBOX-498
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-498
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 0.7.3
>            Reporter: Daan de Wit
>         Attachments: endobj-no-newline.pdf, PDFParser.java.diff
>
>
> We have some pdf-documents that have no newline after some 
> endobj-instructions, but the next object number. Just like in PDFBOX-195. 
> PDFBox throws an IOException when it encouters such a situation.
> Stacktrace:
> java.io.IOException: expected='endobj' firstReadAttempt='endobj28' 
> secondReadAttempt='0' org.apache.pdfbox.io.pushbackinputstr...@a37368
>       at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:534)
>       at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:167)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:736)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:704)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:630)
>       at 
> org.apache.pdfbox.pdfparser.TestPDFParser.testParsingTroublePDFs(TestPDFParser.java:98)

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

Reply via email to