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

Free Support Forum - aspose.com

Doubled numbering in list

We have a document which, when we convert to HTML then to PDF, shows double levels of
numbering.Test- Run NDA.docx (35.8 KB)

See the output here: output_aspose.pdf (183.6 KB)

For example:
2 TITLE
2.1

would become

2 2 TITLE
2.1 2.1

Here is the HTML generated from docx:

<h1 style="margin-top: 0pt; margin-left: 21.6pt; margin-bottom: 0pt; text-indent: -21.6pt; text-align: justify; page-break-after: avoid; font-size: 11pt; -aw-import: list-item; -aw-list-level-number: 0; -aw-list-number-format: '%0'; -aw-list-number-styles: 'decimal'; -aw-list-number-values: '2'; -aw-list-padding-sml: 14.6pt;"><span style="-aw-import: ignore;"><span style="font-family: Candara; font-weight: normal;">2</span><span style="width: 14.6pt; font: 7pt 'Times New Roman'; display: inline-block; -aw-import: spaces;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Candara; font-weight: normal;">DUTY OF CONFIDENTIALITY</span></h1>
<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; font-size: 11pt;"><span style="font-family: Candara; -aw-import: ignore;">&nbsp;</span></p>
<h2 style="margin-top: 0pt; margin-left: 28.8pt; margin-bottom: 0pt; text-indent: -28.8pt; text-align: justify; page-break-after: avoid; font-size: 11pt; -aw-import: list-item; -aw-list-level-number: 1; -aw-list-number-format: '%0.%1'; -aw-list-number-styles: 'decimal decimal'; -aw-list-number-values: '2 1'; -aw-list-padding-sml: 11.31pt;"><span style="-aw-import: ignore;"><span style="font-family: Candara; font-weight: normal;">2.1</span><span style="width: 11.31pt; font: 7pt 'Times New Roman'; display: inline-block; -aw-import: spaces;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Candara; font-weight: normal;">The Receiving Party agrees that the Confidential Information shall be kept strictly confidential and shall not be sold, traded, published or otherwise disclosed to anyone in any manner whatsoever, including by means of photocopying or reproduction, without the Disclosing Party&rsquo;s prior written consent (which shall not be unreasonably withheld) except as provided in paragraphs 2.2 and 2.3 below.</span></h2>

Note that by removing the -aw-lists parts of the HTML, the PDF export is properly done.

Is there any way for this to be correctly done?

We are using Aspose 21.11

@concord_tech I cannot reproduce your issue on the latest Aspose.Words 22.2 version. Here is output from my side output.awjava.22.2.zip (88.5 KB). Please upgrade the Aspose.Words to the latest version. If the problem persists after the update, please share a code example with your conversion scenario.