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

Free Support Forum - aspose.com

Incorrect output while converting PDF to image - resolution issue

Hi,

I'm using Aspose.PDF to convert PDF documents to images. The image of the attached document doesn't generate correctly (it's cropped). As it turns out, the cropping depends on the resolution used when creating the image (larger resolutions result in more cropping).

When using this code, the image is generated properly:

var pdfPageEditor = new Aspose.Pdf.Facades.PdfPageEditor();
pdfPageEditor.BindPdf(pdfDocument);

using (FileStream imageStream = new FileStream("ouput.jpg", FileMode.Create))
{
Resolution resolution = new Resolution(150);
var jpegDevice = new JpegDevice(pdfPageEditor.GetPageSize(1), resolution);
jpegDevice.Process(pdfDocument.Pages[1], imageStream);
imageStream.Close();
}

But if I change the resolution value to 200, then the right part of the document is missing. If a larger value is used, the missing part is even bigger.

You can find attached the PDF document and the generated images.

Regards,
Dejan

Hi Dejan,


Thanks for contacting support.

We are working over this query and will get back to you soon. We are sorry for your inconvenience.

Hi Dejan,


I have tested the scenario and I am able to
notice the same problem. For the sake of correction, I have logged this problem
as PDFNEWNET-36463 in our issue tracking system. We will further
look into the details of this problem and will keep you updated on the status
of correction. Please be patient and spare us little time. We are sorry for
this inconvenience.

The issues you have found earlier (filed as PDFNEWNET-36463) have been fixed in Aspose.Pdf for .NET 9.5.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.