Open-source document generation

Design visually.
Print it from code.

Drawing a PDF with pdfkit, or keeping an HTML-to-PDF pipeline from breaking, takes more code than it should. With Imprime you lay the document out in an editor, mark the parts that change as variables, and get each PDF from an API call or from your AI agent. Every PDF looks exactly like the page you drew.

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

    Put a variable wherever the content changes: a name, a date, an amount.

  3. 03

    Generate

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

Built for developers

Draw the template once, fill it from your code

Design the template

Place text, images and shapes on the page and style them as you would 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. Values are matched by name, and Imprime refuses to render if a required one is missing.

Read the variables guide →

Call the API

Send the values as JSON with an API key and the PDF comes back in the response. It is a plain HTTP call, so any language can make it.

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

Connect Imprime to Claude or any other MCP client, with OAuth 2.1 or an API key, then ask for the document in a sentence.

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

Run it on your servers, ship it in your product

Imprime is under the Apache 2.0 license. As long as you keep the license and copyright notices, you can:

  • Use it commercially
  • Embed it in your product
  • Change the code
  • Host it on your own servers

If you would rather not run it yourself, the hosted version at imprime.io will be a monthly subscription, which pays for the servers. It runs the same open-source code as the repository.

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. Stars help other developers find it.