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