Skip to main content
Skip pdfn Cloud and run the full pipeline yourself. You control the browser, the infrastructure, and the output.
Want managed PDF generation? Use client.generate() with pdfn Cloud — no infra or browser management needed.

How it works

  1. render() converts your React template to self-contained HTML
  2. You pass that HTML to Puppeteer or Playwright to generate a PDF

Setup

Add @pdfn/tailwind if your templates use Tailwind CSS. See Styling.

Required PDF options

Always use these two options when calling page.pdf():
And always wait for pdfn to finish pagination before generating:
This ensures fonts are loaded and page breaks are calculated.

Comparison

pdfn CloudSelf-Hosted
SetupManaged — no infra or browser setupYou manage infra and Chromium
ScalingAuto-scalesYou handle scaling
CompliancePDF/A-1b, PDF/A-2b, PDF/A-3bNot available
CostUsage-based pricingYour infrastructure costs

Next steps

Styling

Tailwind CSS, custom CSS, and inline styles

Troubleshooting

Error codes, common issues, and fixes