mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: options parsing in WebContents.prototype.printToPDF() (#40257)
* refactor: options parsing in WebContents.prototype.printToPDF() * tweak parsePageSize
This commit is contained in:
@@ -90,7 +90,11 @@ app.whenReady().then(() => {
|
||||
},
|
||||
printBackground: true,
|
||||
pageRanges: '1-3',
|
||||
landscape: true
|
||||
landscape: true,
|
||||
pageSize: {
|
||||
width: 100,
|
||||
height: 100
|
||||
}
|
||||
}).then((data: Buffer) => console.log(data));
|
||||
|
||||
mainWindow.webContents.printToPDF({}).then(data => console.log(data));
|
||||
|
||||
Reference in New Issue
Block a user