We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Incorrect pdf to image rendering

We are doing pdf to image conversion using Aspose.Pdf for Java.

For the pdf in the attachment, the background image is not rendered properly when we execute the following code or variants:

com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("test.pdf");

com.aspose.pdf.devices.Resolution resolution = new com.aspose.pdf.devices.Resolution(300);

JpegDevice jpegDevice = new JpegDevice(resolution, 100);

Page page = pdfDocument.getPages().get_Item(1);
java.io.OutputStream imageStream = new FileOutputStream("target/Converted_Page1.jpg");
jpegDevice.process(page, imageStream);

The incorrectly rendered image is also in the attachment.

How can we solve this problem so the image is properly rendered?

Hi Steffen,

Thanks for your inquiry. I have tested the scenario with Aspose.Pdf for Java 10.6.1 and unable to notice the reported issue, please find attached resultant image. Please download and try latest version of Aspose.Pdf for Java, it will resolve the issue.

Please feel free to contact us for any further assistance.

Best Regards,