Compare

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

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

FeaturePDFGatePuppeteer
Rendering engineChromeChrome; Playwright generates PDFs with Chromium only
Convert a URL or raw HTMLBothBoth, with page.goto() or page.setContent()
Wait for dynamic contentCSS selector, network idle, or delayAnything you can script
Inject CSS and JavaScriptYesWith your own code
Headers, footers, and page numbersHeader and footer templatesHeader and footer templates
Click through cookie banners and pop-upsClick selectors and selector chainsWith your own code
Pages behind authenticationBasic authentication and custom HTTP headersBasic authentication, headers, and cookies
Fillable PDF form fieldsFrom HTML inputs, including signature fieldsNot built in

Beyond generation

FeaturePDFGatePuppeteer
E-signaturesEnvelopes, recipients, and audit trailNot built in
Password protection and watermarksProtect PDF and Watermark PDF endpointsNot built in; needs other libraries
Compress and flatten PDFsDedicated endpointsNot built in; needs other libraries
Extract form data from PDFsDedicated endpointNot built in; needs other libraries

Running it

FeaturePDFGatePuppeteer
SetupNothing to install; send an API requestInstall the library and a browser on your servers
ScalingManaged, with 3 to 25 parallel conversions depending on the planYou manage browser instances, memory, and concurrency
Timeouts and failuresHandled by the API, with a page load timeout up to 15 minutesYou handle hung pages, crashes, and retries in your code
Browser updatesApplied for youYou update the library and browser
Document storageStored up to 2 years, with pre-signed URLsYour own storage
Data locationAWS in the EU (Frankfurt)Your own servers
LanguagesSDKs for Node.js, Python, PHP, Java, C#, or any HTTP clientPuppeteer: Node.js. Playwright: Node.js, Python, Java, .NET
No-code integrations and MCP serverZapier, viaSocket, and others, plus an MCP serverNot built in
LicensePaid plans with a 14-day free trialFree 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

PlanPrice / monthDocuments / monthCost per document
Personal$9500$0.018
Starter$203,000$0.0067
Basic$5010,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.

PuppeteerPDFGate
page.goto(url)url
page.setContent(html)html
format: "A4"pageSizeType: "a4"
width and heightwidth and height in pixels
landscape: trueorientation: "landscape"
marginmargin
scalescale
pageRangespageRanges
printBackgroundprintBackground
displayHeaderFooter, headerTemplate, footerTemplateheader 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