[
https://issues.apache.org/jira/browse/PDFBOX-4174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421185#comment-16421185
]
Tilman Hausherr commented on PDFBOX-4174:
-----------------------------------------
I realize that maybe you got the mentioned error with a DIFFERENT file. You'll
have to attach that file, not another file. And retest with the current
version, which is 2.0.9.
> Reopen - java.io.IOException: Missing root object specification in trailer
> --------------------------------------------------------------------------
>
> Key: PDFBOX-4174
> URL: https://issues.apache.org/jira/browse/PDFBOX-4174
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.6
> Reporter: Aleksandr Vasilenko
> Assignee: Andreas Lehmkühler
> Priority: Major
> Labels: regression
> Attachments: 069020.pdf
>
>
> We recently started getting this error in some of our production error logs.
> We are using PDFBOX 2.0.6 and are getting the same error after passing in the
> attached PDF into our application/
>
> {code}
> java.io.IOException: Missing root object specification in trailer.
> 16:28:17,502 ERROR [OOS_ImageManagerImpl] (http-localhost/127.0.0.1:8080-1)
> [ERROR] Unable to convert PDF document to image. : java.io.IOException:
> Missing root object specification in trailer. at
> org.apache.pdfbox.pdfparser.COSParser.parseTrailerValuesDynamically(COSParser.java:2169)
> [pdfbox-2.0.6.jar:2.0.6] at
> org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:222)
> [pdfbox-2.0.6.jar:2.0.6] at
> org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:271)
> [pdfbox-2.0.6.jar:2.0.6] at
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1197)
> [pdfbox-2.0.6.jar:2.0.6] at
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1174)
> [pdfbox-2.0.6.jar:2.0.6] at
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1155)
> [pdfbox-2.0.6.jar:2.0.6] at
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1138)
> [pdfbox-2.0.6.jar:2.0.6] at
> com.vsp.oos.common.impl.ImageManagerImpl.validateAndConvertPDFToImage(ImageManagerImpl.java:630)
> [oos-common-3.54.0-SNAPSHOT.jar:]
> {code}
> A snipet of our code
> {code:java}
> private byte[] validateAndConvertPDFToImage(byte[] imageArray) {
> PDDocument pdfDocument = null;
> try {
> // Error happens here
> pdfDocument = PDDocument.load(imageArray);
> PDFRenderer pdfRenderer = new PDFRenderer(pdfDocument);
> // ..
> } catch() { ... }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]