Custom document templates let you control PDF layout with your own HTML. Templates use Handlebars: you write HTML with predefined placeholders, and when a document is generated Fonoa will use your custom template to generate the PDF. By using HTML and CSS, you have full control of what the final PDF looks like!
It is aligned with the transaction data you report when you POST a transaction (mapped on the server, not copied verbatim from the request body).
Typical flow (Fonoa dashboard)
- Navigate to e-Invoicing -> Templates. Create a new template by choosing to load an existing sample
- Editor - Edit Handlebars HTML on the left; the right pane shows a live HTML preview using sample render data (driven by the same schema as production).
- Placeholders — Use the field catalog / autocomplete to insert
{{...}}paths fromDocumentTemplateRenderDataV1. The help icon (?) lists all possible placeholders - You also have the option to use "helpers" to format numbers and dates to your preference
- Save — Name the template and set it active when you are ready to use it. This template will not apply until you have mappings in place (below) and have set to active.
- Attribute mappings - In the attributes section below the editor, add rules that tie this template to a country, transaction type, and business model (including “all countries” / wildcard options where supported). Transaction type matches
typeon the sumitted transaction. - Company override (optional) - When editing a supplier, assign a custom document template to a specific company; that choice overrides country mappings for that supplier.
PDFs for reported transactions then use the resolved template automatically; you do not trigger generation from this screen.
Content rules
Templates must be self-contained:
- Javascript or external resources are not allowed (
src,href, CSSurl(...), and similar). - Inline SVG is allowed.

