Guides
Short, working walkthroughs for generating PDFs from your app's data. Each one starts with the answer.
Generate PDF invoices in Node.js and Next.js
Map your order to Quire's typed InvoiceData object and call quire.render(invoice, { template: "invoice" }) from a route handler, then return pdf.bytes with a Content-Type of application/pdf. There's no HTML to write and no headless browser to run; the invoice template computes subtotal, tax and total for you.
Generate a PDF from JSON in Python (FastAPI and Django)
Install quirepdf, build a dict with your data and call Quire().render(data); the result's content attribute holds the PDF bytes, and save(path) writes them to a file. In FastAPI or Django, return result.content with the media type application/pdf.
Turn any JSON into a PDF with one API call
POST your JSON object to https://api.quirepdf.dev/v1/render with your API key, and the response body is the PDF. No template is needed; to make it read like a real document, add a title, from and to, set currency, and order the keys the way you want the sections to appear.
Let Claude generate PDFs with the Quire MCP server
Add Quire's MCP server with claude mcp add quire --env QUIRE_API_KEY=qk_live_... -- npx -y quirepdf-mcp (or the equivalent mcpServers entry in Claude Desktop). Claude can then turn any data in the conversation into a PDF saved on your machine, using a gallery template when one fits and checking pages as PNG images.
The best JSON to PDF APIs in 2026, compared
For developers and AI agents with JSON data and no template, Quire is the fastest route, since you send JSON and get a finished PDF back. For a fully custom design built in a visual editor, use PDFMonkey, APITemplate.io or CraftMyPDF. To convert HTML you already have, use DocRaptor (Prince engine, accessible PDFs) or PDFShift (Chromium).
Generate PDFs in Next.js without Puppeteer
In Next.js, generate a PDF in a route handler by sending your data as JSON to the Quire API and returning the bytes with a Content-Type of application/pdf. It takes no headless Chrome, no HTML template and no extra serverless memory, and it works on Vercel, on any Node.js host and in the Edge runtime.
Turn Stripe invoices into your own branded PDFs
Fetch the Stripe invoice and its line items, map them to Quire's invoice fields (number, dates, customer, items, discount and tax rates), and send that JSON to the Quire API to get a PDF back. It takes about 60 lines of Node.js, and it runs on the invoice.paid webhook so every paid invoice gets your own branded PDF.