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

Dave Smith commented on PDFBOX-1067:
------------------------------------

My harness is like this ...

      ImageIO.scanForPlugins();
                PDDocument document = PDDocument.load(new 
File("ItDoesntWorkScan.pdf"));
                List<PDPage> pages = 
document.getDocumentCatalog().getAllPages();
                int pageCnt=1;
                for (PDPage page : pages)
        {
                
                        BufferedImage pageImage = 
page.convertToImage(BufferedImage.TYPE_BYTE_GRAY, 200);
                        FileOutputStream out = new 
FileOutputStream("page."+pageCnt+".png");
                        ImageIO.write(pageImage, "png", out);
                        out.close();
                        pageCnt++;
        }
                document.close();
        

Works perfectly. Are you doing something different?

                
> PDF Scan from Xerox WorkCentre 5030 renders as all black
> --------------------------------------------------------
>
>                 Key: PDFBOX-1067
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1067
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: PDModel
>    Affects Versions: 1.6.0
>         Environment: Tested on MacOS X 10.6.7, Ubuntu 10.10, Windows 7
>            Reporter: Sarah Kelley
>              Labels: JBIG2
>         Attachments: ItDoesntWorkScan.jbig2, ItDoesntWorkScan.pdf, 
> sakelley_pdf_rendering_problem.zip
>
>
>     The file "ItDoesntWorkScan.pdf" renders to an empty
>     black page. This file is a copy of "ItDoesntWorkPrinted.pdf"
>     that has been printed on paper, and then scanned with
>     a Xerox WorkCentre 5030 scanner, which then emails a pdf file
>     back to the user.
>     Tested On:
>         - Mac OS 10.6
>         - Windows 7
>         - Ubuntu 10.10
>     Unfortunately, the WorkCentre 5030 doesn't appear to have
>     many user-settable options for scanning to PDF, so we weren't
>     really able to try scanning with settings other than the defaults.
> Will attach pdf and code to demonstrate.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to