Currently, there is no way to know when a new page is created when content "overflows" to the next page This event may be needed in order to generate the header and footer based on the currently generated content. In simple header/footer scenarios, however, this event may not be needed and the headers and footers may be drawn after all pages are generated as described in the comments below.