fix: dark mode export PDF leaves margin and notification (#2978)

This commit is contained in:
xiaodong zuo
2023-07-03 20:11:07 +08:00
committed by GitHub
parent bacd00655d
commit 3d0a907b49
4 changed files with 31 additions and 16 deletions

View File

@@ -39,6 +39,13 @@ export async function savePDFFileAs(
await BrowserWindow.getFocusedWindow()
?.webContents.printToPDF({
margins: {
marginType: 'custom',
top: 0,
bottom: 0,
left: 0,
right: 0,
},
pageSize: 'A4',
printBackground: true,
landscape: false,