Skip to content

BlockSuite API Documentation / @blocksuite/blocks / printToPdf

Function: printToPdf()

printToPdf(rootElement?, options?): Promise<void>

Parameters

rootElement?

null | HTMLElement

options?

afterprint

() => void | Promise<void>

Callback that is called after the print dialog is closed. Notice: in some browser this may be triggered immediately.

beforeprint

(iframe) => void | Promise<void>

Callback that is called when ready to print.

Returns

Promise<void>

Defined in

packages/affine/shared/dist/utils/print-to-pdf.d.ts:1