Skip to content

Commit

Permalink
feat: add PR eKoopmans#447
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikFrauendorfPorabo committed Jun 27, 2022
1 parent 5edda1d commit 48a1b72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugin/pagebreaks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 48a1b72

Please sign in to comment.