From e74b44b49ca714586ae4acf5a078cbe6da1d1869 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Wed, 5 Jan 2022 14:17:43 +0100 Subject: [PATCH] fix(core): update --- ts/smartpdf.classes.smartpdf.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ts/smartpdf.classes.smartpdf.ts b/ts/smartpdf.classes.smartpdf.ts index 404bc28..e10c451 100644 --- a/ts/smartpdf.classes.smartpdf.ts +++ b/ts/smartpdf.classes.smartpdf.ts @@ -68,6 +68,10 @@ export class SmartPdf { const pdfCandidate = new PdfCandidate(htmlStringArg); this._candidates[pdfCandidate.pdfId] = pdfCandidate; const page = await this.headlessBrowser.newPage(); + await page.setViewport({ + height: 842, + width: 595, + }) const response = await page.goto(`http://localhost:3210/${pdfCandidate.pdfId}`, { waitUntil: 'networkidle2', });