Skip to content

Templates

Gil Cleber Barboza edited this page Nov 12, 2026 · 1 revision

Templates

Bundled templates

  • tabular.jinja (default) — hierarchical report over base.jinja
  • sections.jinja — composed documents (sections payloads)
  • tabular_sections.jinja — reusable macros (render_group, render_detail, render_summary, …)

Custom templates

Point template_dir at your own .jinja directory and pick a file:

generate_pdf(payload, template_dir="my_templates", template_name="invoice.jinja")
isis-report generate order.toon --template-dir my_templates --template-name invoice.jinja

The directory layers over the bundled one: you can override tabular.jinja or reuse the bundled macros. Every template receives dataset, layout, meta, plus the fmt(value, mask) formatter and zip. See examples/custom.jinja.

Theming without a custom template

Set meta.accent_color to rebrand the header (--brand-color CSS variable):

{"meta": {"title": "Sales", "accent_color": "#1B7A3D"}, ...}

Page footer

Every PDF page carries: print date (left, meta.printed_at, auto-filled) · page count (center) · powered by mark with the logo (right). Date/page strings follow meta.locale (pt → "Impresso em / Página X de Y"). Pass your own footer_template/header_template via pdf_options (or --header-template/--footer-template) to replace it.

Clone this wiki locally