In this example project we have few key objectives:
- we have to use our super/hyper docx template from our legal/report/whatever deparment,
- we have many rows which do not fit on one page,
- we need to repeat header on every page,
- we have many collumns which do not fit on one page,
- we need to generate another table starting from new page, if collumns do not fit on one page.
This solution:
- reads docx file with docx4j,
- finds template table,
- clears template,
- splits data into portions that fits on one page,
- generates every table with maximum of data,
- starts new table on new page if there is more data to write,
- at the end it is clearing possibly blank colls.
Dependencies:
- org.docx4j - docx4j