How to retrieve the unordered list styles from word document using aspose

How to retrieve the unordered list bulleting style type from word document using aspose. I want to retrieve the different list style types
Bulleting

  • Test1
  • Test2
  • Test3

• One
• Two
• Three

o Alpha
o Beta
o Gama

Thanks

@mailtopriya23 You can get the bullet symbol used for unordered list using ListLevel.NumberFormat. Alternatively, you can call Document.UpdateListLabels and then use Paragraph.ListLabel property.

@alexey.noskov,

After retrieving the number format, is there a way to map this with the list-style-type property in CSS?

Eg: <ul list-style-type='-' >
- Test1
- Test2
- Test3

@mailtopriya23 list-style-type is not <ul> element attribute, it is css style attribute and should be specified like this:

<ul style="list-style-type:circle"></ul>

Please see the following link for more information:
https://www.w3schools.com/cssref/pr_list-style-type.php

Once you get the list item symbol, you can map it to the appropriate list-style-type value. Upon exporting document to HTML, Aspose.Words does this and the list looks like this in HTML:

<ul type="disc" style="margin:0pt; padding-left:0pt">
	<li style="margin-left:28.06pt; padding-left:7.94pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''">
		<span style="font-family:Calibri">test</span>
	</li>
	<li style="margin-left:28.06pt; margin-bottom:8pt; padding-left:7.94pt; font-family:serif; -aw-font-family:'Symbol'; -aw-font-weight:normal; -aw-number-format:''">
		<span style="font-family:Calibri">test</span>
	</li>
</ul>
<p style="margin-top:0pt; margin-bottom:8pt">
	<span style="-aw-import:ignore">&#xa0;</span>
</p>
<ul type="circle" style="margin:0pt; padding-left:0pt">
	<li style="margin-left:29.6pt; padding-left:6.4pt; font-family:serif; -aw-font-family:'Courier New'; -aw-font-weight:normal; -aw-number-format:'o'">
		<span style="font-family:Calibri">test</span>
	</li>
	<li style="margin-left:29.6pt; margin-bottom:8pt; padding-left:6.4pt; font-family:serif; -aw-font-family:'Courier New'; -aw-font-weight:normal; -aw-number-format:'o'">
		<span style="font-family:Calibri">test</span>
	</li>
</ul>

@alexey.noskov
If I have bulleting with Circle Style how do we read the value from the word document and map to html format using java. For Ordered list we have NumberStyles. Do we have something similar for unordered list to map the symbol?

@mailtopriya23 The is no such property for bulleted list, you can only get the symbol used as bullet using using ListLevel.getNumberFormat() or by calling Document.updateListLabels and then using Paragraph.getListLabel() property.