We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Endless Loop resulting to major Memory (RAM) usage and server breakdown while Converting HTML to PDF in C#

We would like to state that we have a business support contract for this year but because the reseller is not responding to us we are not able to provide these details. We are Munich Re and you can please google us and you would believe that such a big company will not lie about such a small thing. So we would really appreciate a contact person from Aspose who can help us with this major issue.

The problem Description:
While converting one specific HTML file in Aspose.PDF we experience that it moves to an endless loop making the memory increase exponentially. I am afraid we can not share the HTML file here but if you contact us and after signing a NDA we will be able to share it.

public void Convert()
MemoryStream input = new MemoryStream(File.ReadAllBytes(“Mailbody.htm”));
MemoryStream output = new MemoryStream();

Aspose.Pdf.HtmlLoadOptions options = new Aspose.Pdf.HtmlLoadOptions();

//Here the endless loop starts
Document pdfDocument = new Document(input, options);

pdfDocument.Save(output, Aspose.Pdf.SaveFormat.Pdf);

using (FileStream file = new FileStream(“output.pdf”, FileMode.Create, FileAccess.Write))

image.png (105.0 KB)

Looking forward to hearing from you.

Himanshu Saxena
Solution Architect
Munich Re


Would you please share your sample HTML file in .zip format with us? We will test the scenario in our environment and address it accordingly.

Hi Asad, I have to check internally if I am allowed to send you the HTML file. I am even not sure about a NDA between Aspose and us. Is there shared drive where we can upload the file?


We would like to share with you that NDA is already a part of EULA that you agree while purchasing the subscription of the API. We do not disclose your files or documents with anyone and we use them only for testing purposes. These are erased from our system as soon as the issue is fixed. Furthermore, the files shared in this forum thread will only be accessible by you and Aspose Staff.

In case the file size is larger, you can upload it to Google Drive or Dropbox and share the link with us in a private message. You can send a private message by clicking the top-left button in the post editor while replying to this post.

Did you receive the file?


Yes, we received the file. We are testing the scenario and will share our feedback shortly.

thanks Asad, now I have access to the Aspose paid support. Should I open a ticket there too or should we just let it be here in the free support?

Hi Asad, Any Updates.


Thanks for your patience.

We were able to replicate the issue in our environment while using Aspose.PDF for .NET 22.1. Therefore, we have logged an issue as PDFNET-51277 in our issue tracking system for further investigation. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

In case you need to get this issue resolved on urgent basis, you can surely create a topic in paid support forum with the reference to the ticket ID we share with you. Your issue will be escalated to the highest priority.

Thanks Asad. I have created the issue in Paid support too. #175798


We have checked the ticket status and it has been raised to the priority support. You will get further updates in respective paid support ticket.

1 Like

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