Hello.
If you convert the following DOCX file to HTML, certain number styling is broken.
Occurs in Aspose Words (Java) v24.2 but not in v23.6. Earliest occurrence is v23.7.
My understanding is ExportListLabels.AS_INLINE_TEXT should be used in this case, but instead ExportListLabels.BY_HTML_TAGS is being used instead. If I set this manually, regular bullet list formatting breaks.
Sample file:
numberedList.docx (14.2 KB)
Below is the expected and actual HTML produced, including screenshots.
Expected:
Actual:
Expected:
<html>
<body>
<div style="line-height:116%; font-family:Aptos; font-size:12pt">
<div>
<p style="margin-top:0pt; margin-bottom:8pt">
<span>Below is a numbered list.</span>
</p>
<p style="margin-top:0pt; margin-left:36pt; margin-bottom:0pt; text-indent:-18pt">
<span>1)</span>
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>First item</span>
</p>
<p style="margin-top:0pt; margin-left:36pt; margin-bottom:0pt; text-indent:-18pt">
<span>2)</span>
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>Second</span>
</p>
<p style="margin-top:0pt; margin-left:36pt; margin-bottom:0pt; text-indent:-18pt">
<span>3)</span>
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>Third</span>
</p>
<p style="margin-top:0pt; margin-left:36pt; margin-bottom:0pt; text-indent:-18pt">
<span>4)</span>
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>----</span>
</p>
<p style="margin-top:0pt; margin-left:36pt; margin-bottom:0pt; text-indent:-18pt">
<span>5)</span>
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>……………………</span>
</p>
<p style="margin-top:0pt; margin-left:36pt; margin-bottom:0pt; text-indent:-18pt">
<span>6)</span>
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>123456789</span>
</p>
<p style="margin-top:0pt; margin-left:36pt; margin-bottom:8pt; text-indent:-18pt">
<span>7)</span>
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span> </span>
</p>
</div>
</div>
</body>
</html>
Actual:
<html>
<body>
<div style="line-height:116%; font-family:Aptos; font-size:12pt">
<div>
<p style="margin-top:0pt; margin-bottom:8pt">
<span>Below is a numbered list.</span>
</p>
<ol type="1" class="awlist1" style="margin:0pt; padding-left:0pt">
<li style="margin-left:36pt; text-indent:-18pt">
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>First item</span>
</li>
<li style="margin-left:36pt; text-indent:-18pt">
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>Second</span>
</li>
<li style="margin-left:36pt; text-indent:-18pt">
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>Third</span>
</li>
<li style="margin-left:36pt; text-indent:-18pt">
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>----</span>
</li>
<li style="margin-left:36pt; text-indent:-18pt">
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>……………………</span>
</li>
<li style="margin-left:36pt; text-indent:-18pt">
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span>123456789</span>
</li>
<li style="margin-left:36pt; margin-bottom:8pt; text-indent:-18pt">
<span style="width:7.33pt; font:7pt 'Times New Roman'; display:inline-block"> </span>
<span> </span>
</li>
</ol>
</div>
</div>
</body>
</html>