Skip to content

Commit 92f9315

Browse files
feat: add PR eKoopmans#170
1 parent 7c78308 commit 92f9315

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugin/pagebreaks.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ Worker.prototype.toContainer = function toContainer() {
4040
return orig.toContainer.call(this).then(function toContainer_pagebreak() {
4141
// Setup root element and inner page height.
4242
var root = this.prop.container;
43-
var pxPageHeight = this.prop.pageSize.inner.px.height;
43+
// 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;
4445

4546
// Check all requested modes.
4647
var modeSrc = [].concat(this.opt.pagebreak.mode);

0 commit comments

Comments
 (0)