You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2018/03/31 05:51:00 UTC

[jira] [Commented] (PDFBOX-4174) Reopen - java.io.IOException: Missing root object specification in trailer

    [ https://issues.apache.org/jira/browse/PDFBOX-4174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421184#comment-16421184 ] 

Tilman Hausherr commented on PDFBOX-4174:
-----------------------------------------

I can open the file with 2.0.6, 2.0.0, 2.0.9 and the trunk when using PDFDebugger. How did you convert the file to a byte array?

> 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/
>  
> java.io.IOException: Missing root object specification in trailer.
> {code:text}
> 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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org