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

Justin LeFebvre updated PDFBOX-352:
-----------------------------------

    Attachment: ParseHeader.diff

The issue was that the file header in this pdf file has some garbage bytes 
after it. We fixed this by calling the new skipToNextObj() method in order to 
get to the first valid object after the garbage. The method skipToNextObj() was 
also changed to looked byte by byte ahead, instead of going directly to the 
next line in the file. 

> Error: Expected an integer type, actual='/Page'
> -----------------------------------------------
>
>                 Key: PDFBOX-352
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-352
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>            Reporter: Jukka Zitting
>         Attachments: ParseHeader.diff
>
>
> [Issue from SourceForge]
> http://sourceforge.net/tracker/index.php?func=detail&aid=1939581&group_id=78314&atid=552832
> I have this error during parsing
> Exception in thread "main" java.io.IOException: Error: Expected an integer
> type, actual='/Page'
> at org.pdfbox.pdfparser.BaseParser.readInt(BaseParser.java:1245)
> at org.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:426)
> at org.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:176)
> at org.pdfbox.pdmodel.PDDocument.load(PDDocument.java:703)
> at org.pdfbox.pdmodel.PDDocument.load(PDDocument.java:687)
> at org.pdfbox.pdmodel.PDDocument.load(PDDocument.java:658)
> at org.coin.util.pdf.PdfTransformation.main(PdfTransformation.java:159)
> [Comment on SourceForge]
> Date: 2008-04-10 17:34
> Sender: david_keller
> Logged In: YES 
> user_id=2056038
> Originator: YES
> the exception occurs here
>             catch( IOException e )
>             {
>                 //ok for some reason "GNU Ghostscript 5.10" puts two
> endobj
>                 //statements after an object, of course this is nonsense
>                 //but because we want to support as many PDFs as possible
>                 //we will simply try again
>                 number = readInt();
>             }
> http://sourceforge.net/tracker/download.php?group_id=78314&atid=552832&file_id=274035&aid=1939581

-- 
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