Calling updateFields make TOC link as bold

Table_of_Contents.zip (22.9 KB)

please run this code for the attached document

String inputFileName = “Table_of_Contents.docx”;
String outputFileName1 = “Table_of_Contents1.pdf”;
String outputFileName2 = “Table_of_Contents2.pdf”;

    com.aspose.words.License license = new com.aspose.words.License();
    license.setLicense(Thread.currentThread().getContextClassLoader().getResourceAsStream("Aspose.Words.lic"));
    Document doc = new Document(inputFileName); 
    doc.save(outputFileName1);
	doc.updateFields(); 
	doc.save(outputFileName2);

please note the difference between two files before and after updateFields, the TOC links are bold after updateFields()

@pjanardhan

Thanks for your inquiry. We have tested the scenario using Aspose.Words for Java 17.8 and unable to notice the reported issue. Please download and try latest version of Aspose.Words for Java, it will resolve the issue.

Test_AW178_1.pdf (31.1 KB)
Test_AW178_2.pdf (31.1 KB)