pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkuehler <andr...@lehmi.de>
Subject Re: Fwd: issue converting pdf to png
Date Wed, 18 Dec 2013 08:18:00 GMT
Hi,

Am 16.12.2013 14:38, schrieb Emiel Molenaar:
> Hello,
>
> I'm trying to convert the attached PDF to a PNG image. The resulting PNG
> contains a plain blue square instead of the illustration of the rabbit as shown
> in the PDF.
>
> I run the following code:
>
>              PDDocument pdfDocument = null;
>              pdfDocument = PDDocument.load("source.pdf");
>
>              PDFImageWriter pdfWriter = new PDFImageWriter();
>              boolean success = pdfWriter.writeImage(pdfDocument, "png", "", 1, 1,
>                      "result", BufferedImage.TYPE_INT_ARGB, Toolkit
>                      .getDefaultToolkit().getScreenResolution());
>              System.out.println(success);
>
> Which produces the following output:
>
> Dec 16, 2013 2:22:14 PM org.apache.pdfbox.util.PDFStreamEngine processOperator
> INFO: unsupported/disabled operation: BDC
> Dec 16, 2013 2:22:14 PM org.apache.pdfbox.util.PDFStreamEngine processOperator
> INFO: unsupported/disabled operation: EMC
> Dec 16, 2013 2:22:14 PM org.apache.pdfbox.util.PDFImageWriter writeImage
> INFO: Writing: kleurtjes-test1.png
> true
>
> What can I do to get the correct illustration in the resulting PNG? The issue
> occurs in both 1.8.3 (which also suffered a font-issue) and a fresh clone of the
> 2.0 git repo.
It's hard to say without any more information. Can you proviode us with the pdf
in question, e.g. by a download link (You can't post it here due to some
restrictions to the mailing list)?

> Thank you!
>
> Kind regards,
>
> Emiel Molenaar


BR
Andreas Lehmkühler


Mime
View raw message