PDF file open/flatten/save MUCH slower than competitor

Hello, we would like to use Aspose.PDF to replace a competitor’s product (which I won’t name here), but we are running into a surprising performance difference between the two. Specifically when we open and save fillable PDFs, Aspose.PDF is substantially slower than the other product.


Please see this snippet of C# code:
for (int i = 0; i < 10; i++)
{
Aspose.Pdf.Facades.Form form =
new Aspose.Pdf.Facades.Form(@“c:\AsposeTest\My_Form.pdf”);
form.FlattenAllFields();
form.Save(@“c:\AsposeTest\My_Form_” + i + “.pdf”);
}
This takes approximately 19 seconds to run for ~1MB file; whereas the same functionality on the same file in the competing product takes approximately 0.1 second. While our preference is to use Aspose.PDF, such slow performance is a showstopper – particularly for high volumes of PDFs.

Are we doing something wrong, or are there other options for optimizing this process? Thanks for your assistance.

Hi Ryan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.Pdf for .NET.

Well, could you explain the scenario a bit more and share your template PDF file with us to test the issue. Also, in your code you are opening the same file and saving it 10 times (in a loop) which I am not able to understand. Please provide us further details so we can reply you accordingly.

Sorry for the inconvenience,

This is just a small snippet of the entire code in our application. I have narrowed the issue down to this simple code sample to demonstrate the problem. You’re right, I am doing the same thing in this sample 10 times just to highlight the performance difference. If I only had to do this 1 time, I probably wouldn’t care too much but in real life I might open a file, populate the fields with different data each time, and save it with a different name thousands of times.


Any file I have tried has this problem, but if you need an example, feel free to download this file as an example fillable form: http://www.irs.gov/pub/irs-pdf/f1040.pdf

Hi Ryan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details.

I tested your file and following are my results with the latest version of Aspose.Pdf for .NET v7.5.

1: If we open the file in the loop, it takes around 4.6 Seconds.

2: If we open the file once before the loop, it takes around 1.9 Seconds.

Now, if you have the same form which you want to fill again and again with a different data, you can open the file once before the loop as this will certainly improve the performance. Also, please download the latest version and try it with your test application and let us know if it improves the performance at your end. Also, in case you have any different scenario, please let us know and we will appreciate if you can share your test application and test data with us as well. This will help in performance improvement as well.

Sorry for the inconvenience,

Sorry but that is still much too slow. I need saves to be <1 second. Please let me know if this is possible with Aspose.PDF. If it is not possible, we will have to pursue other options. Thanks.

I see the same issues, but not with 19 seconds.


In our cases forms flatten takes 2,5 seconds. Also the converting to PNG tooks a lot of times.

Aspose should really invest in making the opening of files much faster. I think this is the main problem I see against competitors.
Some competitors are faster but their output is more worse. They often have tuning for image conversion.


What’s about the roadmap of the pdf library? Any plans to invest some time in speeding the library up?


Hi Ryan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

For further investigation regarding performance enhancement, I have created an issue in our issue tracking system with issue id: PDFNEWNET-34544. Our development team will further look into it and we will update you via this forum thread regarding any progress.

Sorry for the inconvenience,

Any updates on this? It’s been almost 3 weeks since I opened this issue. Thanks.

Hi Ryan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Our development team is working on your issue and I have asked them to share an ETA regarding the resolution of your issue. As soon as I get a feedback, I will update you via this forum.

Also, if possible, please share with us the name of the competitor product you are currently using as it will help us in understanding how we can further improve the process.

Sorry for the inconvenience,

ActivePDF Toolkit.

Hi Ryan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the feedback.

I will update you via this forum thread once a receive a feedback from the development team.

Sorry for the inconvenience,