Presented By: Muskan Gupta
Export PDF with
Lack of etiquette and manners is a huge turn oﬀ.
Respect Knolx session timings, you
are requested not to join sessions
after a 5 minutes threshold post
the session start time.
Make sure to submit a constructive
feedback for all sessions as it is
very helpful for the presenter.
Keep yourself muted until and
unless you have any query.
2. Node modules
3. NPM(Node Package Manager)
5. Introduction to Puppeteer
7. Problems with Puppeteer and their Solution
● Node.js is an open source server environment.
● Node.js runs on various platforms (Windows, Linux, Unix, Mac OS, etc.).
● Node.js is asynchronous.
● Node.js is single-threaded and highly scalable.
can be reused throughout the Node.js application.
● Each module in Node.js has its own context.
NPM(Node Package Manager)
● NPM is a repository where we have a large
number of node modules available.
● It is also a command line utility, to install these
● For installing : npm install module_name
● HandleBars is a node module which is used to create html templates.
● It uses a template and a data object to generate HTML page.
● To install : npm install handlebars
● For example :
Introduction to Puppeteer
According to the documentation :
Puppeteer is a Node library which provides a high-level API to control Chrome or
Chromium over the DevTools Protocol. Puppeteer runs headless by default, but
can be configured to run full (non-headless) Chrome or Chromium.
Usage of Puppeteer
● Generate screenshots and PDFs of pages.
● Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e.
"SSR" (Server-Side Rendering)).
● Automate form submission, UI testing, keyboard input, etc.
● Create an up-to-date, automated testing environment. Run your tests directly in the
● Test Chrome Extensions.
Problems with Puppeteer
and their Solution
● Loading of an image
Rather than directly passing the data, create an html page and goto that
page to create PDF.
● Problem with chromium available in puppeteer on EC2 instances
Install chromium on EC2 instance explicitly. Set chromium path to the
chromium installed. And now instead of puppeteer use puppeteer-core.
● What is npm?.
● Node.js Modules.
● Node.js Introduction
● Introduction to HandleBars