Skip to content

ElectronPrintToPDFOptions

Unofficial

Options for printing a web page to PDF.

Import:

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

Signature:

export interface ElectronPrintToPDFOptions

Properties

PropertyTypeDescription
headerFooter?Record<string, string>The header and footer for the PDF.
landscape?booleantrue for landscape, false for portrait.
marginsType?numberSpecifies 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 | stringThe page size of the generated PDF. Can be A3, A4, A5, Legal, Letter, Tabloid or an object containing height and width.
printBackground?booleanWhether to print CSS backgrounds.
printSelectionOnly?booleanWhether to print the selection only.
scaleFactor?numberThe scale factor of the web page. Can range from 0 to 100.