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

Free Support Forum - aspose.com

Bullets aligned wrong in converted HTML

Hello

Attached you find an example application converting a docx to html.
The word contains three lists, the middle “List2” bullet is a square.
In the resulting html the List2 is aligned wrong.

In the Word document:
WordDocument.png (2.0 KB)

The converted HTML in the Internet Explorer:
HTMLDocument.png (1.4 KB)

Demo Application:
demo-application.zip (11.9 KB)

@phe,

We have converted your ‘Document.docx’ to HTML by using MS Word 2016; is this MS Word 2016 generated HTML acceptable for you?

We have also generated a HTML file by using the following option of Aspose.Words, is this acceptable for you?

HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.HTML);
opts.setExportPageMargins(true); 

See html-outputs.zip (1.4 KB)

Well no, the indent of the MS Word 2016 output is visibly wrong, but at least the bullets are aligned correctly.

The setExportPageMargins() option does not really change the align of the bullets, only adds a margin to the document.

Since aspose words imitates the MS Word behavior, could you fix the alignment of the bullet. But leave the correct indent?

@phe,

For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-17631. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

@phe,

Regarding WORDSNET-17631, we have completed the work on your issue and concluded to close this issue as Not a Bug. Please see the following analysis details:

Unfortunately, we cannot fix alignment of native lists in Internet Explorer, and can only suggest a workaround to this issue.

Please note that MS Word never produces native HTML lists on HTML export, so documents produced by Aspose.Words with ExportListLabels.AsInlineText look closer to what MS Word generates. You can use the following code:

saveOptions.ExportListLabels = ExportListLabels.AsInlineText;