refactor: printToPDF should be headless (#33654)

This commit is contained in:
Shelley Vohr
2022-05-31 08:21:25 +02:00
committed by GitHub
parent 0d69067dee
commit 93b39b92b5
17 changed files with 648 additions and 414 deletions

View File

@@ -86,10 +86,11 @@ app.whenReady().then(() => {
mainWindow.webContents.print()
mainWindow.webContents.printToPDF({
marginsType: 1,
pageSize: 'A3',
margins: {
top: 1
},
printBackground: true,
printSelectionOnly: true,
pageRanges: '1-3',
landscape: true
}).then((data: Buffer) => console.log(data))