trying to fix pdf creator
This commit is contained in:
parent
4191d90dd9
commit
b53f11ee48
@ -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');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user