Open-source document generation

Design visually.
Print it from code.

Stop hand-coding PDFs with pdfkit or brittle HTML-to-PDF pipelines. Design your documents in a visual editor, drop variables where the content changes, and generate them at scale from a single API call or from your AI agents. Every PDF matches the design exactly, from the first one to the ten-thousandth.

Template
INVOICE
Billed toname
TOTALtotal
Your data
POST /export/:id/pdf
x-api-key: ••••••••

{
  "name": "Michael Scott",
  "total": "€1,250.00"
}

→ 200 application/pdf
PDF
INVOICE
Billed toMichael Scott
TOTAL€1,250.00
PDF

How it works

From layout to PDF in three steps

  1. 01

    Design

    Build your document in the editor: text, shapes, images, as many pages as you need.

  2. 02

    Parameterize

    Insert variables where the content changes — a name, a date, an amount.

  3. 03

    Generate

    Call the API, ask your AI agent, or click Imprime. Imprime fills the blanks and renders the PDF.

Built for developers

Everything you need to stop hand-crafting PDFs

Design the template

Place text, images and shapes on the page and style them like in a design tool. Add as many pages as you need.

The Imprime editor: pages panel on the left, the canvas in the middle and the layers panel on the right.
Tour the editor →

Mark the variables

Turn any value into a variable. Variables are matched by name, and required ones are checked before rendering.

Read the variables guide →

Call the API

Send the values as JSON with an API key and get the PDF back. Plain HTTP, from any language.

curl -X POST https://app.imprime.io/api/export/<templateId>/pdf \
  -H "x-api-key: $IMPRIME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Michael Scott",
    "date": "March 14, 2026",
    "total": "€1,250.00"
  }' \
  -o invoice.pdf

# → 200 OK, invoice.pdf (application/pdf)
Read the API reference →

Or ask your AI agent

Plug Imprime into Claude or any MCP client, with OAuth 2.1 or an API key, and just ask for the document.

Make the invoice for Michael Scott, €1,250, dated March 14, 2026.
imprime · preview_template
Here's your invoice: Open in Imprime ↗
Opens for you, signed in, for 24 hours. Print the PDF from there.
Same for Dwight Schrute, €980.
imprime · preview_template
Done: Open in Imprime ↗
Connect your agent →

Open source

Yours to use, embed and self-host

Imprime is released under the Apache 2.0 license, a permissive one. Use it in commercial projects, embed it in your own product, modify it, run it on your own servers: it's all fine. The only requirement is to keep the license and copyright notices.

  • Commercial use
  • Embed it in your product
  • Customize it to your needs
  • Self-host on your own servers

Rather not run it yourself? The hosted version on imprime.io will come with a monthly subscription. It pays for the servers and the infrastructure that keep it running. The code stays the same, and stays open.

Read the self-hosting guide →
RemiDufeu / imprime.ioPublic

Open-source document editor for developers. Build templates with placeholders and generate reliable documents on demand via API.

TypeScriptApache-2.0
Star on GitHub

Imprime is an independent project. A star takes one click, helps other developers find it, and shows it's worth the time spent building it.