Skip to content

ObsidianIpcPrintToPdfOptions

Unofficial

The options Obsidian’s print-to-pdf IPC channel takes: Electron’s own PDF options plus where to write the file.

Import:

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

Signature:

export interface ObsidianIpcPrintToPdfOptions extends ElectronPrintToPDFOptions

Extends: ElectronPrintToPDFOptions

Properties

PropertyTypeDescription
filepathstringThe path of the PDF file to write.
headerFooter?Record<string, string>The header and footer for the PDF.
(Inherited from ElectronPrintToPDFOptions)
landscape?booleantrue for landscape, false for portrait.
(Inherited from ElectronPrintToPDFOptions)
marginsType?numberSpecifies the type of margins to use. Uses 0 for default margin, 1 for no margin, and 2 for minimum margin.
(Inherited from ElectronPrintToPDFOptions)
open?booleanWhether to open the written file with the system's default application.
pageRanges?Record<string, number>The page range to print. On macOS, only the first range is honored.
(Inherited from ElectronPrintToPDFOptions)
pageSize?ElectronSize | stringThe page size of the generated PDF. Can be A3, A4, A5, Legal, Letter, Tabloid or an object containing height and width.
(Inherited from ElectronPrintToPDFOptions)
printBackground?booleanWhether to print CSS backgrounds.
(Inherited from ElectronPrintToPDFOptions)
printSelectionOnly?booleanWhether to print the selection only.
(Inherited from ElectronPrintToPDFOptions)
scaleFactor?numberThe scale factor of the web page. Can range from 0 to 100.
(Inherited from ElectronPrintToPDFOptions)