Interface: PageSettings
Settings for the PDF page, including dimensions, format, margins, etc.
Properties
displayHeaderFooter?
optional
displayHeaderFooter:boolean
Whether to display header and footer
format?
optional
format:PaperSize
|"LETTER"
|"LEGAL"
|"TABLOID"
|"LEDGER"
|"letter"
|"legal"
|"tabloid"
|"ledger"
|"a0"
|"a1"
|"a2"
|"a3"
|"a4"
|"a5"
|"a6"
All the valid paper format types when printing a PDF.
height?
optional
height:string
|number
Sets the height of paper. You can pass in a number or a string with a unit.
landscape?
optional
landscape:boolean
Whether to print in landscape orientation.
Default
false
margin?
optional
margin:PDFMargin
Set the PDF margins.
Default
no margins are set
omitBackground?
optional
omitBackground:boolean
Hides default white background and allows generating pdfs with transparency.
Default
false
pageRanges?
optional
pageRanges:string
Paper ranges to print, e.g. 1-5, 8, 11-13
.
Default
The empty string, which means all pages are printed.
preferCSSPageSize?
optional
preferCSSPageSize:boolean
Give any CSS
Page
size declared in the page priority over what is declared in the width or height or format option.
Default
false
, which will scale the content to fit the paper size.
scale?
optional
scale:number
Scales the rendering of the web page. Amount must be between 0.1
and 2
.
Default
1
width?
optional
width:string
|number
Sets the width of paper. You can pass in a number or a string with a unit.