diff --git a/lib/browser/api/web-contents.js b/lib/browser/api/web-contents.js index c49c1be8ba64..1ea5b15599b3 100644 --- a/lib/browser/api/web-contents.js +++ b/lib/browser/api/web-contents.js @@ -198,8 +198,8 @@ WebContents.prototype.printToPDF = function (options, callback) { printingSetting.mediaSize = { name: 'CUSTOM', custom_display_name: 'Custom', - height_microns: pageSize.height, - width_microns: pageSize.width + height_microns: Math.ceil(pageSize.height), + width_microns: Math.ceil(pageSize.width) } } else if (PDFPageSizes[pageSize]) { printingSetting.mediaSize = PDFPageSizes[pageSize]