mirror of
https://github.com/electron/electron.git
synced 2026-01-25 15:28:11 -05:00
Add Math.ceil to pageSize.height and pageSize.width to printToPDF() options to prevent error on display.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user