Optionalbase64OptionalfileFile name of pdf Without filename, it will generate base64 response With filename it will generate pdf binary
OptionalhtmlHTML as string
OptionaloptionsPDF Custom Options
OptionaldisplayHeaderFooter?: booleanDisplay header and footer. Defaults to false.
OptionalfooterTemplate?: stringHTML template for the print footer. Should use the same format as the headerTemplate.
Optionalformat?: stringPaper format. If set, takes priority over width or height options. Defaults to 'Letter'.
OptionalheaderTemplate?: stringHTML 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 documentOptionalheight?: string | numberPaper height, accepts values labeled with units.
Optionallandscape?: booleanPaper orientation. Defaults to false.
Optionalmargin?: {Paper margins, defaults to none.
Optionalbottom?: string | numberBottom margin, accepts values labeled with units. Defaults to 0.
Optionalleft?: string | numberLeft margin, accepts values labeled with units. Defaults to 0.
Optionalright?: string | numberRight margin, accepts values labeled with units. Defaults to 0.
Optionaltop?: string | numberTop margin, accepts values labeled with units. Defaults to 0.
OptionalpageRanges?: stringPaper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
OptionalpreferCSSPageSize?: booleanGive 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.
OptionalprintBackground?: booleanPrint background graphics. Defaults to false.
Optionalscale?: numberScale of the webpage rendering. Defaults to 1. Scale amount must be between 0.1 and 2.
Optionalwidth?: string | numberPaper width, accepts values labeled with units.
OptionalurlGenerate pdf from URL
HTML on base64 format