[ 
https://issues.apache.org/jira/browse/PDFBOX-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr closed PDFBOX-5464.
-----------------------------------
    Resolution: Duplicate

Closing as duplicate of PDFBOX-5778, and already released :)

> White areas are rendered red when converting a pdf to png with pdfbox
> ---------------------------------------------------------------------
>
>                 Key: PDFBOX-5464
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5464
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.26, 3.0.0 PDFBox
>            Reporter: Kirovj
>            Priority: Major
>         Attachments: err1-1.png, err1-2.png, err1-3.png, err1.pdf
>
>
> hi
> This may be a problem similar to PDFBOX-4470 Red areas around text when 
> converting a pdf to png with pdfbox - ASF JIRA (apache.org)
> When I convert a pdf to png files with pdfbox, I find that the backgroud 
> White color was rendered as Red. And this is unusual, I have only one pdf 
> rendered like this. But in this pdf, almost all pages are rendered as Red 
> color.
> Here's some of the code that I'm using:
> {code:java}
> try (PDDocument document = PDDocument.load(new File("example/" + file + 
> ".pdf"))) {
>     int numberOfPages = document.getNumberOfPages();
>     PDFRenderer renderer = new PDFRenderer(document);
>     for (int i = 0; i < numberOfPages; i++) {
>         System.out.println("render " + i);
>         BufferedImage bufferedImage = renderer.renderImage(i, 2, 
> ImageType.RGB);
>         ImageIO.write(bufferedImage, "png", new File("example/" + file + "-" 
> + i + ".png"));
>     }
> } {code}
> I also tried pdfbox 3.0.0-RC1, but result is the same.
> The red png files start at pdf page 3.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to