electron-print-dialog
A library to add a print dialog to your Electron app
Install
$ npm install --save electron-print-dialog
Usage
// Make sure to excute the function to initialize a printDialogconst printDialog = ;let window; app; // manually open the print dialog// useful if you have a api request that returns a link to a document and you would like to print it.printDialog;
API
printDialog.attach(window)
*Not Implemented
Add print listeners to the given BrowserWindow
to override the default print behavior.
printDialog.open(window, options)
Open the print dialog for the given window and print listeners to the given BrowserWindow
.
-
window
BrowserWindow (required)- The window to use as the parent window for the print dialog. -
options
Object (optional)data
(Uint8Array | String)(optional) - PDF data or a url to print. Supports urls to html, pdf, or png. If not provided the windows webContents will be used instead.