PDF generation API
for developers & AI agents
Generate perfect PDF from HTML with a single API call.
curl -X POST https://api.pdfend.com/v1/generate \
-H "Authorization: Bearer pk_live_..." \
-d '{"html": "<h1>Hello</h1>"}'Everything you need to print the web, nothing you don't.
A small set of primitives that compose well. Ship invoices, reports, certificates, or anything else your HTML can describe.
HTML to PDF
Send HTML + CSS, get a pixel-perfect PDF. Tailwind, Google Fonts, page breaks — all handled.
Template Engine
Store reusable templates with Handlebars. Send data, receive PDFs.
MCP Server
Let Claude, ChatGPT, and AI agents generate PDFs directly.
TypeScript & Python SDKs
First-class SDKs with full type safety.
Fast & Reliable
Sub-2-second generation. Chromium-powered rendering.
Simple Pricing
Free tier included. No surprises.
Three lines, and you're shipping.
TypeScript, Python, or raw HTTP. Same endpoint, same response shape, same free tier.
import PDFend from "@pdfend/sdk";
const pdfend = new PDFend("pk_live_...");
const { url } = await pdfend.generate({
html: `
<h1>Invoice #1042</h1>
<p>Amount due: <strong>$249.00</strong></p>
`,
options: {
format: "A4",
margin: { top: "1in", bottom: "1in" },
},
});
console.log(url);
// → https://api.pdfend.com/v1/files/abc123.pdfFrom HTTP request to stored PDF, in four steps.
Send HTML or a template reference
Raw HTML for one-offs, a Handlebars template + data for reusable documents. One endpoint, one request.
We render with Chromium
Your document loads in an isolated Chromium context, fonts auto-load, images fetch, then we print to PDF.
Upload, store, and return a URL
The PDF lands in S3-compatible storage behind a signed URL. You get the URL back — attach to email, redirect users, store in your DB.
Webhooks and logs
Async jobs POST to your webhook on completion. Every generation is in the dashboard with status, duration, and replay.
What people build with PDFend.
Six patterns drive most of the traffic we see — none of them required more than the usual HTML templates you already ship.
Invoices and receipts
Per-user billing with branding, multi-currency, taxes, line items. Sync mode for instant delivery, async for month-end batches.
Reports and exports
Weekly KPI reports, quarterly board packets, audit logs. SVG charts print crisp, tables page-break cleanly.
Contracts and agreements
NDA, MSA, DPA templates with Handlebars variables. Headers, footers, page numbers — everything long documents need.
Certificates and tickets
Fixed-layout single-page documents. Custom fonts, backgrounds, QR codes rendered from SVG, pixel-perfect output.
AI agent outputs
Claude or your own agent produces a research summary or workflow result — turn it into a PDF via MCP, no integration code.
wkhtmltopdf migrations
wkhtmltopdf was deprecated in January 2023. PDFend is a drop-in HTTP replacement for the shell-out pattern.
Built like the tools you actually love.
Typed SDKs, real errors, a log viewer, an MCP server. The quality bar is Stripe, Resend, Linear — and it shows.
Every error is typed
PDFendError carries code, statusCode, requestId, and details. Catch, branch, retry. No string-parsing.
Async + webhooks
Long renders don't block your process. Fire, forget, receive a signed POST when it's done.
Full generations log
Every request, status, duration, size. Filter, replay, export. Debug production like a human.
Handlebars templates
Create once, render per call with data. Versioning, sample data for preview, all first-class.
Google Fonts auto-loading
Use any of 1,400+ families without extra <link> tags. Our renderer detects and injects.
MCP server for agents
Claude, Cursor, ChatGPT desktop. One config entry — your agent has native PDF tools.
Simple, transparent, no surprise invoices.
Start on Free · Scale when you're ready
Frequently asked questions.
01How is PDFend different from running Puppeteer myself?+
02What rendering engine do you use?+
03What SDKs do you offer?+
04Is there really a free tier?+
05Do you support AI agents?+
06How fast is a typical render?+
07Can I self-host PDFend?+
08What about data privacy?+
Start generating PDFs in thirty seconds.
Create a free account, grab an API key, make your first request. Everything you read about above is already live.