[
https://issues.apache.org/jira/browse/PDFBOX-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191766#comment-16191766
]
Tilman Hausherr commented on PDFBOX-3952:
-----------------------------------------
I ran this code with 2.0.7:
{code}
PDDocument doc = PDDocument.load(new
URL("https://issues.apache.org/jira/secure/attachment/12890373/01b%20Die%20Wettbewerbskr%C3%A4fte%20neu%20betrachtet%20-%205%20Forces%202.pdf").openStream());
System.out.println(doc.getNumberOfPages());
doc.close();
PDDocument doc2 = PDDocument.load(new
URL("https://issues.apache.org/jira/secure/attachment/12890374/02e%20Die%203%20Regeln%20f%C3%BCr%20den%20Erfolg%20-%20Spitzenleistungen-3.pdf").openStream());
System.out.println(doc2.getNumberOfPages());
doc2.close();
{code}
and the output is
{code}
6
14
{code}
> IllegalArgumentException: root cannot be null for Canon scanned PDFs
> --------------------------------------------------------------------
>
> Key: PDFBOX-3952
> URL: https://issues.apache.org/jira/browse/PDFBOX-3952
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.7, 3.0.0
> Environment: java version "1.8.0_144"
> Reporter: Johannes Porzelt
> Attachments: 01b Die Wettbewerbskräfte neu betrachtet - 5 Forces
> 2.pdf, 02e Die 3 Regeln für den Erfolg - Spitzenleistungen-3.pdf
>
>
> We encounter the below exception while trying to process the attached
> documents.
> All issues that produced a similar or same exception seemed to fixed in our
> version (2.0.7).
> PDFs are scans of _Canon iR-ADV C5250_
> {code:java}
> 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)
> at
> org.apache.pdfbox.pdmodel.PDDocument.getNumberOfPages(PDDocument.java:1398)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]