[
https://issues.apache.org/jira/browse/PDFBOX-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15964147#comment-15964147
]
Andreas Lehmkühler edited comment on PDFBOX-3318 at 4/11/17 10:31 AM:
----------------------------------------------------------------------
IMHO there are 2 possible solutions wrt the attached pdf:
- skip those extra bytes at the end of the pdf to find the startxref value
- fix the rebuild mechanism which doesn't seem to work in this case (the self
healing mechanism is triggered due to the fact that the parser can't find the
startxref value at the end of the pdf)
I'm going to have a look at the second solution, as other malformed pdfs may be
affected too
was (Author: lehmi):
IMHO there are 2 possible solutions:
- skip those extra bytes at the end of the pdf to find the startxref value
- fix the rebuild mechanism which doesn't seem to work in this case (the self
healing mechanism is triggered due to the fact that the parser can't find the
startxref value at the end of the pdf)
I'm going to have a look at the second solution, as other malformed pdfs may be
affected too
> IllegalArgumentException in PDPageTree constructor: root cannot be null
> -----------------------------------------------------------------------
>
> Key: PDFBOX-3318
> URL: https://issues.apache.org/jira/browse/PDFBOX-3318
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.0
> Reporter: Arul Dhesiaseelan
> Attachments: rootCannotBeNull.pdf
>
>
> When merging this pdf with another pdf, I get this exception. It looks
> similar to PDFBOX-2615.
> {code}
> 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:128)
> at
> org.apache.pdfbox.multipdf.PDFMergerUtility.appendDocument(PDFMergerUtility.java:484)
> at
> org.apache.pdfbox.multipdf.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:213)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]