printToPDF

external fun printToPDF(options: PrintToPDFOptions): Promise<Buffer<*>>(source)

Resolves with the generated PDF data.

Prints the frame's web page as PDF.

Unlike webContents.printToPDF, this method prints only the contents of the frame it is called on. This can be used to print an individual <iframe> from the main process.

The landscape will be ignored if @page CSS at-rule is used in the web page.

An example of printing an iframe to PDF:

See Page.printToPdf for more information.