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

John Hewson commented on PDFBOX-3497:
-------------------------------------

Ok, so I think the bug is that the PDF is being rendered correctly except for 
the white background, which appears to be 1/2 the expected size.

> PDFRenderer with scale < 1 does not render properly
> ---------------------------------------------------
>
>                 Key: PDFBOX-3497
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3497
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.2
>         Environment: Windows 7
> Java 1.8.0_102
>            Reporter: dennis lucero
>         Attachments: input.pdf, output.png, outputDPI.png
>
>
> Rendering a page with the method renderImage(int pageIndex, float scale) in 
> PDFRenderer with a scale factor < 1 (e.g 0.5) the image renders only 0.5 of 
> the actual content
> {code}
> try {
>       File file = new File("input.pdf");
>       PDDocument document = PDDocument.load(file);
>       PDFRenderer renderer = new PDFRenderer(document);
>       BufferedImage image = renderer.renderImage(0, .5f);
>       ImageIO.write(image, "png", new File("output.png"));
> } catch (IOException e) {
>       e.printStackTrace();
> }
> {code}



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

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

Reply via email to