Optional
base64Optional
fileFile name of pdf Without filename, it will generate base64 response With filename it will generate pdf binary
Optional
htmlHTML as string
Optional
optionsPDF Custom Options
Optional
displayDisplay header and footer. Defaults to false
.
Optional
footerHTML template for the print footer. Should use the same format as the headerTemplate
.
Optional
format?: stringPaper format. If set, takes priority over width
or height
options. Defaults to 'Letter'.
Optional
headerHTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them:
'date'
formatted print date'title'
document title'url'
document location'pageNumber'
current page number'totalPages'
total pages in the documentOptional
height?: string | numberPaper height, accepts values labeled with units.
Optional
landscape?: booleanPaper orientation. Defaults to false
.
Optional
margin?: { Paper margins, defaults to none.
Optional
bottom?: string | numberBottom margin, accepts values labeled with units. Defaults to 0
.
Optional
left?: string | numberLeft margin, accepts values labeled with units. Defaults to 0
.
Optional
right?: string | numberRight margin, accepts values labeled with units. Defaults to 0
.
Optional
top?: string | numberTop margin, accepts values labeled with units. Defaults to 0
.
Optional
pagePaper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
Optional
preferCSSPageGive any CSS @page
size declared in the page priority over what is declared in width
and height
or format
options. Defaults to false
, which will scale the content to fit the paper size.
Optional
printPrint background graphics. Defaults to false
.
Optional
scale?: numberScale of the webpage rendering. Defaults to 1
. Scale amount must be between 0.1 and 2.
Optional
width?: string | numberPaper width, accepts values labeled with units.
Optional
urlGenerate pdf from URL
HTML on base64 format