Browse Source

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.
Yusoo 2 years ago
parent
commit
dde513b0d3
1 changed files with 4 additions and 4 deletions
  1. 4 4
      lib/browser/api/web-contents.ts

+ 4 - 4
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
   };