PDF templates

Last verified: 2026-08-21

PDF templates define structure and markup of exported reports. The mobile app and server share the same template engine — draft and archive PDFs are structurally aligned (difference: integrity page / signature metadata on archive). Visibility and format are set per template; image quality for downloads and archives is organization-wide — see PDF settings.

Built-in vs custom

Built-in Custom (tenant)
Source shipped (classic, minimal, bold, …) maintained in the Admin PDF editor
Tech Handlebars + CSS in the shared package per-organization Handlebars sources + CSS
Typical pages cover, canvas/mapping, annotations, forms (formHbs), signature same slots, overridable
When defaults and quick variants institution-specific layout

Resolver order: tenant custom → built-in → fallback.

Forms in the PDF

Forms assigned to a report type appear in the PDF via the formHbs slot. Field visibility is controlled in the Form Builder (pdfVisible); PDF presentation via template and CSS. See the project’s form-builder documentation for the data model.

Cursor skill for templates

For PDF template work (slots, Handlebars helpers, CSS, formHbs, render options) we can provide a Cursor skill — similar to the form-builder skill. Agents and developers can then adjust templates against @documentr/pdf-templates conventions without breaking layout contracts.

The skill lives in the repo at .cursor/skills/pdf-templates/ and points to the relevant packages and Admin editor paths.

Suggested path

  1. Start with a built-in template and PDF settings
  2. Preview a draft PDF
  3. Deepen custom template or formHbs only when needed
  4. Finalize and review the archive PDF

See also: PDF export, Export overview.