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

Free Support Forum - aspose.com

Aspose.Word Save As HTML with poorly displayed bullets

Good day,
I’m trying to save a DOCX document in HTML format. Bullets display incorrectly in one paragraph.
Instead of reflecting (This is how it is displayed in DOCX):
• Fs = 1 for 6 HCČs in operation
• s = 1.05 for 5, 4, 3 HCČ in operation
Numbering is displayed (this is how it is displayed in HTML):
1 Fs = 1 for 6 HCČs in operation
2 s = 1.05 for 5, 4, 3 HCČ in operation

This problem also appears differently in each browser. IE displays it correctly and Edge displays it incorrectly. Do you know what it could be?

@benestom

Could you please ZIP and attach your input Word document here for testing? We will investigate the issue and provide you more information on it.

I attach Word and HTML, You also have a difference in the form of screensDifWordHtml.zip (100.9 KB)

@benestom

We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22944. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thank you for your cooperation.

Good day,

can I ask if the fix is ​​already in the new version?

thank you for answer

@benestom Unfortunately, the issue is not resolved yet. The reason of the problem is that your document list has NumberStyle.Arabic style and "\xf0b7" (Bullet) NumberFormat. Such list is detected by Aspose.Words as ordered list (by NumberStyle.Arabic value) and is exported to HTML as ol HTML element with type="disc" attribute.
Looks like Chromium engine doesn’t allow "disc" value for type attribute in ol HTML elements and ignores this value, so such list is displayed as ordered list in Microsoft Edge and Chrome browsers.
As a temporary solution, you can correct the list in your document. For example see the following code:

Document doc = new Document(@"C:\Temp\in.docx");

NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true);
foreach (Paragraph p in paragraphs)
{
    if (p.IsListItem && 
        p.ListFormat.ListLevel.NumberStyle == NumberStyle.Arabic &&
        p.ListFormat.ListLevel.NumberFormat == "\xf0b7")
    {
        p.ListFormat.ListLevel.NumberStyle = NumberStyle.Bullet;
    }
}

doc.Save(@"C:\Temp\out.html");