# pdfs.build > PDF template engine and rendering API. Define templates with dynamic variables, pass JSON data, and render pixel-perfect PDFs in milliseconds. Design templates using an AI chat agent with live preview. Integrate via REST API or MCP (Model Context Protocol) for AI tools. ## Product - [Home](https://pdfs.build/): Overview, pricing, and product positioning - [Web application](https://app.pdfs.build/): Sign in, template builder, and account (primary product experience) - [Pricing](https://pdfs.build/pricing/): Plans, included render quotas, and credit packs - [About](https://pdfs.build/about/): Who operates pdfs.build, company registration, and contact - [Programmatic PDF generation with templates](https://pdfs.build/generate-pdf-from-template/): High-performance REST API for dynamic PDF rendering from templates and JSON schemas without headless browsers - [Embedded document editor API](https://pdfs.build/embed/) ([md](https://pdfs.build/embed.md)): White-label React SDK (@pdfsbuild/react) for SaaS platforms to embed an in-app PDF designer with scoped session tokens - [MCP server](https://pdfs.build/mcp/): hosted Model Context Protocol endpoint that gives AI agents the whole template lifecycle (design, compile, publish, render) as tools; OAuth sign-in, no API key, available on every plan - [Odoo integration](https://pdfs.build/odoo/): free LGPL-3 module for Odoo 17, 18 and 19 (Odoo.sh or self-hosted; Starter plan or higher) that prints any Odoo record, including the stock invoice and quotation reports, with a pdfs.build template. Listing: https://apps.odoo.com/apps/modules/19.0/pdfs_build/ — source: https://github.com/pdfs-build/odoo. The gallery's Odoo category (`https://pdfs.build/templates/odoo-invoice/`, `odoo-quotation`, `odoo-purchase-order`, `odoo-delivery-slip`) holds designs whose fields are Odoo's own, so the module maps them with no expression to write - [Template gallery](https://pdfs.build/templates/): first-party document designs by pdfs.build — invoices, statements, reports, proposals, certificates and more, each openable in the editor in one click. Filterable by category at `/templates/?category={category}` - `https://pdfs.build/templates/{use-case}/`: every design for one document type (e.g. `/templates/invoice/`, `/templates/packing-slip/`), with a comparison of layout, palette and typography and a statement of what repeats and what grows under real data - `https://pdfs.build/templates/{use-case}/{variant}/`: one design — every rendered page of the compiled document, the downloadable PDF, and its full reflow contract - [Templates by role](https://pdfs.build/for/): document sets assembled per audience at `https://pdfs.build/for/{role}/` — accountants, freelancers, agencies, consultants, real-estate agents, e-commerce sellers, startup founders, HR, marketing, educators, legal ## Use cases How specific document types get generated from data, with the request body and the designs to start from. - [Invoices](https://pdfs.build/use-cases/invoices/): Render invoices, commercial invoices and receipts from line-item data over the API. - [UAE Tax Invoices & E-Invoicing](https://pdfs.build/use-cases/uae-tax-invoices/): Generate bilingual Arabic/English UAE tax invoices with TRN validation, QR codes, and Peppol PINT XML data models. - [Reports](https://pdfs.build/use-cases/reports/): Turn metrics into branded reports on a schedule — marketing, annual, SaaS and investor updates. - [Certificates](https://pdfs.build/use-cases/certificates/): Issue personalised certificates and awards in bulk from a recipient list. ## Migrating from another renderer What changes when moving off a different PDF toolchain, what is given up, and when the existing tool is still the better choice. - [Moving off wkhtmltopdf](https://pdfs.build/alternatives/wkhtmltopdf/): Archived since 2023, last release 2020, and carrying an unpatched critical CVE. - [Moving off Puppeteer](https://pdfs.build/alternatives/puppeteer/): A real Chrome renders your page — with a real browser's operational cost. - [Moving off WeasyPrint](https://pdfs.build/alternatives/weasyprint/): A genuinely good paged-media engine — until the rendering has to leave Python. - [Moving off DocRaptor](https://pdfs.build/alternatives/docraptor/): A genuinely good paged-media engine behind an HTML API — the closest thing here to a peer. - [Moving off PDFMonkey](https://pdfs.build/alternatives/pdfmonkey/): HTML, CSS and Liquid rendered by Chrome, with a dashboard in front of it. - [Moving off PDFShift](https://pdfs.build/alternatives/pdfshift/): A clean HTML-to-PDF conversion API. Conversion is the whole product. - [Moving off Carbone](https://pdfs.build/alternatives/carbone/): Templates authored in Word or LibreOffice — a real strength, with a conversion step attached. - [Moving off APITemplate.io](https://pdfs.build/alternatives/apitemplate-io/): A visual editor covering PDFs and social images, aimed as much at no-code as at developers. - [Moving off PDF.co](https://pdfs.build/alternatives/pdf-co/): A broad PDF toolbox — extraction, conversion, manipulation — where generating a document is one endpoint among many. - [Moving off Anvil](https://pdfs.build/alternatives/anvil/): A paperwork platform — form filling, e-signature and webforms — with PDF generation as one component of the suite. - [Moving off CraftMyPDF](https://pdfs.build/alternatives/craftmypdf/): A drag-and-drop template editor with a JSON API, aimed at invoices, certificates and labels. - [Moving off Documint](https://pdfs.build/alternatives/documint/): A no-code document designer wired into Airtable, HubSpot and automation tools, with an API alongside. - [Moving off DocuGenerate](https://pdfs.build/alternatives/docugenerate/): Word templates with merge tags, filled from JSON or a spreadsheet, with PDF produced by converting the Word output. - [Moving off PDF Generator API](https://pdfs.build/alternatives/pdf-generator-api/): A drag-and-drop template editor you can embed for your own customers, with a wide set of document services around it. - [Moving off Plumsail Documents](https://pdfs.build/alternatives/plumsail-documents/): A document-workflow platform for Office, PDF and HTML templates, with automation and delivery built in. ## Public REST API - Base URL: https://api.pdfs.build - Auth: `Authorization: Bearer prs_...` API keys (create via Settings → API Keys, or via the MCP tool `create_api_key`) - [API reference](https://pdfs.build/docs/): Endpoints, request/response shapes, errors, rate limits - [API reference (Markdown)](https://pdfs.build/docs.md): Same reference as plain Markdown for agents - [OpenAPI 3.1 spec](https://pdfs.build/openapi.json): Machine-readable description of every endpoint, request and response — for client generators and agents - [API explorer](https://pdfs.build/docs/api/): Interactive reference rendered from the spec, with a try-it client - [Embedded document editor API guide](https://pdfs.build/embed/) ([md](https://pdfs.build/embed.md)): Embedding the white-label editor in a React app with session tokens and theming - Endpoints: - `POST /v2/organizations/{organizationId}/templates` — create a draft with a client-managed external ID - `PATCH /v2/organizations/{organizationId}/templates/{externalId}` — rename the external ID - `POST /v2/organizations/{organizationId}/templates/{externalId}/publish` — promote a draft to published so the render API can use it - `POST /v2/organizations/{organizationId}/templates/{externalId}/unpublish` — move a published template back to draft - `POST /v2/organizations/{organizationId}/templates/{externalId}/render` — render an organization-scoped published template against a JSON data payload, returns `application/pdf`. Pass `"async": true` to render in the background (202 with a job handle) instead of waiting for the PDF - `GET /v2/organizations/{organizationId}/renders/{jobId}` — poll an async render job (`queued` | `processing` | `success` | `error`) - `GET /v2/organizations/{organizationId}/renders/{jobId}/pdf` — download a finished async render (409 while the job is pending) - `POST /v2/organizations/{organizationId}/templates/{externalId}/batches` — render up to 500 documents from one template in one request (`{ items: [{ data }] }`); all-or-nothing quota admission, one template version for the whole batch, one `batch.completed` webhook when every item has finished - `GET /v2/organizations/{organizationId}/batches/{batchId}` — batch progress plus each item's job id, status and download URL - `/v1/*` remains supported for clients that identify templates by generated internal IDs - `GET /v2/organizations/{organizationId}/templates`, `GET /v2/organizations/{organizationId}/templates/{externalId}` — list and inspect templates and their JSON Schemas - `GET /v2/organizations/{organizationId}/logs`, `GET /v2/organizations/{organizationId}/templates/{externalId}/logs` — render logs for auditing - Outbound webhooks (every paid plan): `render.completed` / `render.failed` / `batch.completed` / `webhook.test` events for API renders, signed with the Standard Webhooks (svix-compatible) scheme; manage endpoints in the dashboard under Developers → Webhooks, over MCP (`create_webhook` etc.), or via the v2 API (`GET/POST /v2/organizations/{organizationId}/webhooks`, `PATCH/DELETE .../webhooks/{id}`, `POST .../webhooks/{id}/rotate-secret|test`, `GET .../webhooks/{id}/deliveries` — create/rotate/test need a paid plan) ## Importing an existing document - `.docx` files can be converted into a template rather than rebuilt by hand: the layout, styles and content become template code plus a JSON Schema, which is then editable like any other template. - Available in the app (Templates → Import) and over MCP via `import_docx`, `process_docx_import` and `convert_docx_to_template`. - Best suited to documents whose structure is expressed with real Word styles; heavily hand-formatted files import less cleanly and are faster to redraw. ## MCP server (for AI agents) - Endpoint: https://backend.pdfs.build/mcp - OAuth metadata: https://backend.pdfs.build/.well-known/oauth-authorization-server - Tools (non-exhaustive): `list_templates`, `get_template`, `create_template`, `write_document`, `write_schema`, `write_sample_data`, `compile_document`, `save_template`, `publish_template`, `unpublish_template`, `create_api_key`, `list_api_keys`, `delete_api_key`, `list_webhooks`, `create_webhook`, `update_webhook`, `delete_webhook`, `rotate_webhook_secret`, `test_webhook`, `list_webhook_deliveries`, `browse_templates`, `search_packages`, `list_fonts`, `upload_font`, `confirm_font_upload`, `install_google_font`, `document_reference`, `import_docx`, `convert_docx_to_template` - See: https://pdfs.build/mcp/ (overview, client setup, what it costs) and https://pdfs.build/blog/connect-ai-agents-with-mcp/ ## Template language Templates are written in a typed markup-based template code. Each template must define a top-level `#let render(...named-args) = { ... }` function whose named parameters correspond 1:1 to the JSON Schema fields. The MCP `document_reference` tool exposes the relevant template code topics inline. ## Content - [Blog](https://pdfs.build/blog/): Guides, tutorials, and engineering notes. Every post is also available as plain Markdown at the same URL with a `.md` suffix. - [Print Odoo Invoices and Quotations with a pdfs.build Template](https://pdfs.build/blog/print-odoo-invoices-with-pdfs-build/) ([md](https://pdfs.build/blog/print-odoo-invoices-with-pdfs-build.md)) - [Generate Hundreds of PDFs with One API Call](https://pdfs.build/blog/batch-render-pdfs-with-one-api-call/) ([md](https://pdfs.build/blog/batch-render-pdfs-with-one-api-call.md)) - [How to Generate PDFs from JSON in Next.js 15 (App Router & Server Actions)](https://pdfs.build/blog/generate-pdfs-from-json-in-nextjs/) ([md](https://pdfs.build/blog/generate-pdfs-from-json-in-nextjs.md)) - [How to Build an In-App PDF Editor with an Embedded Document Editor API](https://pdfs.build/blog/how-to-build-an-in-app-pdf-editor/) ([md](https://pdfs.build/blog/how-to-build-an-in-app-pdf-editor.md)) - [From Word Doc to PDF API](https://pdfs.build/blog/from-word-doc-to-pdf-api/) ([md](https://pdfs.build/blog/from-word-doc-to-pdf-api.md)) - [How Our Template Agent Fixes Its Own Compile Errors](https://pdfs.build/blog/how-the-agent-repairs-templates/) ([md](https://pdfs.build/blog/how-the-agent-repairs-templates.md)) - [Keeping Three Typst Engines in Lockstep](https://pdfs.build/blog/three-typst-engines-in-lockstep/) ([md](https://pdfs.build/blog/three-typst-engines-in-lockstep.md)) - [Typst vs LaTeX for Generating Documents from Data](https://pdfs.build/blog/typst-vs-latex-for-data-documents/) ([md](https://pdfs.build/blog/typst-vs-latex-for-data-documents.md)) - [Why We Don't Render PDFs With a Headless Browser](https://pdfs.build/blog/why-not-a-headless-browser/) ([md](https://pdfs.build/blog/why-not-a-headless-browser.md)) - [How to Generate PDFs from JSON Data with an API](https://pdfs.build/blog/generate-pdfs-from-json-data/) ([md](https://pdfs.build/blog/generate-pdfs-from-json-data.md)) - [The pdfs.build MCP Server: PDF Generation for Any AI Agent](https://pdfs.build/blog/connect-ai-agents-with-mcp/) ([md](https://pdfs.build/blog/connect-ai-agents-with-mcp.md)) - [Generate PDFs Programmatically with the REST API](https://pdfs.build/blog/generate-pdfs-with-the-api/) ([md](https://pdfs.build/blog/generate-pdfs-with-the-api.md)) - [Getting Started with pdfs.build](https://pdfs.build/blog/getting-started/) ([md](https://pdfs.build/blog/getting-started.md)) ## Legal & trust - [Security](https://pdfs.build/security/): Encryption, access control, subprocessors, and which certifications are and are not held - [Privacy policy](https://pdfs.build/privacy/): How personal data is handled - [Terms of service](https://pdfs.build/terms/): Terms of use for websites, software, and APIs - [Refund policy](https://pdfs.build/refund/): When and how refunds are issued ## Contact - hello@pdfs.build (general and privacy inquiries) ## Machine-readable discovery - Sitemap: https://pdfs.build/sitemap-index.xml - Markdown mirrors: https://pdfs.build/docs.md, https://pdfs.build/embed.md, and `/blog/.md` for every post - OpenAPI spec: https://pdfs.build/openapi.json - This file: https://pdfs.build/llms.txt