Convert HTML to PDF using Aspose.PDF for .NET - memory increase to 4GB

The above link is for v19.1 of Aspose.Words for JasperReports… ?? Is that related to Aspose.PDF shared libraries? As far as I can see, the high memory allocation issue still exists in Aspose.PDF for .NET v19.11. Every time a TextFragment is added to a paragraph, I see a memory jump of 1-3MB. A very small pdf with minimal text and a single page consistently allocates 2-300MB of unreleased memory based on my diagnostic tools. A 2-page PDF with several paragraphs allocates closer to 600MB. The memory usage alone would not be so alarming if it were eventually released, but I’m seeing this persist until a full application restart. Cleaning up any streams (like images) generated in our own code does not significantly help - the main area I’m seeing unreleased memory usage is TextFragment generation and manipulation.

@tony.morrow

Thanks for posting your inquiry.

The bug fix notification was related to Aspose.Words for JasperReports and it was posted due to some technical fault. We truly apologize for the misunderstanding. Furthermore, we have logged your concerns under the original logged ticket and will definitely take care of them during investigation. We will surely provide an update within this forum thread when issue is resolved. Please spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-44613) have been fixed in Aspose.PDF for .NET 20.2.

We are still seeing these issues in Aspose.PDF for .Net 20.4. Can you confirm if there are any other outstanding bugs causing this please?

@philipcrossland

The issue was resolved in 20.2 version of the API. Would you please confirm if this issue is happening again in 20.4 as regression?

It seems to still be happening in 20.4 and 20.2. The memory does not get released after conversion from HTML to PDF, even though any objects we use are disposed of.

@philipcrossland

We have logged your concerns along with the ticket and will surely re-investigate it. We will let you know as soon as we have some updates in this regard. Please spare us some time.

We did some memory profiling on our server. Please see attached image showing objects held in memory if this helps to further identify the issueAsposeMemoryProfile.PNG (110.9 KB)

@philipcrossland

We have logged the provided information along with the ticket and will share updates with you as soon as we have some.