Document Templates
Build PDF document templates — offers, invoices, delivery notes, and production sheets — with live data from your orders.
Overview
Document templates are how Configo generates PDFs — offers, invoices, delivery notes, production sheets — straight from an order's data. Open Settings → Documents in the project sidebar to see your project's templates. Managing them requires the Edit project permission; viewing and generating documents from within an order uses the separate View documents / Edit documents permissions (see Members & Roles).
The list shows each template's name, whether it's shown on widget, and when it was created/last modified. Click Add to create a new template, or the edit icon on a row to open an existing one.
The editor
The editor is a raw HTML template with two ways to work on it: a code panel (syntax-highlighted, on the left/main area) and a live Preview you can switch to, rendered against realistic sample data so you can see the finished layout without generating an actual order.
The sidebar (or, on mobile, the bar above the editor) has:
- Name (required) — internal name shown in the templates list. Not printed on the document itself.
- Shown on widget — when on, this template becomes available as a print button inside the public widget, so a customer configuring a product can generate their own copy (e.g. an offer) without your team's involvement.
- Logo — an image shown wherever your template references
{{{logo}}}(see below). Optional; if unset, the template gets the textCONFIGOin its place. - Drafts — five starting points: Delivery Note, Invoice, Invoice (Table), Offer, and Production Sheet. Clicking one replaces the current editor content with a ready-made layout for that document type — the fastest way to start rather than writing HTML from scratch. This is destructive to whatever's currently in the editor, so use it before you've made changes you want to keep.
Click Save in the top-right corner to persist the template. New templates redirect you to the same editor with the template now saved, so subsequent saves update it instead of creating duplicates.
Templating language
Templates are plain HTML with Handlebars placeholders, filled in from the order being printed. The available top-level variables are:
order— serial number, dates, paid/discount/subtotal/total amounts (pre-formatted as currency strings), and the other order fields.contact— name, email, phone, address, note.products— an array, one entry per line item on the order: name, quantity, unit, purchase/sale price, markup and discount, plus nestedmaterialsandpartsarrays (populated when the item came from a configurator with Calculations or Parts — for a manually added product these are empty).logo— pre-rendered<img>HTML (or the fallback text) for the template's configured logo.
Reference a field with {{order.serial}}, {{contact.name}}, and so on. Loop over line items with
{{#each products}}...{{/each}}, and use {{#if contact.email}}...{{/if}} to conditionally show optional fields. Use
the Copy JSON control in the editor to copy the exact sample data object being used for the preview — the fastest
way to see the full shape of every available field, including the nested materials/parts arrays, without guessing.
Use {{{logo}}} with triple braces — this outputs raw HTML (the <img> tag) rather than an HTML-escaped string,
which is what a normal {{logo}} would give you.
What HTML is allowed
Generated output is sanitized before it's rendered or turned into a PDF, so only a safe subset of HTML survives:
- Allowed tags:
div,span,style,hr, headings (h1–h6),strong,em,br,p, lists (ul/ol/li), and tables (table/thead/tbody/tr/td/th), plusimg. - Allowed attributes:
style,class,src,alt,width,height, and the table spacing attributes (colspan,rowspan,cellspacing,cellpadding). - Anything else —
<a>links,<script>, inline event handlers (onclick, …), customdata-*attributes — is silently stripped. There's no error for using an unsupported tag; it just won't appear in the output. Style your document with the<style>block and inlinestyleattributes rather than external stylesheets or scripts, which aren't supported at all.
Generating a document from an order
Templates aren't printed from this settings page. Once a template exists, it appears as a button in the toolbar above the product list inside an order's detail panel — click it to preview or generate the PDF for that specific order. See Orders for that workflow, and templates marked Shown on widget are also printable directly by the customer inside the public configurator widget.