Paged media CSS doesn't support more complex page header/footer requirements, like tables. A solution to this is to create a separate page with such a header, and merge this into the PDF on the required pages. A proof of concept was written by pikhovkin in this Gist.
Overlay
: Represents one HTML page to be overlaid on a PDF document.
template_name_or_list
: the name of the HTML template, which is resolved with jinja2's get_or_select_template method.fn_include_on_page
: a function that takes a 0-based page number, and returns a boolean that indicates if it needs to be included on that page.kwargs
: context used to render the overlay. Can also be used to dynamically position content.