From 48a1b722f11926a675717212a4c5a857c794f51c Mon Sep 17 00:00:00 2001 From: JannikFrauendorfPorabo Date: Mon, 27 Jun 2022 15:53:55 +0200 Subject: [PATCH] feat: add PR #447 --- src/plugin/pagebreaks.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugin/pagebreaks.js b/src/plugin/pagebreaks.js index 0a4813e..56f1d3c 100644 --- a/src/plugin/pagebreaks.js +++ b/src/plugin/pagebreaks.js @@ -124,6 +124,8 @@ Worker.prototype.toContainer = function toContainer() { var pad = createElement(self.opt.pagebreak.elementType || "div", { style: { display: 'block', + // https://github.com/eKoopmans/html2pdf.js/pull/447 + width: '100%', height: pxPageHeight - (clientRect.top % pxPageHeight) + 'px' }, className: self.opt.pagebreak.className}); //allow control of styling of added sections el.parentNode.insertBefore(pad, el); @@ -133,6 +135,8 @@ Worker.prototype.toContainer = function toContainer() { if (rules.after) { var pad = createElement('div', {style: { display: 'block', + // https://github.com/eKoopmans/html2pdf.js/pull/447 + width: '100%', height: pxPageHeight - (clientRect.bottom % pxPageHeight) + 'px' }}); el.parentNode.insertBefore(pad, el.nextSibling);