Want managed PDF generation? Use
client.generate() with pdfn Cloud — no infra or browser management needed.How it works
render()converts your React template to self-contained HTML- You pass that HTML to Puppeteer or Playwright to generate a PDF
Setup
- Puppeteer
- Playwright
Add
@pdfn/tailwind if your templates use Tailwind CSS. See Styling.Required PDF options
Always use these two options when callingpage.pdf():
Comparison
Next steps
Styling
Tailwind CSS, custom CSS, and inline styles
Troubleshooting
Error codes, common issues, and fixes