headerTemplate in PDF export

Is there an example of how to use the headerTemplate and footerTemplate options when exportig a PDF? Whatever HTML I use seems to be ignored.

Thanks