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/09/18 18:25:35 UTC
[jira] [Commented] (PDFBOX-2361) Blank pages after conversion
images to pdf
[ https://issues.apache.org/jira/browse/PDFBOX-2361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14139133#comment-14139133 ]
Tilman Hausherr commented on PDFBOX-2361:
-----------------------------------------
Try with position 200, 200. What happens?
And please use version 1.8.6. (And 1.8.7 in a few days). And PDPixelMap is best if you have a BufferedImage.
> Blank pages after conversion images to pdf
> ------------------------------------------
>
> Key: PDFBOX-2361
> URL: https://issues.apache.org/jira/browse/PDFBOX-2361
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 1.8.4
> Reporter: Oleksandr Dronyk
>
> I am trying to convert images (png, jpg) to pdf and the issue is that after conversion document pages are blank.
> Used code:
> {code:borderStyle=solid}
> PDDocument doc = new PDDocument();
> for (BufferedImage buff : list) {
> PDPage page = new PDPage(new PDRectangle(buff.getWidth(), buff.getHeight()));
> doc.addPage(page);
> PDXObjectImage ximage = new PDJpeg(doc, buff);
> PDPageContentStream content = new PDPageContentStream(doc, page);
> content.drawImage(ximage, 0, 0);
> content.close();
> }
> doc.save(outStream);
> doc.close();
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)