Word toc page numbers not updated while pdf conversion

Hello,
I am trying out aspose word for possible use in project.I try to convert docm word documents to pdf

after pdf conversion I notice although fields and page numbers are updated as expected.
Index in TOC isnt updated and all index components are indexed as “1” which is incorrect.
The code that I Use is

string path = @“C:\testDocument.docm”;

LoadOptions loadOpt = new LoadOptions();
loadOpt.LoadFormat = LoadFormat.Docm;
Document doc = new Document(path,loadOpt);
doc.UpdatePageLayout();

doc.UpdateFields();

doc.Save(@“C:” + Path.GetFileNameWithoutExtension(path) + “.pdf”);

Since the project deals a lot with documents and it’s important to have correct word to pdf conversion.Is it something supported?

Hi Mandar,


Thanks for your inquiry. Could you please attach your input Word document and output PDF file showing the undesired behavior here for testing? We will then investigate the issue on our end and provide you more information.

Best regards,