Aspose Words load .mht file missing content

Hi,


I use below code to load a .mht file (this .mht file is saved from MimeContent of an email) and save as pdf. It’s success for most of my documents, but some of my document is missing some parts of content.

var word = new Document(@“input.mht”, new LoadOptions() { LoadFormat = LoadFormat.Mhtml});
word.Save(@“output.pdf”, new PdfSaveOptions());

I open .mht file by Notepad++ and notice all content after “-----Original Message-----” is lost.
If I remove this line, all whole file can save to pdf successfully.

I attached .mht file so that you can easier to reproduce.

I use Aspose.Words for .NET version 14.6.0.0, .NET 4.5, Windows 7

Appreciate to hear from you.

Thanks,
Dung
Hi Dung,

Thanks for your inquiry.

Please note that Aspose.Words mimics the same behavior as MS Word does. If you load the mhtml in MS Word, it will not open in MS Word. Please use a valid mhtml file.