Skip to content

ElectronWebContentsPrintOptions

Unofficial

Options for printing a web page.

Import:

import type { ElectronWebContentsPrintOptions } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface ElectronWebContentsPrintOptions

Properties

PropertyTypeDescription
collate?booleanWhether the web page should be collated.
color?booleanWhether the printed web page will be in color or grayscale.
copies?numberThe number of copies of the web page to print.
deviceName?stringSet the printer device name to use. Must be the system-defined name and not the 'friendly' name.
dpi?Record<string, number>The DPI of the printed web page keyed by axis.
duplexMode?'longEdge' | 'shortEdge' | 'simplex'Set the duplex mode of the printed web page.
footer?stringString to be printed as page footer.
header?stringString to be printed as page header.
landscape?booleanWhether the web page should be printed in landscape mode.
margins?ElectronMarginsThe margins of the printed web page.
pageRanges?ElectronPageRanges[]The page range to print. On macOS, only one range is honored.
pageSize?ElectronSize | stringThe page size of the printed document. Can be A3, A4, A5, Legal, Letter, Tabloid or an object containing height and width.
pagesPerSheet?numberThe number of pages to print per page sheet.
printBackground?booleanPrints the background color and image of the web page.
scaleFactor?numberThe scale factor of the web page.
silent?booleanDon't ask the user for print settings.