Skip to content

printToPdf

Print the given element to a PDF file.

Works only on desktop.

Import:

import { printToPdf } from '@mnaoumov/obsidian-lib/pdf';

Signature:

function printToPdf(element: HTMLElement, options: Partial<PrintToPdfOptions>): Promise<void>

Parameters:

Parameter Type Description
element HTMLElement The element to print.
options Partial<PrintToPdfOptions> The options to use for the print.

Returns: Promise<void>