You can use HTML to specify the header and/or footer contents and layout. Basically you can use all HTML tags, which are normalled allowed within the <BODY> tag (so don't use <HTML>, <BODY>, <HEAD> etc).
By doing so you'll get a lot of control over the layout of your header/footer. You can align it, use images, font styles, colors etc. Just make sure you have enough margin space for your header/footer to reside in.
As if full HTML is not enough to work with, we have also added the parameters in the below table, to ensure that you can use page numbering as well as display current date & time information.
|%frompage||first page number|
|%topage||last page number|
|%romanpage||page number in Roman style (so I, II, III, IV, V etc)|
|%romanfrompage||first page number in Roman style|
|%romantopage||last page number in Roman style|
|%url||URL that you're converting|
|%title||title of the web page|
|%DD||day of the month|
|%MM||month of year|
Below we used some of the features described in the section to the left to give the PDF of this page a footer, which is right aligned, contains the current date and the page number in red.
Note that you have to properly URL encode the HTML if you're using this in a query string like below.