

In order to install, just run: npm install puppeteer-core

It comes in handy mainly when we don’t need a downloaded version of Chromium, for instance, bundling this library within a project that interacts with a browser remotely. Library PackageĪ lightweight package, called puppeteer-core, which is a library that interacts with any browser that’s based on DevTools protocol - without actually installing Chromium. To begin with, we’ll have to install one of Puppeteer’s packages. Check it out during the article or afterwards. It lets us run Puppeteer scripts every couple of minutes or trigger them from the continuous integration pipeline. Just call the API and pass in the PDF URLs to join them into a single file and receive the generated result via webhook or via polling.In this article we’re going to try out Puppeteer and demonstrate a variety of the available capabilities, through concrete examples.ĭisclaimer: This article doesn’t claim to replace the official documentation but rather elaborate it - you definitely should go over it in order to be aligned with the most updated API specification.Īctive Reliability for Modern DevOps TeamsĬheckly does in-depth API monitoring and synthetic monitoring using Puppeteer. You can use the API to join your PDFs that are generated using Puppeteer too if they are hosted on a server. Bannerbear has an API to join PDF files when you generate PDFs from templates using Bannerbear’s PDF generation API. If you have multiple PDFs and want to join them into a single PDF, here’s an easy method to do so. to generate PDFs, so feel free to play around with the code.

You can also modify the code to pass in different arguments to the function, eg. Margin: ,ġ-Run node index.js or node index.js url to convert the HTML content of a web page using its URL into a PDF.Ģ-Run node index.js file to convert the content of an HTML file into a PDF.
