PDF file printing delay

Hi Team,

We are using Aspose PDF Java library to generate PDF document which help of version #23.2 … The PDF documents generated are as expected however the rendering/generation of the pdfs one after another is causing a delay of 35 seconds now.

We did below few changes and were able to gain some benefit, now we stand at a delay of 20 seconds. But would like to have a discussion to see if we can achieve optimum results i.e. 0-5 seconds delay.

Form form = new Form();
form.bindPdf(outputPDFPath); //successfully generated the PDF copy
form.flattenAllFields(); // Flatten form fields by calling the flattenAllFields() function
String outputPDF = "D:\\data\\flatten.pdf";
form.save(outputPDF); //Saving the flatten PDF copy
form.close();

Thanks

@anandprog

Would you please share your sample PDF document for our reference as well? We will test the scenario in our environment and address it accordingly. Also, before sharing the file, please try using 23.11 version of the API.

Thanks for your reply.

Team ready to do share the mockup data PDF with upgraded version #23.11. But we need your information is there any paperwork needed to upgrade the version.

Because we are using licensing version with unique “SerialNumber”. For the current version #23.2.

Could you please suggest the steps we have to follow to get it done.

@anandprog

There are no such specific steps to upgrade the API version. You can simply upgrade the API version using NuGet Package Manager in Visual Studio. If expiry date of your existing license is higher than December 2023, you can use same license for the latest version as well. In case your license is expired, you can use a free 30-days temporary license. Please feel free to let us know in case you face any issues.

Hi Team,

As you requested , we did the upgrade activity and generated PDF documents in version #23.11.
Enclosed , please have a view on this and share your feedback on this.
1AN0000CALVM0123_20230608225224_D0000_PCG_OBACZ000094_VM_00_Dummy23.11.pdf (135.9 KB)

@anandprog

We used this document in our environment with 23.11 and 23.12 version of the API. We noticed that API took some milliseconds to complete the execution of the below code:

Form form = new Form();
form.bindPdf(dataDir + "1AN0000CALVM0123_20230608225224_D0000_PCG_OBACZ000094_VM_00_Dummy23.11.pdf"); //successfully generated the PDF copy
form.flattenAllFields(); // Flatten form fields by calling the flattenAllFields() function
form.save(dataDir + "flatten.pdf"); //Saving the flatten PDF copy
form.close();

flatten.pdf (135.8 KB)

Hi Team,

We have tried other approaches too and but no luck for us still we are getting slowness . Could you please suggest which one we have to follow and proceed to avoid maximum slowness.

0LAANACHAAY000000_20240101223742_D3917_PCJ_OL92N94E08C03_AS_44_23.11.pdf (158.1 KB)

com.aspose.pdf.Document doc = new com.aspose.pdf.Document(outputPDF);

FlattenSettings flattenSettings = new FlattenSettings();

flattenSettings.setApplyRedactions(false );

flattenSettings.setUpdateAppearances(false );

flattenSettings.setHideButtons(false );

flattenSettings.setCallEvents(false );

doc.flatten(flattenSettings);

doc.close();

@anandprog

Can you please share the environment details like JDK version, application type, installed RAM size and OS details?

Hi Team,
As you requested please find the below details,
JDK Version – JDK 11

Application Type – Java Standalone application (Spring Boot)

Installed RAM - 8 GB

OS Details – Windows 10 Operating System
Thanks

@anandprog

We are sorry for the trouble. We do need to replicate the same behavior of the API as it is showing at your side. The performance issues can be environment specific and they can be difficult to reproduce. Have you tried a simple console application with same code and JDK version? Is API taking same amount of time in console application? If so, we request you please share that application with us as well in .zip format so that we can test it in our environment.