Skip to content

Commit 48a1b72

Browse files
feat: add PR eKoopmans#447
1 parent 5edda1d commit 48a1b72

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/plugin/pagebreaks.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ Worker.prototype.toContainer = function toContainer() {
124124
var pad = createElement(self.opt.pagebreak.elementType || "div", {
125125
style: {
126126
display: 'block',
127+
// https://github.com/eKoopmans/html2pdf.js/pull/447
128+
width: '100%',
127129
height: pxPageHeight - (clientRect.top % pxPageHeight) + 'px'
128130
}, className: self.opt.pagebreak.className}); //allow control of styling of added sections
129131
el.parentNode.insertBefore(pad, el);
@@ -133,6 +135,8 @@ Worker.prototype.toContainer = function toContainer() {
133135
if (rules.after) {
134136
var pad = createElement('div', {style: {
135137
display: 'block',
138+
// https://github.com/eKoopmans/html2pdf.js/pull/447
139+
width: '100%',
136140
height: pxPageHeight - (clientRect.bottom % pxPageHeight) + 'px'
137141
}});
138142
el.parentNode.insertBefore(pad, el.nextSibling);

0 commit comments

Comments
 (0)