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

Free Support Forum - aspose.com

Export to HTMLFixed: Remove empty paragraph and Left aligned


We have implemented export to html with htmlfixed option. We have requirenment to remove empty paragraph and export should be left aligned from the html . I have attached the expected html output and docx .

let us know if any solution to achieve this.



Hi Rathinam,

Thanks for your inquiry. Please use the following code to remove empty paragraphs (which are not contained inside Tables) from document before saving to HTML.

Document doc = new Document(MyDir + @“OT.docx”);

foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))


if (para.ChildNodes.Count == 0 && para.GetAncestor(NodeType.Table) == null)



HtmlFixedSaveOptions options = new HtmlFixedSaveOptions();

options.ShowPageBorder = false;

doc.Save(MyDir + @“outNormal.html”, options);

Secondly, we will provide an option to specify horizontal alignment of Page in HtmlFixed format in future. I have logged this requirement in our issue tracking system. The Id of this issue is WORDSNET-10277. Your request has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-10277) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.