[ https://issues.apache.org/jira/browse/PDFBOX-3497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15489642#comment-15489642 ]
John Hewson commented on PDFBOX-3497: ------------------------------------- Yep, that's a bug. Workaround is to use renderImageWithDPI and specify 72 * 0.5 as the DPI. > 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 > > > 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