Created
March 22, 2021 17:02
-
-
Save ckerr/de07c22f00450282dcc34d568f3c586f to your computer and use it in GitHub Desktop.
testcase for https://github.com/electron/electron/issues/28270
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async () => { | |
const {app, BrowserWindow} = require("electron"); | |
await app.whenReady() | |
const window = new BrowserWindow(); | |
await window.loadURL("https://google.com"); | |
window.webContents.print( | |
{ | |
margins: { | |
marginType: "custom", //change to "default" will redisplay the header and footer | |
top: 0.75, | |
left: 0.75, | |
right: 0.75, | |
bottom: 0.75 | |
}, | |
header: "I am header", | |
footer: "I am footer", | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment