From dde513b0d38e3e90ff03761b0b912f60a1fad94e Mon Sep 17 00:00:00 2001 From: Yusoo Date: Wed, 19 Oct 2022 16:16:28 +0800 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. --- 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 b38000b11e..33d515849b 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -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 };