Originally published byDev.to
I Built a PDF API That Doesn't Use Chrome
Most PDF generation APIs spin up a headless browser (Puppeteer, Playwright) to render HTML into a PDF. It works, but it's slow, expensive, and unpredictable.
So I built DocForge – a PDF generation API that uses PDFKit directly for deterministic, fast output.
How It Works
POST /api/generate
{
"template": "invoice",
"data": {
"invoice_number": "INV-001",
"from": { "name": "Acme Corp" },
"to": { "name": "Client Corp" },
"items": [...],
"total": 49.99
}
}
→ Returns a PDF in ~3 seconds
Why Not Chrome?
| Headless Chrome | PDFKit (DocForge) | |
|---|---|---|
| Speed | 5-15 seconds | ~3 seconds |
| Memory | 500MB+ per instance | ~50MB |
| Deterministic | ❌ Different renders possible | ✅ Same input = same output |
| Cost | Expensive at scale | Cheap at scale |
5 Templates Available Now
- Invoice – Professional billing with line items
- Receipt – Payment confirmation
- Certificate – Achievement/completion certificates
- Report – Data-driven reports
- Contract – Legal document templates
Free to Try
DocForge is currently free to try. Just grab an API key and start generating PDFs.
What's Next?
I'm adding more templates based on developer feedback. What PDF templates do you need most? Drop a comment below!
Built with PDFKit + Vercel Serverless Functions. No Chrome harmed in the making of these PDFs.
🇺🇸
More news from United StatesUnited States
NORTH AMERICA
Related News
How Braze’s CTO is rethinking engineering for the agentic area
11h ago
Amazon Employees Are 'Tokenmaxxing' Due To Pressure To Use AI Tools
22h ago
KDE Receives $1.4 Million Investment From Sovereign Tech Fund
2h ago
Instagram’s new ‘Instants’ feature combines elements from Snapchat and BeReal
2h ago
Six Claude Code Skills That Close the AI Agent Feedback Loop
2h ago