Skip to main content

Options for printing PDF files.

Properties (11)

Property Type Default Required Description
autoOpen⚓︎ boolean false x

If true, will open the PDF file.

autoOpenPath⚓︎ boolean false x

If true, will open the folder that contains the PDF file.

autoSave⚓︎ boolean false x

If true, will autosave the file without asking the user where to save it. If false, a system save dialog will appear.

headerFooter⚓︎ { title?: string; url?: string; } x x

Header and footer for the PDF.

landscape⚓︎ boolean x x

Set to true for landscape layout, false for portrait layout.

marginsType⚓︎ number x x

Specifies the type of margins to use. Use 0 for default margin, 1 for no margin, and 2 for minimum margin.

pageRanges⚓︎ PageRange[] x x

The page range to print.

pageSize⚓︎ ("A3" | "A4" | "A5" | "Legal" | "Letter" | "Tabloid") | Size x x

Page size of the generated PDF file.

printBackground⚓︎ boolean x x

If true, will print CSS backgrounds.

printSelectionOnly⚓︎ boolean x x

If true, will print selection only.

scaleFactor⚓︎ number x x

The scale factor of the web page. Can range from 0 to 100.