I am facing an issue while generating the docx file using apache poi library.
I have multiple tables of variable sizes to be included dynamically in the document.The issue is that table gets splited between the pages.My requirement is to prevent the table from splitting between the pages.In poi library i found the method table.getRow(0).setCantSplitRow(true); but does not changes anything.Any suggestions for how to implement this.Thanks in advance.
Try using Table Row Function :
**setCantSplitRow(boolean split)
This attribute controls whether to allow table rows to split across pages.**
tableRow.setCantSplitRow(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With