fix(core): update

This commit is contained in:
Philipp Kunz 2022-01-06 13:23:04 +01:00
parent f3ea075b72
commit 253fb95143

View File

@ -150,12 +150,17 @@ export class SmartPdf {
documentWidth: document.body.clientWidth, documentWidth: document.body.clientWidth,
}; };
}); });
await page.setViewport({
width: 1920,
height: documentHeight,
});
const pdfBuffer = await page.pdf({ const pdfBuffer = await page.pdf({
height: documentHeight, height: documentHeight,
width: 1920, width: 1920,
printBackground: true, printBackground: true,
displayHeaderFooter: false, displayHeaderFooter: false,
scale: 1 scale: 1,
pageRanges: '1'
}); });
await page.close(); await page.close();
return { return {