- HTML to PDF APIConvert HTML and URLs into PDFsExtract PDF Form Data APIEasily extract data from PDFsWatermark PDF APIAdd custom watermarks to PDFsProtect PDF APISecure your PDFs with passwordCompress PDF APIReduce file size without losing qualityFlatten PDF APIFlatten PDFs to make form permanentDigital Signature APISend documents for signing
- API DocumentationAPI DocumentationFull REST API referenceNodeJS SDKClient library for Node.jsJava SDKClient library for JavaC# SDKClient library for C#PHP SDKClient library for PHPPython SDKClient library for Python
- Pricing
- Contact Us

PDFGate vs Puppeteer
The same Chrome PDF output, without running browsers yourself.
Last reviewed: October 3, 2026
Same output, none of the infrastructure
PDFGate renders with Chrome, just like page.pdf(). The difference is that you don't run, scale, or update headless browsers on your own servers.
Forms, processing, and e-signatures
Fillable form fields, compression, watermarks, password protection, and e-signatures are part of the PDFGate API. With Puppeteer or Playwright, you need other libraries or services for each.
Common tasks as request fields
Waiting for content, clicking through cookie banners, and signing in to protected pages are request fields in PDFGate instead of browser code you write and maintain.
Which one should you choose?
Puppeteer and Playwright are open-source libraries that control a headless browser from your code, and both can save a page as a PDF with page.pdf(). PDFGate's HTML to PDF API uses the same Chrome PDF engine, but runs the browsers for you and adds fillable forms, PDF processing, and e-signatures.
Choose PDFGate if
- You don't want to run, scale, and update headless browsers on your own servers.
- You need fillable PDF form fields generated from HTML.
- You want to compress, flatten, watermark, protect, or extract form data from PDFs without adding other libraries.
- You want to send documents for e-signature from the same API.
- You prefer request fields for waiting, cookie banners, and authentication over custom browser scripts.
- You want predictable monthly pricing, stored files, and no-code integrations.
Choose Puppeteer if
- Documents must never leave your own servers.
- You need full control of the browser, or automation that goes beyond PDF options.
- You already run headless browsers in production and have capacity to spare.
- You generate very high volumes and running your own browsers is cheaper for you.
- You want a free, open-source library and have the time to build and maintain the service around it.
Comparing more options? See our roundup of the Best HTML to PDF APIs in 2026, where we compare more tools side by side.
The same Chrome PDF engine
Puppeteer, maintained by Google's Chrome team, and Playwright, from Microsoft, control a real browser from your code. Their page.pdf() method uses Chrome's built-in print to PDF. In Playwright, PDF generation works only with Chromium.
PDFGate also renders with Chrome, so the output is the same, and its options map almost one to one: page size, margins, scale, page ranges, and header and footer templates with the same pageNumber and totalPages classes.
The difference is who runs the browser. With a library, you write and maintain the code that launches browsers, waits for content, handles crashes and timeouts, and scales with demand. PDFGate exposes those steps as request fields and runs the browsers for you.
Feature comparison
"Not built in" means Puppeteer does not include the feature itself. For everything PDFGate offers, see the HTML to PDF API page.
HTML to PDF rendering
| Feature | PDFGate | Puppeteer |
|---|---|---|
| Rendering engine | Chrome | Chrome; Playwright generates PDFs with Chromium only |
| Convert a URL or raw HTML | Both | Both, with page.goto() or page.setContent() |
| Wait for dynamic content | CSS selector, network idle, or delay | Anything you can script |
| Inject CSS and JavaScript | Yes | With your own code |
| Headers, footers, and page numbers | Header and footer templates | Header and footer templates |
| Click through cookie banners and pop-ups | Click selectors and selector chains | With your own code |
| Pages behind authentication | Basic authentication and custom HTTP headers | Basic authentication, headers, and cookies |
| Fillable PDF form fields | From HTML inputs, including signature fields | Not built in |
Beyond generation
| Feature | PDFGate | Puppeteer |
|---|---|---|
| E-signatures | Envelopes, recipients, and audit trail | Not built in |
| Password protection and watermarks | Protect PDF and Watermark PDF endpoints | Not built in; needs other libraries |
| Compress and flatten PDFs | Dedicated endpoints | Not built in; needs other libraries |
| Extract form data from PDFs | Dedicated endpoint | Not built in; needs other libraries |
Running it
| Feature | PDFGate | Puppeteer |
|---|---|---|
| Setup | Nothing to install; send an API request | Install the library and a browser on your servers |
| Scaling | Managed, with 3 to 25 parallel conversions depending on the plan | You manage browser instances, memory, and concurrency |
| Timeouts and failures | Handled by the API, with a page load timeout up to 15 minutes | You handle hung pages, crashes, and retries in your code |
| Browser updates | Applied for you | You update the library and browser |
| Document storage | Stored up to 2 years, with pre-signed URLs | Your own storage |
| Data location | AWS in the EU (Frankfurt) | Your own servers |
| Languages | SDKs for Node.js, Python, PHP, Java, C#, or any HTTP client | Puppeteer: Node.js. Playwright: Node.js, Python, Java, .NET |
| No-code integrations and MCP server | Zapier, viaSocket, and others, plus an MCP server | Not built in |
| License | Paid plans with a 14-day free trial | Free and open source (Apache-2.0) |
Cost of running it yourself
Puppeteer and Playwright are free and open source under the Apache-2.0 license, but running headless browsers in production still costs money: servers with enough memory for each browser, queues to control concurrency, restarting browsers that crash or hang, installing fonts, and keeping the browser and library up to date.
Most of the cost is developer time: writing and maintaining the code for waiting, authentication, retries, and error handling, and debugging rendering issues as Chrome changes.
With PDFGate, servers, scaling, and Chrome updates are included in the plan, and every plan starts with a 14-day free trial.
PDFGate plans
| Plan | Price / month | Documents / month | Cost per document |
|---|---|---|---|
| Personal | $9 | 500 | $0.018 |
| Starter | $20 | 3,000 | $0.0067 |
| Basic | $50 | 10,000 | $0.005 |
Migrating from Puppeteer to PDFGate
PDFGate's options follow Chrome's PDF settings, so most page.pdf() options and page methods map directly to request fields, and you can remove the code that launches and manages the browser.
| Puppeteer | PDFGate |
|---|---|
page.goto(url) | url |
page.setContent(html) | html |
format: "A4" | pageSizeType: "a4" |
width and height | width and height in pixels |
landscape: true | orientation: "landscape" |
margin | margin |
scale | scale |
pageRanges | pageRanges |
printBackground | printBackground |
displayHeaderFooter, headerTemplate, footerTemplate | header and footer |
page.emulateMediaType() | emulateMediaType |
page.waitForSelector() | waitForSelector |
waitUntil: "networkidle0" | waitForNetworkIdle: true |
page.addStyleTag() and page.addScriptTag() | css and javascript |
page.click() | clickSelectorChainSetup |
page.authenticate() | authentication |
page.setExtraHTTPHeaders() | httpHeaders |
page.setUserAgent() | userAgent |
page.setViewport() | viewport |
- Header and footer templates work unchanged, including the date, title, url, pageNumber, and totalPages classes. PDFGate shows them automatically when you set header or footer.
- page.pdf() defaults to Letter size without backgrounds. PDFGate defaults to Ledger with backgrounds, so set pageSizeType and printBackground explicitly.
- PDFGate runs steps in a fixed order: load the page, wait for the selector, click, inject JavaScript and CSS, then wait for the delay. Scripts that rely on a different order may need small changes.
Puppeteer request
1import puppeteer from "puppeteer";23const browser = await puppeteer.launch();4const page = await browser.newPage();5await page.goto("https://example.com/invoice/42", { waitUntil: "networkidle0" });6await page.waitForSelector("#invoice-ready");7await page.pdf({8 path: "output.pdf",9 format: "A4",10 printBackground: true,11 margin: { top: "20mm", bottom: "20mm" },12});13await browser.close();PDFGate request
1import fs from "node:fs";23const response = await fetch("https://api.pdfgate.com/generate/pdf", {4 method: "POST",5 headers: {6 Authorization: "Bearer YOUR_API_KEY",7 "Content-Type": "application/json",8 },9 body: JSON.stringify({10 url: "https://example.com/invoice/42",11 waitForNetworkIdle: true,12 waitForSelector: "#invoice-ready",13 pageSizeType: "a4",14 printBackground: true,15 margin: { top: "20mm", bottom: "20mm" },16 }),17});1819fs.writeFileSync("output.pdf", Buffer.from(await response.arrayBuffer()));Information about Puppeteer comes from its official website and repository and was last reviewed on October 3, 2026. Features may have changed since then.
Frequently Asked Questions
Use Puppeteer or Playwright if documents must stay on your servers, you need full browser control, or you already run headless browsers at scale. Use an HTML to PDF API like PDFGate if you'd rather not operate browsers, or if you also need fillable forms, PDF processing, or e-signatures.
Yes. Puppeteer and Playwright are open source under the Apache-2.0 license. You pay for the servers that run the browsers and the time to build, scale, and maintain the service around them.
Yes, for the same options. Both use Chrome's PDF engine, and PDFGate's settings map to page.pdf() options, including header and footer templates with the same classes.
Playwright works the same way for PDFs and is available for Node.js, Python, Java, and .NET, but it generates PDFs with Chromium only. Everything on this page about Puppeteer also applies to Playwright.
Map your page.pdf() options and page methods to request fields as shown in the migration table, send one API request instead of launching a browser, and set the page size and backgrounds explicitly.

Start building with PDFGate today
Generate PDFs, send documents for signature, and automate your document workflows in minutes.
Free trial ยท No credit card required