Conversion to PNG hangs

I was using Aspose.Words to convert the output of Apose.Emails to images. That stopped working with a bug in Aspose.Words (I am assuming). As I have just updated the project to the latest dll’s, I saw there was Apose.HTML, and that it is supposed to be able to convert mhtml to png. I tried the example, and tried it against an HTML file and it worked fine. When I tried it against a mhtml file, it just hangs. Nothing happens. I admit I only allowed it a few minutes, but that is way more than I can allow it to run. So effectively it doesn’t work. Here is the code:

Dim msg As Aspose.Email.MailMessage
Dim LoadOptions As New Aspose.Email.MsgLoadOptions()
msg = Aspose.Email.MailMessage.Load(DocFile, LoadOptions) ’ , New Aspose.Email.Mail.MsgLoadOptions())
msg.Save(SaveFolder & “MSG.mhtml”, Aspose.Email.SaveOptions.DefaultMhtml)

Dim htmlDoc As Aspose.Html.HTMLDocument
htmlDoc = New Aspose.Html.HTMLDocument(SaveFolder & “MSG.mhtml”)

It never gets past the last line.

How do I get this working? Is the mhtml generated by Aspose.Email able to be opened by Aspose.HTML?

I have also taken a regular E-Mail in Outlook, and saved it to mht. I tried to run this through your example program that makes images, and it also just stops responding. So it looks like Aspose.HTML doesn’t support mhtml.


Thank you for contacting support.

Aspose.HTML for .NET API supports MHTML file format. Would you please ensure using Aspose.HTML for .NET 19.5 in your environment. In case the issue persists then please share your sample MHTML and MHT file as ZIP so that we may try to reproduce and investigate further.


Attached are is an MSG file that I used Aspose.Emails to convert to mhtml. I have also attached the mhtml file that won’t open.

I am using the lastest Aspose dll’s. (163.6 KB)


We have been able to reproduce the issue in our environment. A ticket with ID HTMLNET-1931 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.