Merge pull request #9396 from drulm/printtopdf-custom-pagesize
Add Math.ceil to pageSize.height and pageSize.width to printToPDF() o…
This commit is contained in:
commit
5fbcb6ef4e
1 changed files with 2 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue