1 year ago
#366887
Prashant
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);
java
xhtml
docx4j
0 Answers
Your Answer