From 36de9684581f3b0c38d88890254c7b8085caa1d5 Mon Sep 17 00:00:00 2001 From: Christopher Schramm Date: Sun, 4 Nov 2018 22:33:01 +0100 Subject: [PATCH] Respect html2canvas width option for pagebreaks --- src/plugin/pagebreaks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin/pagebreaks.js b/src/plugin/pagebreaks.js index 5a4dc2b1..a04e67d7 100644 --- a/src/plugin/pagebreaks.js +++ b/src/plugin/pagebreaks.js @@ -40,7 +40,7 @@ Worker.prototype.toContainer = function toContainer() { return orig.toContainer.call(this).then(function toContainer_pagebreak() { // Setup root element and inner page height. var root = this.prop.container; - var pxPageHeight = this.prop.pageSize.inner.px.height; + var pxPageHeight = this.opt['html2canvas'] && this.opt['html2canvas']['width'] ? this.opt['html2canvas']['width'] * this.prop.pageSize.inner.ratio : this.prop.pageSize.inner.px.height; // Check all requested modes. var modeSrc = [].concat(this.opt.pagebreak.mode);