Free Support Forum - aspose.com

Nested List Numbers are exported incorrectly in output HTML using .NET

Hello,

When saving a document with numbering to HTML format, some numbered elements have the wrong value (here the 3rd paragraph has the value “5”), and some are rendered outside the “< ol >” elements as plain text. (3.1.a, 3.1.b, 3.2, …)

files.zip (30.2 KB)

Can you please tell me where that went wrong ?
Thank you

@rle,

We have tested the scenario and 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-18990. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello,
Do you have any ETA for this correction please ?

Thank you

@rle,

Unfortunately, your issue is not resolved yet. We have completed the analysis of this issue but I am afraid, there is no ETA available at the moment. We will inform you via this thread as soon as this issue will be resolved in future or any estimates may be available.

We apologize for your inconvenience.

Hello,
This issue is still causing trouble to our customers.
Do you have any new information about a resolution date please ?
Regards,

@rle

We regret to share with you that there is no update available on this issue at the moment. We suggest you please set the value of HtmlSaveOptions.ExportListLabels property as ExportListLabels.AsInlineText to get the correct output. Hope this helps you.

Aspose.Words.LoadOptions loadOptions = new Aspose.Words.LoadOptions();
Aspose.Words.Document document = new Aspose.Words.Document(MyDir + "source.docx", loadOptions);

Aspose.Words.Saving.HtmlSaveOptions saveOptions = new Aspose.Words.Saving.HtmlSaveOptions(SaveFormat.Html);
saveOptions.ExportHeadersFootersMode = ExportHeadersFootersMode.None;
saveOptions.ExportImagesAsBase64 = true;
saveOptions.ExportListLabels = ExportListLabels.AsInlineText;
document.Save(MyDir + @"20.1.html", saveOptions);

@rle

Your issue (WORDSNET-18990) has been closed with ‘Won’t Fix’ resolution. More complex cases are always exported as HTML paragraphs with list numbers in plain text. So, please use HtmlSaveOptions.ExportListLabels property as suggested in my previous post.