Appearance
VM Code SDK v2 / PagePdfOptions
Type alias: PagePdfOptions
PagePdfOptions:
object
Type declaration
displayHeaderFooter?
optionaldisplayHeaderFooter:boolean
Display header and footer. Defaults to false.
filename?
optionalfilename:string
The file path to save the PDF to. If path is a relative path, then it is resolved relative to the current working directory. If no path is provided, the PDF won't be saved to the disk.
footerTemplate?
optionalfooterTemplate:string
HTML template for the print footer. Should use the same format as the headerTemplate.
format?
optionalformat:string
Paper format. If set, takes priority over width or height options. Defaults to 'Letter'.
headerTemplate?
optionalheaderTemplate:string
HTML 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 document
height?
optionalheight:string|number
Paper height, accepts values labeled with units.
landscape?
optionallandscape:boolean
Paper orientation. Defaults to false.
margin?
optionalmargin:object
Paper margins, defaults to none.
margin.bottom?
optionalbottom:string|number
Bottom margin, accepts values labeled with units. Defaults to 0.
margin.left?
optionalleft:string|number
Left margin, accepts values labeled with units. Defaults to 0.
margin.right?
optionalright:string|number
Right margin, accepts values labeled with units. Defaults to 0.
margin.top?
optionaltop:string|number
Top margin, accepts values labeled with units. Defaults to 0.
media?
optionalmedia:"screen"|"print"
set media type to print or screen.
pageRanges?
optionalpageRanges:string
Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
preferCSSPageSize?
optionalpreferCSSPageSize:boolean
Give 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.
printBackground?
optionalprintBackground:boolean
Print background graphics. Defaults to false.
scale?
optionalscale:number
Scale of the webpage rendering. Defaults to 1. Scale amount must be between 0.1 and 2.
width?
optionalwidth:string|number
Paper width, accepts values labeled with units.