displayHeaderFooter
headerTemplate
and footerTemplate
can be used to customize them.
footerTemplate
date
formatted print datetitle
document titleurl
document locationpageNumber
current page numbertotalPages
total pages in the document
Example: <div style='font-size:10px; width:100%; text-align:center;'><span class='pageNumber'></span>/<span class='totalPages'></span></div>
format
PaperFormat
enum (e.g., A4, LETTER). If set, overrides width and height.
Defaults to LETTER if not specified.
headerTemplate
footerTemplate
.
Example: <div style='font-size:10px; color:grey; margin-left:10px;'><span class='title'></span></div>
height
"11in"
, "29.7cm"
).
Used if ‘format’ is not set.
landscape
margin
PDFMarginOptions
. If not specified, default margins apply (usually around 1cm or 0.4in).
omitBackground
pageRanges
"1-5, 8, 11-13"
. Defaults to all pages.
preferCSSPageSize
@page
) over options width
/height
or format
. Defaults to false.
printBackground
scale
timeout
width
"8.5in"
, "21cm"
).
Used if ‘format’ is not set.