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

Free Support Forum - aspose.com

How to implement exporting of bullet lists as UL and LI tags to HTML


Using Aspose Words

I am exporting documents to HTML and bulleted lists do not wrap with the same indenting on the left. The first line indents appropriately in relation to the bullet, but when the text wraps the wrapped lines do not indent, the move all the way to the left. I have read that this is due to how lists are created in order to support nested lists. However, I noticed in the release notes for Aspose Words 11.10.0 (https://www.nuget.org/packages/Aspose.Words/11.10.0) that this issue was addressed in the following feature:

WORDSNET-6930 Export Bullet lists as UL and LI tags to HTML

My issue is that I can’t figure out how to implement this feature. My bullets are still exporting with the issue even though I am using a version of the product that should include this feature. I need bulleted lists exported using the standard HTML

  • mark up.



Update: examining the markup reveals that it is outputting the expected UL structure in the HTML. However, the styles applied to the

  • elements are causing the undesirable behavior. Is there any way to control this from the API?

Hi Bill,

Thanks for your inquiry. Please use HtmlSaveOptions.ExportListLabels to controls how list labels are output to HTML, MHTML or EPUB. See the following code example for your kind reference.

Document doc = new Document(MyDir + "in.docx");
HtmlSaveOptions options = new HtmlSaveOptions();
options.ExportListLabels = ExportListLabels.ByHtmlTags;`
doc.Save(MyDir + "Out.html", options);

If you still face problem, please share following detail for investigation purposes.

  • Please attach your input Word document.
  • Please attach the output HTML file that shows the undesired behavior.
  • Please
    attach your target HTML document showing the desired behavior.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.