Branded PDF invoices and documents from your records
Design a layout template once, then generate branded PDF invoices and documents straight from your records — stored in your Drive, ready to send.
In AxisIQ, a printable document — an invoice, a delivery note, a job card, a quotation — comes straight from the record it describes. You write the layout once in a compact layout language — rows, columns, tables, text and images — attach it to an object type, and every record of that type gains a generate action. The finished PDF is saved into the shared Drive space the template names, and stays listed on the record it came from. This guide walks the whole path, from an empty template to a document that generates itself when an order is packed.
By the end you will have: one working template, a generate button on the records it belongs to, files landing where your team can find them, and an automation that produces the document without anyone clicking.
What you need before you start
- The object type the document is about, with the fields you intend to print already on it — invoice number, date, customer, amounts. If a number is not stored anywhere, no template can print it, so fix that first. The operations layer is where those fields live.
- A shared Drive space for output. Personal spaces are not eligible; generated files are team files. Create one called Documents if you have nothing suitable.
- Permission to manage templates and to generate, plus write access to that Drive space. See Team & Permissions if you are not the owner.
- Your logo as an image file you can embed. Step 4 explains why a URL will not do.
Budget an hour for the first template. The second is mostly copy-and-edit.
Step 1 — Pick the document and the type behind it
Open Templates, create a template, name it for the document rather than the department: Tax invoice, Delivery note, Engineer job card.
Then set the object type it is bound to. That binding is what puts the generate button on the right records — bind Tax invoice to your invoices type and every invoice gets the button; nothing else does. One type can carry several templates, which is how the same order produces both a picking list and a customer-facing note.
Step 2 — Write the layout
The editor is a source pane with a live preview beside it, and a new template starts from a starter layout. The language is small: a <document> with an optional <header> and <footer> that repeat on every page (with page numbers), text and headings, a 12-column <row>/<col> grid, boxes, tables whose header row repeats across pages, images, rules and page breaks. Drop in placeholders where record values belong.
<h1>Invoice {{.record.values.number}}</h1>
<text>{{.org.name}} — issued {{date .record.values.issue_date}}</text>
<text>Due: {{money .record.values.total .org.default_currency}}</text>
The pieces you have to work with are the record's own values, your organisation's name and default currency, the current date and time, any linked records (step 3), and any extra values handed in when a function does the rendering. Helpers cover the formatting that is tedious to do by hand: money with thousands separators, two decimals and the currency code; dates and timestamps in a readable form; upper and lower case.
A template that does not parse is refused at save time. You find out about a missing brace while you are editing it, not when a customer opens the file. Preview as often as you like — a preview renders the PDF and shows it to you without storing anything.
Step 3 — Pull in the line items
Most real documents are a header plus a list: invoice lines, packed items, parts used on a job. If your record links to those rows through a link field, they come along with it, and you loop over them:
{{range .refs.lines}}
<tr><td>{{.values.description}}</td><td>{{.values.qty}}</td></tr>
{{end}}
Two limits worth knowing now rather than later. Linked records resolve one level deep — the lines on the invoice arrive, but the supplier hanging off each line's product does not, so copy anything you need to print onto the row itself. And one render resolves up to fifty linked records in total, which is generous for a delivery note and tight for a monthly consolidated statement.
Guard the loop with a conditional so a record with no lines produces an empty table instead of a mess.
Step 4 — Logo, fonts and the no-network rule
The typesetter runs inside AxisIQ — no browser — and is sealed off from the network. A request to the internet from inside a template does not fail slowly; it cannot leave at all — which is what makes it safe to run layouts your own people wrote.
So images must be embedded in the template rather than linked: convert your logo to an embedded image (PNG, JPEG or GIF) and paste it in. Fonts are bundled — sans, serif and mono, with the rupee sign and other Unicode characters — so there is nothing to embed there. It is a one-time chore, and the document then renders identically every time.
There are size bounds too: a document is capped at 500 pages, and a template's source at 256 KB.
Step 5 — Choose where finished files land
Each template names the Drive space its output goes to. Invoices to Finance, delivery notes to Warehouse — the choice belongs to the template, so nobody picks a folder at generate time and nobody misfiles.
Access follows you rather than the template: the file is saved under your own permissions, so if you cannot write to Finance, generating an invoice there fails instead of quietly succeeding. Anyone who can read the space can read the document afterwards.
Step 6 — Generate from a record
Open any record of the bound type. There is a Documents tab: the generate buttons for that type's templates, and underneath, everything ever produced from this record — what template made it, when, how big it is, and a download link.
Two properties of that trail are deliberate:
- Field permissions carry through. The PDF is built from the record as you are allowed to read it, so a field hidden from you is missing from the output. Nobody has to maintain a cut-down template for the people who should not see buying prices.
- Regeneration adds, it does not overwrite. Each file is named from the template and the record's own label — the invoice number, the customer name — plus the moment it was made, so a corrected render lands beside the original instead of on top of it. Asked later which version went out, you point at a file rather than reconstruct one.
Step 7 — Make it happen without a click
A generate button is fine for ad hoc documents and useless for volume: the document you print every time an order ships should not need a human.
Templates can be rendered from your own functions with a single call — axis.pdf.render with the template and the record — which makes a document one block inside a flow. The pattern is:
- A flow triggers on a record event: an order's status becomes
packed. - It runs a function that renders the delivery note for that order.
- The PDF appears in the Drive space and on the order's Documents tab, unprompted.
The same call works from a Work Queues stage, so an item arriving in Ready to dispatch produces its paperwork on entry. A scheduled flow covers the rest — a monthly statement run on the first of the month, no diary reminder needed.
An automated render still runs under somebody's permissions: a flow uses those of the person who built it, a queue stage those of whoever moved the item. An automation can never print a field that person is not allowed to read.
What this deliberately does not do
Three honest limits, all worth knowing before you commit an afternoon.
The layout is markup, not a drag-and-drop designer. You get complete control — exact margins, page breaks, a table that looks like your accountant's table — and you pay for it in markup. There is a starter layout to adapt, the language is small, and someone comfortable editing a web page will manage fine, but if you were expecting to drag a logo box around a canvas, this is not that.
AxisIQ does not attach the document to an email yet. Phone & Messages sends email, SMS and WhatsApp through your own provider account, but attachments are not supported today. Generation ends with a stored file in Drive; getting the file itself to the customer is your step.
Indic scripts do not render correctly yet. Hindi and other scripts that join letters come out unjoined, so documents should stay in English or another Latin-script language for now.
Variations worth setting up
- Two templates, one type. An internal picking list and a customer delivery note off the same order, with different fields on each.
- Draft versus final. Watermark the layout with a conditional so an unapproved record prints DRAFT across it.
- Multi-language. Templates are just markup; keep one per language and pick the right one in the flow that generates it.
If your workspace is not set up yet, start there and come back to build the invoice.
FAQ
Can AxisIQ email the generated PDF to my customer? Not as an attachment yet. Phone & Messages sends email through your own provider account, but attachments are not supported, so the PDF stays in Drive for you to send on.
Can I generate an invoice PDF automatically when an order changes status? Yes. A flow triggered by the record event runs a function that renders the template, and the PDF appears on the record's Documents tab with no clicks.
Why is my logo missing from the PDF? Because it is linked rather than embedded. The renderer cannot reach the internet, so images and fonts have to sit inside the template itself.
Do I need to know HTML to make an invoice template? Not HTML as such, but some markup, yes. There is a starter layout to adapt and a live preview while you edit; the layout language is a small markup language, similar in feel to HTML, rather than a visual designer.
Will a PDF leak fields that the person generating it cannot see? No. The document is built from the record as that person is permitted to read it, so a hidden field is hidden in the output too.