You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Paulo Mello <pa...@portaldedocumentos.com.br> on 2013/09/17 00:07:22 UTC

Problem with PDPage convertToImage()

I have a problem with convert PDF to Image:

 

MY  CODE

 

List<PDPage> pages = document.getDocumentCatalog().getAllPages();

 

for (PDPage page : pages) {                           

       BufferedImage convertedImage =
page.convertToImage(BufferedImage.TYPE_BYTE_BINARY, RESOLUTION_DEFAULT);

}

 

 

 

AN EXCEPTION STOP MY DEPLOY. (I CONVERT THE FILES DURING THE DEPLOY)

 

Set 16, 2013 5:09:05 PM
org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap getRGBImage

SEVERE: Something went wrong ... the pixelmap doesn't contain any data.

Set 16, 2013 5:09:05 PM org.apache.pdfbox.util.operator.pagedrawer.Invoke
process

WARNING: getRGBImage returned NULL

Set 16, 2013 5:09:05 PM org.apache.pdfbox.util.PDFStreamEngine
processOperator

INFO: unsupported/disabled operation: i

 

 

Can you help me what is the problem with my file or my code?

 


Re: Problem with PDPage convertToImage()

Posted by Andreas Lehmkühler <an...@lehmi.de>.
Hi,

> Paulo Mello <pa...@portaldedocumentos.com.br> hat am 17. September 2013 um 00:07 geschrieben:
> 
> 
> I have a problem with convert PDF to Image:
> 
>  
> 
> MY  CODE
> 
>  
> 
> List<PDPage> pages = document.getDocumentCatalog().getAllPages();
> 
>  
> 
> for (PDPage page : pages) {                           
> 
>        BufferedImage convertedImage =
> page.convertToImage(BufferedImage.TYPE_BYTE_BINARY, RESOLUTION_DEFAULT);
> 
> }
> 
>  
> 
>  
> 
>  
> 
> AN EXCEPTION STOP MY DEPLOY. (I CONVERT THE FILES DURING THE DEPLOY)
> 
>  
> 
> Set 16, 2013 5:09:05 PM
> org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap getRGBImage
> 
> SEVERE: Something went wrong ... the pixelmap doesn't contain any data.
> 
> Set 16, 2013 5:09:05 PM org.apache.pdfbox.util.operator.pagedrawer.Invoke
> process
> 
> WARNING: getRGBImage returned NULL
> 
> Set 16, 2013 5:09:05 PM org.apache.pdfbox.util.PDFStreamEngine
> processOperator
> 
> INFO: unsupported/disabled operation: i
> 
>  
> 
>  
> 
> Can you help me what is the problem with my file or my code?
Can you give us some more information or better provide us with the pdf in
question?

Maybe it helps to use the non-sequential parser (PDDocument.loadNonSeq() instead
of PDDocument.load())

BR
Andreas Lehmkühler