Page context
A function header or footer receives the page context, and a raw draw receives a draw area that extends it with the zone rectangle.Setting them
Set a header or footer document wide withdoc.set_header and doc.set_footer, or per page
through doc.page({ header, footer }).
Function footer
A function runs once per page, so it can read the current page number and total count.Raw draw header
ARawDraw declares a height and a draw callback. The callback receives the live pdfkit
document and the zone rectangle, so you can draw vector graphics directly.