If you're here it means you're looking for a way to automate your job with Puppeteer-core. And we're here to help you out with that!
In this article, we'll share 3 different use cases:
- How to automate PDF generation of web pages
- How to automate screenshots & screencasts
- How to extract text from web pages automatically
We will share code snippets that you can copy & implement in your work. Even more, we have these code examples on Replit, so you can test Puppeteer-core automation with the push of a button.
Puppeteer-core vs Puppeteer
Puppeteer-core is a lightweight version of the Puppeteer library, with the exception that Puppeteer-core doesn't have Chrome binaries. But no worries, we'll be using a remote Chrome session with Browserless.
Prerequisites
Before we dive into the examples & code snippets, let us share what to do to implement and test the code easily and for free:
- We added code examples to Replit, so create your free account there to test the code on your own.
- We used Browserless for this web automation. Create your free account here. Use your Browserless Token to run the same code for yourself.

Puppeteer-core examples
We’re sharing the code that does everything (PDF, PNG generation, and text extraction). You can take the parts of this code or use the full version of it. As the example, we’ll use the https://www.browserless.io/ page, but you can use it for other URLs:
How to try Puppeteer-core
You can try this code example on Replit:

Right there, you can see the results of the automation. For example, this is how the PDF was generated from the browserless.io URL:

How to get started with Browserless
There are different ways to use our product.
- Use our online debugger to try it out!
- Sign up for a free account and get an API key. You have 6 hours of usage for free! After that, you can pay as you go, and only pay per second that you use!
- You can self-host for development purposes by using our open source browserless docker image
- If you’ve already tested our service and want a dedicated machine for your requests, you might be interested in signing up for a dedicated account. This works best if you’re doing screencasting or have a heavy load of requests since you won’t be sharing resources.
If you’re using one of our hosted services; be that usage-based or capacity-based, just connect to our WebSocket securely with your token to start web automation!