Compare · self-hosted Playwright
A Playwright alternative for generating PDFs
Playwright is the strongest browser-automation library available, and for end-to-end testing it's hard to beat. But PDF generation is a corner of it: page.pdf() is Chromium-only, so the cross-browser strength that justifies Playwright doesn't apply to this job at all.
Meanwhile you carry the full weight — browser binaries installed per environment, a version bump every few weeks, memory to size, and concurrency to cap. In CI that's fine. In a production path that renders invoices on the first of the month, it's infrastructure you'd rather not be on call for.
Keep Playwright where it shines. For turning HTML into documents, send the HTML and get the file back.
01Rendral vs self-hosted Playwright
self-hosted Playwright pricing at a glance: Free (open source) — you pay in servers and operations.
| Feature | self-hosted Playwright | Rendral |
|---|---|---|
| PDF support | Chromium only | Chromium — same engine |
| Who runs the browser | You | We do |
| Install footprint | Browser binaries per environment | None |
| Version upkeep | Frequent browser bumps | Handled |
| Best at | End-to-end testing, automation | Documents at production volume |
| Screenshots, OG images, merge | Build each yourself | Same key, ready |
02Why teams switch
- No browser install in the environments that generate documents.
- No version treadmill on a production rendering path.
- Concurrency limits and a warm pool, already built.
- Async jobs and webhooks for bulk runs, without a queue of your own.
Frequently asked
Should I stop using Playwright?
No. Keep it for end-to-end tests and automation — that's what it's built for. This replaces only the narrow case of rendering HTML into a PDF or image in production.
Does Playwright generate PDFs in Firefox or WebKit?
No. page.pdf() is Chromium-only, so cross-browser support — the main reason to choose Playwright — doesn't apply to PDF generation.
Can I use both?
Commonly, yes: Playwright in CI for tests, this API in the application path for documents. They don't overlap.
How similar are the options?
Close enough to port directly — format, margins, printBackground, landscape, and custom header and footer HTML all have equivalents.
Related
Shipping labels PDF API
Generate 4x6 thermal shipping labels and packing slips as PDFs from HTML.
Compare vs DocRaptor
How DocRaptor and Rendral differ on pricing, features, and setup.
PDFs in Netlify Functions
A step-by-step guide to generating PDFs from Netlify Functions.
A free tier, five endpoints, and SDKs for Node and Python.