We generate a pdf file from scratch. Also included the resulting pdf file.Report_ASPOSE.pdf (2.6 MB)
I also included the same pdf file but generated with an very old iText version (2.1.7). Report_ITEXT.pdf (801.7 KB)
The reason:
We have a critical performance issue with Aspose!
The resulting PDF is three times the size
Generating the report (save()-method) also takes almost three times the time as when generating with iText.
We have to maximize the heap size to 512MB, otherwise we get an outofMemory Exception and no report can be generated. This was not the case with iText.
What we also experienced: When opening the Aspose-PDF then saving again, the file size is shrunken!
There must be some things which are saved in the pdf which are not necessary?!
The really critical blocker issue is with 2.
We can also provide code for analysis to you, but not as runnable because we have a multi module project
which the aspose pdf generator is one of them.
I hope you can help
Would you please share SSCCE code so that we may try to reproduce and investigate it in our environment. Before sharing requested data, please ensure using latest version of Aspose.PDF for .NET API.
@Farhan.Raza
I did my best to extract the code with the aspose components for generating the report.
Here you have a runnable maven module asposeTest.zip (211.2 KB)
Attention: you have to add a license file in license folder.
We use version 18.12 and I tried version 19.1 what changes nothing.
For Java we use jdk1.8.0_191
Hint: if i change the second for-loop in the method ‘writeServiceProtocolList’ from 9 to 10 then i get an empty pdf-file.
We have logged a ticket with ID PDFJAVA-38313 in our issue management system for further investigations. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.
Hallo and thanks for investigating the problem.
Are there any news?
What we also observed:
When we do NOT use RadioButtonOptionField in our Reports but only CheckboxFields, we can reduce the resulting file size from ~3,5MB to ~ 1,7MB and also the creation time is reduced:
However, there is a nullpointer thrown when calling setChecked()? Please have a look:
CheckboxField chkbx = new CheckboxField();
chkbx.setName(name);
chkbx.setHorizontalAlignment(HorizontalAlignment.Center);
chkbx.setWidth(8.5);
chkbx.setHeight(8.5);
We are afraid that scheduling logged ticket may take some time owing to previously logged and critical tickets. Moreover, please share a narrowed down code snippet replicating the behavior of CheckboxField so that we may proceed further to help you out.
Please note that the issue has recently been logged in our issue management system and may take some months before it is scheduled, owing to previously logged tickets. For further information about paid support, you may create a post over Purchase Forum or contact our sales team.