[
https://issues.apache.org/jira/browse/PDFBOX-5898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17897409#comment-17897409
]
Tilman Hausherr edited comment on PDFBOX-5898 at 11/12/24 8:20 AM:
-------------------------------------------------------------------
Result of {{TilingPaint.getImage()}} at 1000% :
!TilingPattern-2371731399394458-1000%.png!
Result of {{TilingPaint.getImage()}} at 2000% :
!TilingPattern-2371731399416644-2000%.png!
Further investigation needed... my guess is that this is yet another rounding
problem.
was (Author: tilman):
Result of TilingPaint.getImage at 1000% :
!TilingPattern-2371731399394458-1000%.png!
Result of TilingPaint.getImage at 2000% :
!TilingPattern-2371731399416644-2000%.png!
Further investigation needed... my guess is that this is yet another rounding
problem.
> Converting PDF to images using PDFBox results in unexpected outcomes.
> ---------------------------------------------------------------------
>
> Key: PDFBOX-5898
> URL: https://issues.apache.org/jira/browse/PDFBOX-5898
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.24
> Reporter: bai yuan
> Priority: Major
> Attachments: TilingPattern-2371731399394458-1000%.png,
> TilingPattern-2371731399416644-2000%.png, image-2024-11-12-15-45-48-011.png,
> test2.pdf
>
>
> Running the following code, many fine red lines appear in the image.
> {code:java}
> String pdfFilePath = path + "test2.pdf";
> String outputDir = path + "/out/";
> try {
> PDDocument document = PDDocument.load(new File(pdfFilePath));
> PDFRenderer pdfRenderer = new PDFRenderer(document);
> for (int page = 0; page < document.getNumberOfPages(); page++) {
> BufferedImage bim = pdfRenderer.renderImageWithDPI(page, 300,
> ImageType.RGB);
> ImageIO.write(bim, "PNG", new File(outputDir + "page-" +
> (page + 1) + ".png"));
> }
> document.close();
> System.out.println("PDF converted to images successfully.");
> } catch (Exception e) {
> e.printStackTrace();
> }
> {code}
> !image-2024-11-12-15-45-48-011.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]