Skip to content

Commit

Permalink
added more options to puppeteer launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Panduss committed Feb 8, 2023
1 parent 1b5b1f6 commit 4878273
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118427,8 +118427,11 @@ async function generatePdf() {
*/
console.log(`Starting PDF generation with ${name} name`)
const browser = await chromium.puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],

args: chromium.args,
defaultViewport: chromium.defaultViewport,
executablePath: await chromium.executablePath,
headless: chromium.headless,
ignoreHTTPSErrors: true
});

const page = await browser.newPage();
Expand Down
7 changes: 5 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,11 @@ async function generatePdf() {
*/
console.log(`Starting PDF generation with ${name} name`)
const browser = await chromium.puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],

args: chromium.args,
defaultViewport: chromium.defaultViewport,
executablePath: await chromium.executablePath,
headless: chromium.headless,
ignoreHTTPSErrors: true
});

const page = await browser.newPage();
Expand Down

0 comments on commit 4878273

Please sign in to comment.