Hi,
I’m rendering Images from PDF for every page.
That’s quite a good feature, but why is it so slow?
That’s my code:
I insert every Image in an DocumentBuilder object to create a big document with images from PDF.
for (int i = 1; i < pdfDoc.Pages.Count; i++)
{
using (var msToSave = new MemoryStream())
{
Aspose.Pdf.Devices.JpegDevice image = new Aspose.Pdf.Devices.JpegDevice(60);
image.Process(pdfDoc.Pages[i], msToSave);
db.InsertImage(msToSave);
db.InsertBreak(BreakType.ParagraphBreak);
}
}
Do you have a hint for faster performance?
Hi Christian,
Thank you for sharing the details.
As per your performance related concern, it mostly depends on the contents of the PDF file. Please share your PDF file with us and your performance results so we can further test with the latest version of Aspose.Pdf for .NET v7.3 and see if performance can be further improved.
Thank You & Best Regards,
Hi,
I attached PDF file with 8 pages.
In my test enviroment it takes about 40 seconds to extract all imges to jpeg.
That’s quite a long time.
Hi Christian,
Thank you for sharing the template file.
I tested your issue with the latest version of Aspose.Pdf and as per my results, it takes around 23 seconds to convert all pages to image (I did not include the insertion to DocumentBuilder as that is not related to Aspose.Pdf.). Are you including the time of DocumentBuilder insertion process as well? If not, please share the details about your test environment so we can test the issue further.
Also, as 23 seconds seems more time for conversion of an 8 page PDF file, I have created an issue in our issue tracking system with issue id: PDFNEWNET-34233 for our development team to further investigate that whether the performance can be improved. We will notify you via this forum thread regarding any updates.
Sorry for the inconvenience,
The issues you have found earlier (filed as PDFNEWNET-34233) have been fixed in Aspose.Pdf for .NET 9.7.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.