Hi there
(using Aspose.Total license for versions up to 24/11-2024 )
I have a project where i am attempting to use Aspose.PDF to generate a PDF from some given data in an array.
The pdf has a structure somewhat like this:
- A couple of pages of mostly text-fragments and tables
- A varying amount of pages consisting mostly of html-fragments inside tables (depends on the data given)
- an end page
The process of constructing the Document class containing the pdf is near-instant, but as soon as Document.Save is called, the process is very slow. I save to either a pdf or a MemoryStream.
Giving just a single line in the input data, takes around 2 seconds - and i am working in a scenario where we might have 100’s or 1000’s of lines
A single line, in my data, consists of at least 4 html-fragments, and some table formatting.
I have tried varying how i construct the data; but the look/positioning/coloring of the resulting pdf is under some very strict requirements.
I have attached a test-project i used to measure various amounts of entries. ( i removed the license, fill in with your own license in LicenseHandler.cs )
Using a single line as an entry (see Tester.cs line 26), it took 2½ second.
Using 10, around 5 seconds. Tried at 100 as well - one time it didnt finish, and another took 20 seconds.
Can you guys do an investigation on this performance issue?
Additionally - feel free to suggest better ways to structure my pdf/tables/html-fragments. I might be doing it inefficiently! And let me know if you need me to test anything.
I also found a somewhat related issue referred to in other places: PDFNET-44828 - maybe you can check on that and see if there is any similarities.
AsposeHtmlTesting.zip (138.4 KB)