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 11:00:04 UTC

[jira] [Resolved] (PDFBOX-3936) IllegalArgumentException: root cannot be null with truncated file (2)

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

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

PDFBOX-3928 introduced an optimized brute force search for objects. It detects cut of objects by looking for the "endobj" marker. Unfortunately the attached pdf is cut of in the middle of that keyword. I've improved the algorithm by looking for "endo" instead of "endobj". We may improve the detection by looking for other end of object markers like "endstream" or braces depending of the kind of object but I'm not sure it it's worth to complicate the detection.
Set to resolved

> IllegalArgumentException: root cannot be null with truncated file (2)
> ---------------------------------------------------------------------
>
>                 Key: PDFBOX-3936
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3936
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.7
>            Reporter: Tilman Hausherr
>            Assignee: Andreas Lehmkühler
>              Labels: regression
>             Fix For: 2.0.8, 3.0.0
>
>         Attachments: PDFBOX-3936-BF4G4JVMMC4I7RDNIPQQF6DQSVKSVVXJ.pdf
>
>
> {code}
> Exception in thread "main" java.lang.IllegalArgumentException: root cannot be null
>         at org.apache.pdfbox.pdmodel.PDPageTree.<init>(PDPageTree.java:75)
>         at org.apache.pdfbox.pdmodel.PDDocumentCatalog.getPages(PDDocumentCatalog.java:129)
> {code}
> This was OK with 2.0.6.
> [~tallison@apache.org] please move that file to the "truncated" subdir.



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