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

Andreas Lehmkühler resolved PDFBOX-931.
---------------------------------------

    Resolution: Invalid
      Assignee: Andreas Lehmkühler

As I already said, I can't confirm the issue. Furthermore Rolands assumption 
that it might be related to a missing ImageIO lib isn't correct. I just used 
the PDFBoxApp.jar from [1] without any additional components to create the 
images I've attached earlier.

[1] pdfbox.apache.org/download.html

> PDPage convertToImage generates white image with no contents
> ------------------------------------------------------------
>
>                 Key: PDFBOX-931
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-931
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.3.1, 1.4.0
>         Environment: JDK 1.6.0_21
>            Reporter: Vincent VIAL
>            Assignee: Andreas Lehmkühler
>         Attachments: PDFBOX931-pdf_causing_white_pages1.jpg, 
> PDFBOX931-pdf_causing_white_pages13.jpg, pdf_causing_white_pages.pdf
>
>
> When converting a PDPage of this pdf into an image, the resulting file is 
> always a white image with no contents.
> The following message appeared in the log output (It doesn't seem to be  a 
> duplicate of PDFBOX-794.) : 
>  ERROR                  filter.FlateFilter - Stop reading corrupt stream
> Here's the code used to convert the image :
> @Test
> public void testConvertImage() {
>       try {
>               PDDocument pdDocument = 
> PDDocument.load("pdf_causing_white_pages.pdf");
>               List<PDPage> documentPageList = 
> pdDocument.getDocumentCatalog().getAllPages();
>               TestCase.assertNotNull(documentPageList);
>               int pageNumber = 1;
>               for (PDPage tmpPage :documentPageList){
>                       BufferedImage tempImage = tmpPage.convertToImage();
>                       ImageIO.write(tempImage,"jpeg", new 
> File("result_"+pageNumber+".jpeg"));
>                       pageNumber ++;
>               }                       
>       } catch (FileNotFoundException e) {
>               TestCase.fail(e.getMessage());
>       } catch (IOException e) {
>               TestCase.fail(e.getMessage());
>       }
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to