Numbering in Word Doc

Hello,

Good morning,

First of all thanks for good product. It is working fine in our project.

We are facing 1 minor issue, with respect to numbering in Word Doc. Attached is the sample word Document. i.e. it contains 3 numbered points.

Generating 1 page PDF from ASPoSE word doc is OK. It has no issues.

If We generate 2 page PDF for this document with ASPOSE word family. Number are continued in next page. We will like to reset this numbers on every page i.e. number should always restart from 1 on each page. What we can do to achieve the same

Attached is also generated 2 page PDF.

Sample code is simple:
We are overriding 2 functions private boolean isEof() throws Exception {} and public boolean moveNext() throws Exception {} to produce 2 page pdf.

We are using version 13.8.0.0

Waiting for earlier reply.

Hi Krishna,


Thanks for your inquiry. You’re using a very old version of Aspose.Words. I would suggest you please upgrade to the latest version of Aspose.Words (14.9.0) and see how it goes on your end. I hope this helps.

In case the problem still remains, please share the complete source code you used to generate this two page PDF here for testing. We will investigate the issue on our end and provide you more information.

Best regards,

Hello Hafeez,


We have taken latest version and still issue is there.
Also shared is source code for producing 2 Page PDF for overview
I think you can use also any test program me to produce 2 page PDF. It will give you same result.
Request you to please share how we can correct that.

Please take sample word doc from earlier mail



Hi Krishna,


Thanks for your inquiry. Does this problem also occur when saving final output to a Word document? Could you please also generate a 2 page DOCX file using your code and attach it here for our reference.

Best regards,

Hello,


As requested attached is the generated word docx file.
It has also same behaviour as pdf file

thanks and regards
Deepak Aneja

Hi Deepak,


Thanks for the additional information. You can workaround this problem by using any of the following ways:

  1. Insert a { LISTNUM \s 0 } field for unnamed and each named list at the end of region or template. Use hidden font to hide it from template. (please try your code on attached modified template document)
  2. Insert a { SEQ s \r 0 } field for each sequence at the end of region or template. Use hidden font as well.

Inserting a LISTNUM field will reset list numbering, whether it is defined by paragraph list properties or by means of the LISTNUM fields. The only exception is the AUTONUM field that is not affected by LISTNUM. There is no technical possibility to reset AUTONUM fields. Nevertheless, AUTONUM is considered legacy, so this limitation is acceptable.

Your request has also been linked to the appropriate issue (WORDSNET-1860) in our issue tracking system and you will be notified as soon as it is resolved in Aspose.Words API. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-1860) have been fixed in this Aspose.Words for .NET 19.12 update and this Aspose.Words for Java 19.12 update.