Skip to content

Commit

Permalink
Changement
Browse files Browse the repository at this point in the history
  • Loading branch information
lomamech committed Jul 26, 2024
1 parent 58f4feb commit 9c984fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Binary file added output.pdf
Binary file not shown.
17 changes: 17 additions & 0 deletions test-puppeteer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const puppeteer = require('puppeteer');

(async () => {
const browser = await puppeteer.launch({
executablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe', // Chemin vers votre installation de Chrome
headless: true, // Mode sans tête
args: ['--no-sandbox', '--disable-setuid-sandbox'], // Arguments supplémentaires pour Puppeteer
defaultViewport: null, // Utiliser la taille de la fenêtre par défaut
timeout: 120000, // Augmenter le délai d'attente à 2 minutes
});

const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle0', timeout: 120000 });
await page.pdf({ path: 'output.pdf', format: 'A4' });

await browser.close();
})();

0 comments on commit 9c984fe

Please sign in to comment.