pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilad Denneboom (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PDFBOX-1060) convertToImage includes "ghost" annotation outlines
Date Mon, 11 Jul 2011 10:10:00 GMT

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

Gilad Denneboom updated PDFBOX-1060:
------------------------------------

    Attachment: PAGE2.png
                PAGE1.png
                PAGE0.png
                3 Pages from batch_sequences.pdf

The PDF and generated PNG files. The problem can be seen in the last one (page 3).

> convertToImage includes "ghost" annotation outlines
> ---------------------------------------------------
>
>                 Key: PDFBOX-1060
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1060
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.6.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 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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message