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

Free Support Forum - aspose.com

Bulleted list not being rendered as unordered list in HTML output

I have a document (attached), and when I save it as an HTML document, the bulleted list comes out as paragraph tags, not an unordered list as expected. Any ideas?

Expected Output:

    <li>Bullet list item 1</li>
    <li>Bullet list item 2</li>
    <li>Bullet list item 3</li>

Actual Output:

 <p>●        Bullet list item 1</p>
 <p>●        Bullet list item 2</p>
 <p>●        Bullet list item 3</p>

Sample code (Scala, not Java):

val options = new HtmlSaveOptions(SaveFormat.HTML)

for {
// Load the document.
asposeDoc <- Try(new AsposeDocument(file.getAbsolutePath))

// Convert to HTML.
_ <- Try(asposeDoc.save(htmlFile.getAbsolutePath, options))
} yield FileConversionResult(htmlFile, getSeqOfImages(imageDir.getPath))
Hi Jeremy,

Thanks for your inquiry. Please use HtmlSaveOptions.ExportListLabels property as ExportListLabels.BY_HTML_TAGS to get the required output. ExportListLabels.BY_HTML_TAGS outputs all list labels as HTML native elements.

Please let us know if you have any more queries.

Document doc = new Document(MyDir + "in.docx");

HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.HTML);


doc.save(MyDir + "Out.html", options);

That worked great! Thanks for the speedy response.