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

Free Support Forum - aspose.com

Missing part of TOC data (Aspose Word Java)

Dear Sir


I find that the generated Table of Content is missing starting from the heder CON4.D010.7 in attached file which is using Aspose Library to generate the TOC. Please help.

Regards
Laurence
Hi Laurence,

Thanks for your inquiry. Please call the Document.updateFields method before saving the document. Hope this helps you.

If you still face problem, please create a simple Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing. We will investigate the issue and provide you more information on this.

Hi


Here is the source code for my testing.

FileInputStream fis = new FileInputStream(“C:\TEMP\CON-17B_MostUpdated_11032017.docx”);

Document doc = new Document(fis);
doc.updateFields();
doc.save(“C:\TEMP\a.docx”);


The problem still occur after apply document.updateFields() method

Regards
Laurence
Hi Laurence,

Thanks for sharing the detail. We have tested the scenario using latest version of Aspose.Words for Java 17.4 and have not found the shared issue. Please use Aspose.Words for Java 17.4. We have attached the output document with this post for your kind reference.