We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c78308 commit 92f9315Copy full SHA for 92f9315
src/plugin/pagebreaks.js
@@ -40,7 +40,8 @@ Worker.prototype.toContainer = function toContainer() {
40
return orig.toContainer.call(this).then(function toContainer_pagebreak() {
41
// Setup root element and inner page height.
42
var root = this.prop.container;
43
- var pxPageHeight = this.prop.pageSize.inner.px.height;
+ // https://github.com/eKoopmans/html2pdf.js/pull/170
44
+ var pxPageHeight = this.opt['html2canvas'] && this.opt['html2canvas']['width'] ? this.opt['html2canvas']['width'] * this.prop.pageSize.inner.ratio : this.prop.pageSize.inner.px.height;
45
46
// Check all requested modes.
47
var modeSrc = [].concat(this.opt.pagebreak.mode);
0 commit comments