'Docx4j TOC generation getting wrong page number
I'm using docxj4 for generating Word documents, and now I need to generate a table of contents. I am using docx4j-export-fo library for that purpose. But it produces the wrong numbering. I need to start the toc from page number 4 and pass the start index accordingly to the toc generator method. But still, I am getting the wrong page numbers into the TOC. Any suggestion to solve it. Thanks
TocGenerator tocGenerator = new TocGenerator(wordMLPackage);
tocGenerator.generateToc(PASS_SOME_INDEX_HERE, TocHelper.DEFAULT_TOC_INSTRUCTION, false);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
