Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
fix: printToPDF default margins (electron#36060)
Browse files Browse the repository at this point in the history
printToPDF default margins

The document printToPDF has a 1cm margin and this default value has been added in the code.
  • Loading branch information
Yusoo authored and khalwa committed Feb 22, 2023
1 parent b747126 commit 7ba83cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/browser/api/web-contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ WebContents.prototype.printToPDF = async function (options) {
scale: 1.0,
paperWidth: 8.5,
paperHeight: 11.0,
marginTop: 0.0,
marginBottom: 0.0,
marginLeft: 0.0,
marginRight: 0.0,
marginTop: 0.4,
marginBottom: 0.4,
marginLeft: 0.4,
marginRight: 0.4,
pageRanges: '',
preferCSSPageSize: false
};
Expand Down

0 comments on commit 7ba83cd

Please sign in to comment.