Skip to main content

Options for printing web pages.

Properties (16)

Property Type Default Required Description
collate⚓︎ boolean x x

If true, the web page will be collated when printing multiple copies.

color⚓︎ boolean true x

If true, the printed web page will be in color. Set to false for grayscale.

copies⚓︎ number x x

The number of copies of the web page to print.

deviceName⚓︎ string x x

Sets the printer device name to use. Must be the system-defined name and not the user-friendly name.

dpi⚓︎ { horizontal?: number; vertical?: number; } x x

Print resolution in pixels.

duplexMode⚓︎ "simplex" | "shortEdge" | "longEdge" x x

Duplex mode for the printed web page.

header⚓︎ string x x

String to be printed as a page header.

landscape⚓︎ boolean false x

If true, the web page will be printed in landscape mode.

margins⚓︎ Margins x x

Margins for the printed web page.

pageRanges⚓︎ PageRange[] x x

Page range to print.

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

Page size for the printed web page.

pagesPerSheet⚓︎ number x x

Number of pages to print per sheet.

printBackground⚓︎ boolean false x

Prints the background color and image of the web page.

scaleFactor⚓︎ number x x

Scale factor of the web page.

silent⚓︎ boolean false x

If true, won't ask the user for print settings.