You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/10/13 20:35:35 UTC

[jira] [Updated] (PDFBOX-1060) convertToImage includes "ghost" annotation outlines

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

Andreas Lehmkühler updated PDFBOX-1060:
---------------------------------------
    Affects Version/s:     (was: 1.6.0)
                       2.0.0
                       1.8.7

> convertToImage includes "ghost" annotation outlines
> ---------------------------------------------------
>
>                 Key: PDFBOX-1060
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1060
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 1.8.7, 2.0.0
>         Environment: Windows 7, Eclipse Helios SR2
>            Reporter: Gilad Denneboom
>              Labels: convertToImage
>         Attachments: 3 Pages from batch_sequences.pdf, PAGE0.png, PAGE1.png, PAGE2.png
>
>
> When using PDPage.convertToImage() to export PNG files of pages with annotations on them, "ghost" outlines of the annotations sometimes appear on the generated image. The outlines do not correspond to the location of the annotations. See the attached files.
> Code used:
> 		String inputFilePath = "C:/Gilad/input/3 Pages from batch_sequences.pdf";
> 		
> 		PDDocument doc = PDDocument.load(inputFilePath);
> 		for (int p=0; p<doc.getNumberOfPages(); p++) {
> 		    PDPage page = (PDPage) doc.getDocumentCatalog().getAllPages().get(p);
> 		    BufferedImage bImg = page.convertToImage();
> 		    String imagePath = FilenameUtils.getFullPath(inputFilePath) + "PAGE"+ Integer.toString(p) + ".png";
> 		    File yourImageFile = new File(imagePath);
> 		    ImageIO.write(bImg,"png",yourImageFile);
> 		}



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