You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/05/05 21:27:15 UTC

[jira] [Commented] (PDFBOX-1649) PNG images with alpha channel displays thin grey lines

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

Tilman Hausherr commented on PDFBOX-1649:
-----------------------------------------

How did you create this PNG image? Did you create it with java itself or with a different software? I have also thin grey lines, but it is difficult to tell whether it is a bug or not.

> PNG images with alpha channel displays thin grey lines
> ------------------------------------------------------
>
>                 Key: PDFBOX-1649
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1649
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>    Affects Versions: 1.8.2
>         Environment: Microsoft Windows [Version 6.1.7601]
> PDFBox 1.8.2
> Adobe Reader 10.1.7
> Google Chrome 27.0.1453.110 m
>            Reporter: Niels Beekman
>         Attachments: screenshot.png, test.pdf, test.png
>
>
> When including a PNG file in a PDF file, both Adobe Reader and Google Chrome show thin grey lines. I have attached a screenshot showing the issue.
> PDDocument document = new PDDocument();
> PDPage page = new PDPage(PDPage.PAGE_SIZE_A4);
> document.addPage(page); 
> BufferedImage buffImage = ImageIO.read(new File("test.png"));
> PDPixelMap pixelMap = new PDPixelMap(document, buffImage);
> PDPageContentStream contentStream = new PDPageContentStream(document, page);
> contentStream.drawImage(pixelMap, 0, 0);
> contentStream.close();
> document.save(new File("test.pdf"));
> This does not happen with a flattened PNG (without alpha channel).



--
This message was sent by Atlassian JIRA
(v6.2#6252)