Free Support Forum -

Builder.InsertHtml does not respect Right Margins

When I use the following the margins on the right side of the document are not respected( text goes off page)
I have tried setting the margins in code with no success, I have tried using saveOPtions (pretty format) no success. I can provide the html file if needed.

Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder db = new DocumentBuilder(doc);
string html = File.ReadAllText(“C:\temp\margins.html”);
db.InsertHtml(html, true);
doc.Save(“C:\temp\myfile.docx”, SaveFormat.Docx);


Thanks for your inquiry. Please ZIP and attach your input HTML document here for testing. We will investigate the issue on our side and provide you more information.