I repeat the list of objects. With each iteration, I create and populate a table containing the contents of one page.
I use CSS to add a page break after each table.
table { page-break-after: always; }
This works fine, except that I always get the last blank page. I assume this is due to the last iteration of the table using page break.
I tried.
table { page-break-after: always; }
table { page-break-after: auto; }
table { page-break-after: left; }
table { page-break-after: right; }
However, I always get this blank last page.
Is there any other way to insert page breaks that would not create a blank last page?
Or maybe some way to determine if the last iteration is, and not insert the last page break?
source
share