Conditional templates

Show the right PDF content for each data state

Use explicit request data to include or hide visual sections without duplicating complete document templates.

How it helps

Keep conditions understandable and testable

Status messages

Display paid, unpaid, overdue, approved, or draft presentation from an application-supplied status.

Optional sections

Include notes, addresses, discounts, clauses, or branding regions only when required.

Preview every state

Maintain fixtures for true, false, absent, and edge-case values before promotion.

Keep rules in code

The application decides the business state; the template decides how that approved state appears.

Start with a real document

Create a template and generate your first PDFs without a credit card.

Create a conditional template