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/10/01 15:23:02 UTC

[jira] [Commented] (PDFBOX-3797) Error reading stream, expected='endstream' actual='' with truncated file

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

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

The file is truncated and version <=2.0.5 just omitted the objects after the last {{%%EOF}}. The current version reads all complete/non truncated objects and at least one of them contains a malformed stream

> Error reading stream, expected='endstream' actual='' with truncated file
> ------------------------------------------------------------------------
>
>                 Key: PDFBOX-3797
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3797
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.6
>            Reporter: Tilman Hausherr
>            Assignee: Andreas Lehmkühler
>              Labels: regression
>         Attachments: PDFBOX-3797-5WULWDW54DAQ4ORVJSACEE2KCXQ7PQLL.pdf
>
>
> {code}
> java.io.IOException: Error reading stream, expected='endstream' actual='' at offset 21570
>     org.apache.pdfbox.pdfparser.COSParser.parseCOSStream(COSParser.java:996)
>     org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:782)
>     org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:743)
>     org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:674)
>     org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:634)
>     org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:241)
>     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)
> {code}
> This didn't happen with 2.0.5.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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