From 253fb951437174633161317fa6bff4dfecd6a0f9 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Thu, 6 Jan 2022 13:23:04 +0100 Subject: [PATCH] fix(core): update --- ts/smartpdf.classes.smartpdf.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ts/smartpdf.classes.smartpdf.ts b/ts/smartpdf.classes.smartpdf.ts index 7cb5dde..5462eac 100644 --- a/ts/smartpdf.classes.smartpdf.ts +++ b/ts/smartpdf.classes.smartpdf.ts @@ -150,12 +150,17 @@ export class SmartPdf { documentWidth: document.body.clientWidth, }; }); + await page.setViewport({ + width: 1920, + height: documentHeight, + }); const pdfBuffer = await page.pdf({ height: documentHeight, width: 1920, printBackground: true, displayHeaderFooter: false, - scale: 1 + scale: 1, + pageRanges: '1' }); await page.close(); return {