Skip to content

Commit

Permalink
Fix margins
Browse files Browse the repository at this point in the history
  • Loading branch information
e-adrien committed Oct 20, 2022
1 parent 86df004 commit ae0eacb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ app.on("ready", function () {
// Print the Content to a Base64 PDF String
window.webContents
.printToPDF({
marginsType: 0,
pageSize: "A4",
landscape: false,
printBackground: false,
printSelectionOnly: false,
pageSize: "A4",
margins: {
top: 0.4,
bottom: 0.4,
left: 0.4,
right: 0.4,
},
})
.then(function (buffer) {
pdfGenerationCallback(null, buffer);
Expand Down

0 comments on commit ae0eacb

Please sign in to comment.