Last updated on

Google Chrome offers a headless browser to generate PDF or take screenshots from URL. Puppeteer is a Node library that provides a high-level API to control headless Google Chrome or Chromium.

Benefits of using Puppeteer

  • Generate screenshots from URL.
  • Generate multipage PDF from URL.
  • Crawl a single page application and generate prerender content.
  • Automatic form submission, testing, and keyboard inputs, etc.
  • Test chrome extensions.
  • Capture a timeline and diagnose performance issues of your site.
  • Create an up to date testing environment and much more.

In this article, we are going to explain how to generate PDF or create screenshots from the website URL.


Before going the install, you need to install the latest version of Node. To use the Puppeteer in your project first you need to install it from the npm package. You can install it by using the below command