Skip to content
Faldaro
All guides

Documents

A document template turns a submission into a PDF: a quote, a policy schedule, an inspection report, a receipt. Templates are built from blocks rather than markup, so what a template can do is a closed set the platform fully understands.

Building a template

Templates live under Documents and are edited as blocks — headings, paragraphs, tables, lists, images, page breaks. Inside text you merge values from the submission by referencing field slugs, and a computed value can be calculated in the template itself using the same expression language as formulas.

Blocks can be conditional (show this paragraph only when a condition holds) and repeated (one table row per item). Presentation — currency, whole numbers — is applied after a value is calculated, never inside the calculation, so a formatted figure can never be mistaken for a number to compute with.

Table rows can repeat too — one row per line item of a list-valued field — and a row can carry its own condition, so a totals row appears only when there is something to total. Page setup travels with the template: size, orientation, margins, a typeface and text size, page numbers, and running header and footer lines that can merge submission values.

Templates are versioned like forms: publishing freezes a version, and a document generated against a submission renders through the version that was live for it. Editing a live template starts a new draft and changes nothing already produced.

Starting from a description or a PDF

Where AI is configured, the editor can draft the template for you: describe it in a sentence, pick the form whose fields it should merge, or hand it the paperwork you send today. A reproduced PDF keeps its structure and wording, its embedded images are extracted into your account's own files and placed where the source shows them, and the page setup — size, margins, typeface — is matched as closely as the block vocabulary allows. Each blank or fill-in area comes back as a merge field. The result lands in the editor unsaved, for you to read and adjust like anything else; a document too rich to reproduce in one template says so rather than returning half of one.

Exact reproduction: the facsimile engine

When the document must look like the original — a government form, a certificate, a carrier-branded schedule — rebuild-as-blocks is the wrong tool, and the editor has a second one: Reproduce a PDF exactly. The PDF's own pages become the template, line for line and column for column: rules and boxes stay vector-sharp, text stays selectable and editable, logos and icons — every one of them — become ordinary images in your files. Converting is plain computation, not AI, and costs no credits.

You then bind the form on top: click a line to merge a field into it, white-out pre-printed content a value replaces, give any element a condition, or group a row of elements and repeat it per item of a list field — with the same expression language as everywhere else, and nothing that executes code. Where AI is configured, one prompt does the binding pass for you — “make the name, date and policy-number lines merge fields” — and every proposed edit lands on the canvas for your review. The assistant can edit these templates too, through the same operations.

Long values behave like the page was typeset for them: a bound area can soft-wrap into its column and grow its row, pushing everything below down while the row's own background stretches — and growth is capped by the page itself, so when a value would push the page's footer off the edge, the grown text compresses slightly instead.

Typography is matched, not defaulted. The source's typefaces map onto bundled open faces: the geometric sans a branded document is set in lands on one with the full light-to-bold weight hierarchy, and the standard office faces land on metric-compatible equivalents, so column widths hold and substituted lines keep their measure. The editor's canvas and the painted PDF draw from the same font files — what you see while binding is what prints. Bullets and checkmarks drawn in symbol fonts come through as real characters, not the stray letters their raw codes spell.

Honest edges, each reported at conversion rather than discovered later: gradients and fill patterns are left out, a repeated row stops at the limit you set rather than flowing onto continuation pages, and glyphs outside the bundled typefaces print as ?. Generated PDFs are painted directly from the pages — searchable text, not screenshots.

Why blocks instead of HTML

The renderer builds the output itself from a closed node set and never parses markup you supply. Every merged value is escaped on the way in, and the PDF converter is denied every external resource — a template cannot make this server fetch anything, and a submitted value cannot smuggle markup into your paperwork.

Templates written as raw HTML before blocks existed keep rendering exactly as they always have. Published versions are immutable, so nothing converts implicitly: the editor converts only when you ask, and nothing changes until you save.

Images

An image block names a file you have uploaded to Faldaro, never a URL. Uploads are accepted on the strength of the bytes themselves rather than the filename, and are embedded directly into the PDF. This is why a document renders identically for everyone, forever: there is no remote asset to move, expire, or be blocked by a mail client. Images extracted from a reproduced PDF become ordinary files of yours through exactly the same door, subject to the same size checks and storage allowance as a hand upload.

Generating a document

Documents are produced on demand from a submission, or automatically by a workflow transition or a rule — "when the claim reaches Approved, generate the settlement letter". Generated documents attach to the submission and are listed on it.

Generation happens after the transition commits, so a template that fails cannot un-move a record — and one document blowing its limits never discards the other effects of the same move.

Limits, and why they exist

Rendering has a budget: how many nodes it visits, how deep they nest, how many rows a repeat may produce, how large the output may grow. Repeat counts come from submitted data, which means an unbounded template is an unbounded amount of work bought with one submission. Ordinary documents never approach these limits.

The renderer skips anything it does not recognise rather than failing — a live document must degrade, not vanish. That tolerance is precisely why publishing is strict: expressions that do not parse, and content that could never render, are refused at publish time, when the author is present to fix them.

  • Notifications share this template engine for email, minus images and page breaks.
  • Digital products deliver files to submitters, which is a different thing from generating one.