From 004b7452ed40fb153503938ba09f406bed32895c Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 19 Oct 2022 08:16:59 +0000 Subject: [PATCH] fix: printToPDF default margins (#36060) printToPDF default margins The document printToPDF has a 1cm margin and this default value has been added in the code. Co-authored-by: Yusoo --- lib/browser/api/web-contents.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 1890bdb018509..aac868f6f4126 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -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 };