To apply CSS page-break to print a table with lots of rows, we set the page-break-inside
and page-break-after
property.
For instance, we write
table {
page-break-inside: auto;
}
tr {
page-break-inside: avoid;
page-break-after: auto;
}
to set the page-break-inside
property to auto
to let the browser decide where to add the page break.
And we set page-break-inside
to avoid
to stop page from breaking in the table row.