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

George Sexton commented on PDFBOX-3456:
---------------------------------------

Sorry I didn't include the code:

PDDocument document = null;
BufferedImage bim = null;
try {
document = PDDocument.load(fInput);

if (document.isEncrypted()) {
    return null;
}

//Make the call
PDFRenderer renderer = new PDFRenderer(document);

bim = renderer.renderImageWithDPI(RENDER_PAGE, IMG_RESOLUTION, ImageType.RGB);
if (bim != null) {
    if (fOutput != null) {
        ImageIOUtil.writeImage(bim, fOutput.getAbsolutePath(), IMG_RESOLUTION);
    }
} else {
    System.err.println(getClass().getName() + ".getPDFThumbnail(" + 
fInput.getAbsolutePath() + ",...) Error rendering image.");
}


> Page Rendered as Image Incorrectly
> ----------------------------------
>
>                 Key: PDFBOX-3456
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3456
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.2
>         Environment: Oracle JDK 1.8.0_102
> OpenSUSE Linux 13.2
> Apache Tomcat 7.0.70
>            Reporter: George Sexton
>            Priority: Minor
>         Attachments: 8_8healthcare.pdf, 8_8healthcare_thumbnail.jpg
>
>
> Rendering the attached PDF as an image results in a thumbnail that has a 
> black background. The background in the original PDF is white.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to