Page break within a table component
mpsbhat opened this issue · 2 comments
mpsbhat commented
Namaste,
I'm checking some conditions to have a pagebreak within a table after a particular row count. Below is a sample code for the reference.
var dd = {
content: [
{
table: {
dontBreakRows: true,
headerRows: 0,
body: [
['row Header', 'column B'],
['row 1', 'column B'],
['row 2', 'column B'],
['row 3', 'column B'],
[{text: '', pageBreak: 'after'}, ''],
['row 4', 'column B'],
['row 5', 'column B']
]
}
},
]
}
In the above sample when i comment headerRows: 1,
in table definition then it breaks the table to next page as expected. But when headerRows: 1,
is enabled then there is an extra blank page appends soon after breaking the table to next page. Any possibilities to handle this case to avoid the extra blank page?