
When you launch Chrome or Chromium, it will create a user data directory. '-disable-offer-store-unmasked-wallet-cards', '-disable-features=AudioServiceOutOfProcess', '-disable-client-side-phishing-detection', '-disable-backgrounding-occluded-windows', '-autoplay-policy=user-gesture-required', So, it’s best to use only the necessary features and disable those unused features.įor example, the following Puppeteer options are to disable some of the unused features such as speech-api or mute-audio when generating a PDF: const puppeteer = require('puppeteer') Īrgs: [ '-disable-features=IsolateOrigins',

However, using the default settings can actually slow down the PDF generation process, because even if they are not using some of the features, the browser process will still load them into memory. When you generate a PDF with Puppeteer, you can use the default parameters and settings. In this article, we also show you a few tips on how to improve the performance of your AWS Lambda functions. This is because Puppeteer is headless, which means that it does not need a graphical user interface (GUI) to run. Puppeteer can also be used in serverless environments such as AWS Lambda or Google Cloud Function. For example, you can use it to crawl a product catalog and extract the prices and product descriptions.

Crawling websites and extracting data: You can use Puppeteer to crawl websites and extract data from them.For example, you can use it to check if a button on a web page works as expected. Testing web pages: You can use Puppeteer to test web pages for functionality and correctness.For example, you can use it to sign up for a newsletter or register for an event on a website.

Automating form submission: You can use Puppeteer to automatically fill and submit forms on web pages.Puppeteer is also used for converting HTML to PDF. For example, you can use it to take a screenshot of a landing page and generate a PDF of the same. Generating screenshots and PDFs of web pages: You can use Puppeteer to programmatically take screenshots and generate PDFs of web pages.Puppeteer can be used for various purposes, such as: Puppeteer runs on Windows, macOS, and Linux. It can also be configured to use full (non-headless) Chrome or Chromium.
