Skip to content

Commit

Permalink
🩹 Fix puppeteer warning (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaloLebrin authored May 29, 2023
1 parent 29b974c commit cd5fe45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/DownloadController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export class DownloadController {

try {
const browser = await puppeteer.launch({
headless: true,
headless: 'new',
executablePath: '/usr/bin/chromium-browser',
args: [
'--no-sandbox',
Expand All @@ -195,7 +195,7 @@ export class DownloadController {
})
}

await page.goto(url)
await page.goto(url, { waitUntil: 'networkidle0' })
const pdf = await page.pdf({ path: filePath, format: 'a4', printBackground: true })
await browser.close()

Expand Down

0 comments on commit cd5fe45

Please sign in to comment.