Summary:

TailPDF is an HTML to PDF API that renders with a real Chromium browser. Tailwind CSS, Flexbox, Grid, and Google Fonts all work out of the box.

I built TailPDF because generating PDFs shouldn't mean fighting CSS from 2008.

If you've ever used Dompdf or wkhtmltopdf, you know the pain. No Flexbox. No Grid. Tailwind classes that half-render. Fonts that won't load. You end up maintaining two completely different layouts — one for the browser, one for the PDF.

TailPDF fixes that. Send HTML, get a PDF. It renders with a real Chromium browser, so what works in Chrome works in your PDF.

How It Works

One API call:

curl -X POST https://api.tailpdf.com/pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "<div class=\"p-8 font-sans\"><h1 class=\"text-2xl font-bold\">Invoice #1042</h1></div>"}'

PDF back in under a second.

Tailwind classes work. Google Fonts load automatically. Flexbox, Grid, @media print — all of it.

The CSS Asset System

This is the bit I'm most excited about. If you're a SaaS generating branded PDFs for hundreds of customers, you don't want to send 150KB of CSS with every request.

Upload your CSS once, get an ID back, reference it forever:

# Upload once
curl -X POST https://api.tailpdf.com/css \
  -d '{"css_id": "acme-brand", "css": "..."}'

# Use everywhere
curl -X POST https://api.tailpdf.com/pdf \
  -d '{"content": "<div>Invoice</div>", "css_id": "acme-brand"}'

Requests drop from 150KB to 2KB. Generation goes from ~1.5s to ~0.5s.

What's Under the Hood

Cloudflare Workers at the edge. Browser Rendering API for the actual PDF generation. KV caching for auth, CSS assets, and fonts. Your request hits the nearest Cloudflare edge node, renders in a real browser, and comes back as a PDF. No Chrome instances to manage. No Docker containers. No scaling headaches.

Pricing

Free tier: 100 PDFs/month. Enough to build and test.

Starter: $12/month for 1,000 PDFs. Pro: $49/month for 10,000. Scales from there.

No per-page fees, no surprise charges. Overage rates are published and predictable.

Go Try It

Sign up at tailpdf.com. You'll have an API key in 30 seconds and a PDF in 60.

If you're currently fighting Dompdf, wkhtmltopdf, or managing your own Puppeteer setup — this is the upgrade.