Invoices, statements, and financial reports share a simple structure — a header, a table of line items, a summary, and some footer metadata. Markdown handles all of that cleanly, which makes Blink PDF an ideal engine for document generation at any scale. You define a template once, fill in the variables at runtime, and receive a print-ready PDF in about 100ms with no layout code to maintain.Documentation Index
Fetch the complete documentation index at: https://docs.blinkpdf.io/llms.txt
Use this file to discover all available pages before exploring further.
The Markdown Template Approach
Rather than wrestling with HTML/CSS layouts or heavyweight PDF libraries, you write your document once in Markdown and parameterize the dynamic parts. Your application merges the data at runtime and sends the resulting string to/v1/render. The workflow looks like this:
Invoice Markdown Template
Below is a complete invoice template. The placeholders in{curly braces} are replaced by your application before the string is sent to the API.
The
metadata.title field you pass in the request body sets the PDF document title (visible in browser tab bars and PDF readers). Use the invoice number or report name for easy identification — for example "Invoice #1042 — Acme Corp".Code Example
This Python example fills the template, calls/v1/render, and saves the PDF to disk. You can adapt it to pull data from a database, a CRM, or a spreadsheet.
Financial Reports
The same template pattern works for any structured financial document. Common report types and their natural Markdown structures:| Report Type | Key Markdown Elements |
|---|---|
| Monthly P&L | H2 sections per category, totals table |
| Budget vs. Actuals | Two-column comparison table |
| Expense Summary | Line items table grouped by category |
| Client Statement | Chronological transactions table |
| Annual Report | Multi-section with H1/H2/H3 hierarchy |
Consistent Branding Across Documents
To maintain a uniform look across all your invoices and reports:- Keep header structure identical across templates — company name, address, and logo alt text in the same position every time.
- Use the same section hierarchy — H1 for the document title, H2 for major sections, H3 for subsections. Blink PDF applies consistent typographic styles to each level.
- Standardize table column widths by keeping column headers concise. Markdown tables auto-size based on content, so shorter headers produce tidier columns.
- Set
metadata.titleprogrammatically using a consistent naming convention (e.g.,"INV-{number} — {client}") so PDFs are identifiable in any file system or document management tool.
Need to generate dozens of invoices at once — for example, at month-end billing? See the Batch Processing guide to learn how to fire concurrent render requests within your plan’s rate limits.