Bullet points converted to Paragraph tag (<p>)

Hi,
I am using the Aspose.words for .Net for Word to HTML conversion.

When I perform the conversion then bullet points are being converted to

tags instead of ol, li tags. I want these bullet points to be converted into proper HTML tags for bullet points i.e. ol, li etc. I have attached the sample word file. Can you please have a look into it? thanks!

Regards,
Zeeshan

aaaa.zip (12.0 KB)

@znasir,

Thanks for your inquiry. Please use HtmlSaveOptions.ExportListLabels property as shown below to get the desired output.

Document doc = new Document(MyDir + "aaaa.docx");
Aspose.Words.Saving.HtmlSaveOptions options = new Aspose.Words.Saving.HtmlSaveOptions();
options.ExportListLabels = ExportListLabels.ByHtmlTags;

doc.Save(MyDir + "out.html", options);

Hi @tahir.manzoor,
Thanks for quick reply!

Unfortunately, it does not solve the whole problem. For example, I have attached a word file which contains a fancy bullet point and during conversion (word to html); this bullet point is being converted to type=“disc”. Can you please have a look into it and suggest a solution to fix this issue? thanks!

aaaa.zip (11.9 KB)

Regards,
Zeeshan

@znasir,

Thanks for your inquiry. You are facing the expected behavior of Aspose.Words. In your case, you need to use the ExportListLabels.Auto enumeration. However, if you want all list labels as HTML native elements (ul and li tags), please use ExportListLabels.ByHtmlTags.

If you are not satisfied with the output, please ZIP and attach your expected output HTML here for our reference. We will then provide you more information about it.