we are currently testing outputting a document composed of many merged template
- document 1
- document N
The documents from 1 to N then use the styles which are used by the TOC to build itself; the final document is about 400 pages long.
Before saving the document to disk, it is “cleaned up” like this:
full.updateFields(); full.updatePageLayout(); full.setAttachedTemplate(""); full.setAutomaticallyUpdateSyles(false);
However, even explicitely calling
save() seems to have no effect on the TOC.
How do I get the TOC to be correctly updated when the document is first opened? This is especially an issue if the document is saved as PDF, because then no fields can be manually updated anymore.