[ 
https://issues.apache.org/jira/browse/PDFBOX-4174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr Vasilenko updated PDFBOX-4174:
----------------------------------------
    Description: 
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:java}
// code placeholder{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);
// ..
}{code}

  was:
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:java}
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.5.jar:2.0.5]
at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:222) 
[pdfbox-2.0.5.jar:2.0.5]
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:271) 
[pdfbox-2.0.5.jar:2.0.5]
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1197) 
[pdfbox-2.0.5.jar:2.0.5]
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1174) 
[pdfbox-2.0.5.jar:2.0.5]
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1155) 
[pdfbox-2.0.5.jar:2.0.5]
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1138) 
[pdfbox-2.0.5.jar:2.0.5]
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);
// ..
}{code}


> 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.4
>            Reporter: Aleksandr Vasilenko
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>              Labels: regression
>             Fix For: 2.0.6
>
>         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:java}
> // code placeholder{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);
> // ..
> }{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to