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

Free Support Forum - aspose.com

ToC does not work properly

Hello.

In our app we generating Word document report by assembling objects from Aspose.Words namespace.
Sometimes using DocumentBuilder, but rather assembling (adding) object1 to object2Collection

What is the problem:
We have a lot of records which we want to generate to Word. Everything was perfect, except ToC. After generating the ToC and its lines were great, but the number of pages were not.

For example:
DataObjectA..................................16
DataObjectAMember1...........16
DataObjectAMember2...........16
DataObjectAMember3...........17
.........
DataObjectZMember100........200

The value of page numbers do not equals with page number where the DataObjects were. In real the DataObjectZMember100 is at page number 177 not 200.

For example: DataObjectB1..............23 is at page 24.

In document, after click into ToC, hit F9 and confirm the update it will update to correct numbers. Pretty weird.

Please let me know if the content of attached class is insufficient.

PS: I am afraid that i am not authorized to provide you generated document.

Please could you analyze this problem?

Thank you for your help.

Best regards,

Lukas Rada

Hi
Lukas,


Thanks for your inquiry. Could you please upgrade to the latest version of Aspose.Words i.e. 11.2.0 and let us know how it goes on your side? You can download the latest version of Aspose.Words from the following link:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

I hope, this will help.

Best Regards,

Hi Awais.


I tried on to generate document with Aspose.Words version 11.2.0.0, but it had the same effect.

Do you have any ideas where could be a problem? (PageSetup, PageLayout,… ?)
Hi Lukáš,

Thanks for sharing the code file. But, could you please create and attach here a simple little console application that enables us to reproduce this issue on our side? We will investigate the issue further and provide you more information.

Best Regards,