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

Free Support Forum - aspose.com

Converting MHT files to HTML


Does anyone know how to make MHT file be properly converted to HTML document?
I try to convert it using Aspose.Words.Document:

Aspose.Words.Document doc = new Aspose.Words.Document(contentStream);
HtmlFixedSaveOptions option = new HtmlFixedSaveOptions();
option.SaveFormat = SaveFormat.HtmlFixed;
doc.Save(resultFileName, option);

But with no luck.

The initial file looks like this:

And converted one:

As you can see some problems rendering html have occured.

Hi Yuriy,

Thanks for your inquiry.

Please note that it is not guaranteed that Aspose.Words generated output HTML document will look exactly the same as the input MHT file. This is because Aspose.Words was originally designed to work with Microsoft Word documents and HTML documents are quite different. However, Aspose.Words’ HTML engine tries to mimic the way the Microsoft Word works. Could you please attach your input/output MHT/HTML files here for testing? I will investigate the issue on my side and provide you more information.

Best regards,

Hi awais.

I’ve attached both original MHT and converted html file.

Hi Yuriy,

Thanks for your inquiry. While using the latest version of Aspose.Words i.e. 13.3.0, I managed to reproduce a couple of issues on my side. I have logged the following issues in our bug tracking system.

WORDSNET-8159: Preserve HTML buttons during open/save
WORDSNET-8161: Preserve width of HTML input textbox during open/save

Your request has been linked to these issues and you will be notified as soon as these are resolved. Sorry for the inconvenience.

Best regards,