Aspose.Words.Document saved a html file to word document with the incorrect format

Using Aspose.Words.Document to save a html file to word document, the created word document has incorrect format. I attached the html file and converted word document.

Hi Caifang,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you load the same html document in MS Word, you will get the same output.

In your case, I suggest you please increase the page width using PageSetup.PageWidth property or set the page orientation as landscape. I have attached the output document with this post for your kind reference.

Please let us know if you have any more queries.

Document doc = new Document(MyDir + "newTest2.htm");
// doc.FirstSection.PageSetup.Orientation = Orientation.Landscape;
doc.FirstSection.PageSetup.PageWidth += 50;
doc.Save(MyDir + "Out.docx");