Skip to content

ElectronPrintToPDFOptions

Unofficial

Options for printing a web page to PDF.

Import:

import type { ElectronPrintToPDFOptions } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ElectronPrintToPDFOptions

Properties

Property Type Description
headerFooter? Record<string, string> The header and footer for the PDF.
landscape? boolean true for landscape, false for portrait.
marginsType? number Specifies the type of margins to use. Uses 0 for default margin, 1 for no margin, and 2 for minimum margin.
pageRanges? Record<string, number> The page range to print. On macOS, only the first range is honored.
pageSize? ElectronSize | string The page size of the generated PDF. Can be A3, A4, A5, Legal, Letter, Tabloid or an object containing height and width.
printBackground? boolean Whether to print CSS backgrounds.
printSelectionOnly? boolean Whether to print the selection only.
scaleFactor? number The scale factor of the web page. Can range from 0 to 100.