Skip to content

Invoice PDF template: render it from Markdown

Everything a transactional document needs and nothing it doesn't. The Invoice template is sans throughout at 9pt, in a restrained slate that photocopies and faxes as cleanly as it prints — hairline dotted rules separating each region, borderless zebra line items, and a totals ladder that puts the amount due where the eye lands first. It is the only built-in theme designed around Inkrun's document blocks rather than around prose.

Before and after

Plain Markdown in. A invoice worth sending out.

An invoice isn't prose, so you don't write it as prose. Declare the regions — masthead, parties, meta, totals, payment — and write the line items as an ordinary Markdown table. Then let Inkrun do the arithmetic: set compute: true and the totals are summed from the line items and formatted for your currency and locale, so a generated invoice can't quietly be off by a cent. Your logo is a URL in the frontmatter; the certification or registration line at the foot of every page is one more frontmatter key.

invoice.mdmd
---
title: Invoice INV-2026-014
logo: https://example.com/logo.png
footer_note: Acme Ltd · Reg. 514517654 · VAT PT514517654
footer_page_label: Page
currency: EUR
locale: en-IE
---

```masthead
badge: ORIGINAL
title_label: Invoice no.
title: INV-2026-014
brand: Acme Ltd
---
| Issued: | 2026-07-29 |
```

```parties
to_caption: Bill to
---
| From | To |
| --- | --- |
| Acme Ltd | Globex SA |
| 12 Harbour Road | 4 Rue Centrale |
| Lisbon, Portugal | 69002 Lyon, France |
| VAT: PT514517654 | VAT: FR40303265045 |
```

```meta
---
| Reference: | Terms: | Due: | Total: |
| --- | --- | --- | --- |
| PO-4471 | 15 days | 2026-08-13 | €1,279.20 |
```

| Item | Unit | Qty | Net | VAT | Total |
| --- | ---: | ---: | ---: | ---: | ---: |
| **DOM-01** - Domain renewal, 12 months | €40.00 | 1 | €40.00 | 23% | €49.20 |
| **MIG-02** - Mailbox migration | €250.00 | 1 | €250.00 | 23% | €307.50 |
| **WEB-03** - Website rebuild | €750.00 | 1 | €750.00 | 23% | €922.50 |

```totals
title: Tax summary
compute: true
net_column: Net
rate_column: VAT
total_label: Total due:
total: {gross}
---
| Rate | Base | Amount |
| --- | --- | --- |
| VAT 23% | €1,040.00 | €239.20 |
===
| Subtotal: | {net} |
| VAT: | {tax} |
```

```payment
title: Bank transfer
note: Please quote the invoice number with your payment.
---
| IBAN: | PT50 0000 0000 0000 0000 0000 1 |
| SWIFT/BIC: | XXXXXXXX |
```
invoice.pdfpdf

Render it your way

Three ways to render the invoice.

Dashboard

Paste your Markdown in the editor, pick Invoice, and download the PDF. No code involved.

REST API

curl https://inkrun.dev/api/v1/render \
  -H "Authorization: Bearer sk_..." \
  -H "Accept: application/pdf" \
  -d '{"template": "invoice", "markdown": "# ..."}' \
  --output invoice.pdf

MCP · your agent

Add the Inkrun MCP connector once, then ask your agent:

“Invoice Globex for the three line items in this thread and render it with the invoice template.”

FAQ

Invoice template: common questions.

Does Inkrun calculate the totals?

It can, and it should. Set compute: true in the totals block and name your net and VAT columns; Inkrun sums the line-item table and formats the result for your currency and locale. That matters most when an AI agent writes the invoice — the model describes the work, Inkrun does the arithmetic, and nobody ships an invoice that's off by a cent.

Can I use it for quotes, receipts and statements too?

Yes — the template hardcodes no wording. Every label on the page comes from your document, so the same layout prints a quote, a receipt, a credit note or a monthly statement, in any language.

Is this legally valid invoicing software?

No. Inkrun renders a document that looks like an invoice; it does not issue one. Jurisdictions with certification requirements — Portugal's AT certification and ATCUD, Italy's SdI, and others — require invoices to be issued by certified software with registered numbering. Use Inkrun for quotes, proposals, statements and receipts, or to render documents whose numbering comes from your invoicing system.