Word Automation Service breaks links in table of contents

273 views Asked by At

I have written a code which utilizes Word Automation Service in order to convert the .DOCX file to the .PDF. I have noticed that in case the Word document contains a table of contents, its links are removed in the PDF. This is very bad for my business case.

On the other hand, manually opening MS Word and saving the same document as PDF preserves the links in the table of contents. This is the behavior I am looking for, but I want to keep my code independent form having MS Office Word installed on the machine running my code.

Has anyone had the similar issue and was anybody able to resolve it?

1

There are 1 answers

0
hendrik sudianto On

In my case, i found out that this is something related to Job Settings property. Try to comment or remove this line of code if you have one:

jobSettings.UpdateFields = true;