Image Generation from PDF is very slow

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,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the details.

Well, 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,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

<o:p> </o:p>

Thank
you for sharing the template file.<o:p></o:p>

<o:p> </o:p>

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 DoumentBuilder 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.<o:p></o:p>

<o:p> </o:p>

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.<o:p></o:p>

<o:p> </o:p>

Sorry
for the inconvenience, <o:p></o:p>

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.