You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2017/05/09 18:01:04 UTC

[jira] [Resolved] (PDFBOX-3783) java.io.IOException: Expected root dictionary, but got this: COSNull{}

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

Andreas Lehmkühler resolved PDFBOX-3783.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0
                   2.0.6

I've replaced the repair mechanism from PDFBOX-3318 with a brute force search fro the latest startxref entry. This should work for most files with garbage attached at the end

> java.io.IOException: Expected root dictionary, but got this: COSNull{}
> ----------------------------------------------------------------------
>
>                 Key: PDFBOX-3783
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3783
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.6
>            Reporter: Tilman Hausherr
>            Assignee: Andreas Lehmkühler
>              Labels: regression
>             Fix For: 2.0.6, 3.0.0
>
>         Attachments: PDFBOX-3783-72GLBIGUC6LB46ELZFBARRJTLN4RBSQM.pdf
>
>
> This file was parsed in 2.0.5 but no longer now:
> {code}
> java.io.IOException: Expected root dictionary, but got this: COSNull{}
>     org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:230)
>     org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:276)
>     org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1005)
>     org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:943)
>     org.apache.pdfbox.debugger.PDFDebugger.parseDocument(PDFDebugger.java:1375)
>     org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1293)
>     org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1276)
>     org.apache.pdfbox.debugger.PDFDebugger.main(PDFDebugger.java:262)
>     org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:85)
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org