I have a dynamically generated html page which is designed to be printed.
I would like to create page breaks based upon div sections - where any given div - if it DO
The point of print-pagination, in my mind, is to not split things badly. And usually, what you want not to split badly most often is tabular data. So this is an approach that assumes you have changed the We want to mark headers and footers for the code to find, and we do not necessarily want them to appear right where they are described This invokes itself at page load, but could instead be called right before printing. We lay out the table to be paginated like this. We scan over the We mark headers and footers with css classes and keep track of the possibility of changing headers and footers by putting them at the locations in the row flow where they need to change, but keeping them invisible with another css class. Annoyingly some implementations of page breaking only apply to strictly "block" elements, so it is not defined on tbody. Therefore I have applied it to a groupings.
PAGE ONE HEADER
LATER PAGE HEADER (IF RELEVANT)
ROW GROUP 1
ROW GROUP N
FOOTER
's and stuff a footer and a header before any element that is destined to break across the end of a page.
tag class appended to each page table.