Matruno

Templates and Rendering

Last updated September 21, 2026

Use Matruno document templates for fixed-layout legal packets and flowing legal documents without overstating renderer behavior.

Template types#

Matruno supports two primary document template modes:

Template typePurposeEvidence
pdf_visualFixed-layout packets and page-precise composition using pdfme-compatible designer payloads.Frontend template studio, DocumentTemplateBindingService, passthrough tests, rendered preview behavior.
html_dynamicFlowing HTML documents such as contracts, letters, notices, and email-grade legal correspondence.Dynamic template editor, HTML passthrough rendering, document render service tests.

The template registry is stored in document_templates. Templates are workspace-scoped and can optionally be linked to legal workflow definitions.

Generated output is a legal deliverable candidate. It is not a filed pleading or a substitute for attorney sign-off unless a human approval step records that decision.

Template-owned layout#

For HTML/rich-text templates, the render path preserves the template-owned document instead of wrapping it in a generic backend shell. For visual templates, the binding service preserves the original designer template and applies inputs/bindings rather than flattening the layout.

This supports the safe claim that templates own layout and structure. It does not mean every possible PDF feature or third-party design tool is supported.

Template API#

text
GET /api/v1/templates/
GET /api/v1/templates/available-variables
POST /api/v1/templates/import
POST /api/v1/templates/preview
GET /api/v1/templates/{template_id}
POST /api/v1/templates/{template_id}/duplicate
GET /api/v1/templates/{template_id}/export
POST /api/v1/templates/
PATCH /api/v1/templates/{template_id}
DELETE /api/v1/templates/{template_id}

Template writes require workspace access and one of the allowed write roles: system admin, workspace admin, or process manager.

Workflow bindings#

Workflow step params can reference templates through fields such as document_template_id, document_template_name, and template_bindings. The schema normalizes template IDs, names, and binding tokens before persistence.

Rendered previews#

GET /api/v1/documents/{document_id}/rendered returns rendered previews for supported generated artifacts. Visual template artifacts are preserved as template JSON and rendered client-side; HTML/rich-text artifacts can return server-rendered HTML. Unsupported formats return an explicit error instead of inventing a preview.

Was this helpful?