Skip to content

BlockSuite API Documentation / @blocksuite/blocks / printToPdf

Function: printToPdf()

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

Parameters

rootElement?: null | HTMLElement

options?

options.afterprint?

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

options.beforeprint?

Callback that is called when ready to print.

Returns

Promise<void>

Defined in

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