From 313ba6a737168cbe8dd39a1501cdfb332b528a66 Mon Sep 17 00:00:00 2001 From: Matias Olivera Date: Wed, 22 May 2019 11:07:53 -0300 Subject: [PATCH] Fix tests --- src/elements/Page.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/elements/Page.js b/src/elements/Page.js index c5e7f89ed..e46bbaca6 100644 --- a/src/elements/Page.js +++ b/src/elements/Page.js @@ -189,15 +189,17 @@ class Page extends Base { this.calculateLayout(); + const height = this.isAutoHeight ? this.height : this.size.height; + instance.addPage({ - size: [this.size.width, this.height], + size: [this.size.width, height], margin: 0, }); if (this.style.backgroundColor) { instance .fillColor(this.style.backgroundColor) - .rect(0, 0, this.size.width, this.height) + .rect(0, 0, this.size.width, height) .fill(); }