I'm trying to prevent table lines splitting between document pages.
current result :
in case that specific 'signer' table rows is outside of page size, table rows are splitting to next page.
example:
[img]
[/img]
desire result:
the entire 'signer' table, with all it's rows, will move to next page.
can you please assist?
my code:
- Code: Select all
Table table = section.addTable();
for (Object obj : table.getRows()) {
TableRow tableRow = (TableRow) obj;
for (Object obj1 : tableRow.getCells()) {
TableCell tableCell = (TableCell) obj1;
for (Object obj2 : tableCell.getParagraphs()) {
Paragraph paragraph = (Paragraph) obj2;
paragraph.getFormat().setKeepFollow(true);
}
}
}
table.getTableFormat().isBreakAcrossPages(false);
thank you