[
https://issues.apache.org/jira/browse/PDFBOX-4915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157788#comment-17157788
]
Gauthier Roebroeck commented on PDFBOX-4915:
--------------------------------------------
Actually my code looks like this:
[https://github.com/gotson/komga/blob/23e1240f8d6e4553c8141eaba2cee8b34e9f9005/komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/PdfExtractor.kt#L22-L29]
I didn't try using a File directly. Actually I use PDFBox as part of my
project, used by many users, and one of them reported an issue with this file.
You can access the file here:
[https://www.dropbox.com/s/aecg5ecbc8k7ejx/Black%20Bullet%20-%20Volume%2001%20-%20Those%20Who%20Would%20Be%20Gods%20%5BYen%20Press%5D%5BKobo_Kitzoku%5D.pdf?dl=0]
I have almost no knowledge of the internal PDF structure, i suppose you will
get much better and quicker results by checking the file yourself. It seems to
read fine in different readers.
> "Page tree root must be a dictionary" on PDDocument.load
> --------------------------------------------------------
>
> Key: PDFBOX-4915
> URL: https://issues.apache.org/jira/browse/PDFBOX-4915
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.19
> Reporter: Gauthier Roebroeck
> Priority: Minor
> Attachments: Screenshot 2020-07-14 at 20.19.40.png
>
>
> Hi,
> i have a PDF file that throws the following exception:
> {{java.io.IOException: Page tree root must be a
> dictionaryjava.io.IOException: Page tree root must be a dictionary at
> org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:198)
> ~[pdfbox-2.0.19.jar:2.0.19] at
> org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:226)
> ~[pdfbox-2.0.19.jar:2.0.19] at
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1222)
> ~[pdfbox-2.0.19.jar:2.0.19] at
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1122)
> ~[pdfbox-2.0.19.jar:2.0.19]}}
> This happens when loading the document from an InputStream.
> The document can be opened properly using Preview on Mac.
>
> I have checked the PDF structure (even though i don't know it very well),
> from what i can see it could be because the /Pages is not the first element
> under the /Root.
>
> !Screenshot 2020-07-14 at 20.19.40.png!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]