trying to fix pdf creator

This commit is contained in:
Ivan 2023-09-06 22:16:37 +03:00
parent 4191d90dd9
commit b53f11ee48
Signed by untrusted user who does not match committer: ppechenkoo
GPG Key ID: 0C191B86D9582583

View File

@ -878,8 +878,10 @@ app.get("/api/devices", async (req, res) => {
}); });
async function generatePDF(data) { async function generatePDF(data) {
const browser = await puppeteer.launch({ headless: "new" }); const browser = await puppeteer.launch({
const page = await browser.newPage(); headless: true,
ignoreDefaultArgs: ['--disable-extensions']
}); const page = await browser.newPage();
const htmlTemplate = fs.readFileSync('static/templates/reports/pdf.html', 'utf-8'); const htmlTemplate = fs.readFileSync('static/templates/reports/pdf.html', 'utf-8');