fix(printer.service.ts): fix pdf rendering, issue #2374 solved

This commit is contained in:
Avinash Bathula
2025-09-02 07:45:20 +05:30
parent b995a6b6c0
commit 8e9b409bae

View File

@ -127,11 +127,13 @@ export class PrinterService {
// Set the data of the resume to be printed in the browser's session storage
const numberPages = resume.data.metadata.layout.length;
await page.evaluateOnNewDocument((data) => {
await page.goto(`${url}/artboard/preview`, { waitUntil: "networkidle0" });
await page.evaluate((data) => {
window.localStorage.setItem("resume", JSON.stringify(data));
}, resume.data);
await page.goto(`${url}/artboard/preview`, { waitUntil: "networkidle0" });
await page.reload({ waitUntil: "load" });
const pagesBuffer: Buffer[] = [];