Skip to content

Commit

Permalink
fix: printToPDF default margins (#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.

Co-authored-by: Yusoo <Yusoo@users.noreply.github.com>
  • Loading branch information
trop[bot] and Yusoo committed Oct 19, 2022
1 parent de9889e commit 004b745
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/browser/api/web-contents.ts
Expand Up @@ -176,10 +176,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 004b745

Please sign in to comment.