Using PDFLib templates
Often, especially on multi-page PDF documents a consistent look and feel is desired. Rather than re-drawing the same basic things on every page templates can be used to and then placed as needed. Creating a template is much like creating a PDF page:

Note: Templates must be created outside the context of a page (must be called before pdf_begin_page() and after pdf_end_page()