PDF Templates
Create HTML-based templates for generating PDF documents from grievances and disciplinary cases.
Overview
PDF templates use HTML with variable placeholders that are automatically replaced with real data when a PDF is generated. This lets you create professional, consistent documents for grievance forms, disciplinary reports, and other records.
Managing Templates
Creating a Template
- Go to Settings → PDF Templates
- Click Add Template
- Fill in:
- Name — e.g., “Grievance Form”
- Description — Brief description of the template’s purpose
- Type — General, Grievance, or Disciplinary
- Content — HTML template with variable placeholders
- Toggle Active on or off
- Click Create
Template Types
| Type | Used For |
|---|---|
| General | Available for both grievances and disciplinary cases |
| Grievance | Only shown when generating PDFs from grievances |
| Disciplinary | Only shown when generating PDFs from disciplinary cases |
Editing a Template
- Find the template card on the PDF Templates page
- Click Edit
- Make your changes
- Click Update
Template Variables
Use double curly braces to insert dynamic data. Variables are replaced with actual values when the PDF is generated.
Grievance Variables
| Variable | Description |
|---|---|
{{grievance.number}} | Grievance case number |
{{grievance.description}} | Grievance description |
{{grievance.relief_requested}} | Relief requested text |
{{grievance.filing_date}} | Date the grievance was filed |
{{grievance.job_title}} | Member’s job title on the grievance |
{{member.name}} | Full name of the member |
{{department.name}} | Department name |
{{department.commissioner}} | Department commissioner/supervisor |
{{organization.name}} | Your organization’s name |
Disciplinary Variables
| Variable | Description |
|---|---|
{{case.number}} | Disciplinary case number |
{{case.status}} | Current case status |
{{case.type}} | Case type (Attendance, Conduct, etc.) |
{{case.filingDate}} | Date the case was filed |
{{case.description}} | Case description |
{{member.firstName}} | Member’s first name |
{{member.lastName}} | Member’s last name |
{{representative.name}} | Representative’s name |
Loop Variables
Use {{#each}} blocks for repeating data:
{{#each steps}}
<tr>
<td>Step {{this.stepNumber}}: {{this.name}}</td>
<td>{{this.status}}</td>
</tr>
{{/each}}Generating a PDF
From a Grievance
- Open a grievance detail page
- Click Generate PDF in the sidebar
- Select a template from the dropdown
- Click Generate & Download
From a Disciplinary Case
- Open a disciplinary case detail page
- Click Generate PDF in the sidebar
- Select a template from the dropdown
- Click Generate & Download
The PDF is generated in your browser and downloaded automatically.
Default Template
If no templates exist when you first visit the PDF Templates page, a default grievance form template is created automatically. You can edit or replace it as needed.
Tips
The template content is standard HTML with inline CSS. Use tables for layout and inline styles for formatting — external stylesheets are not supported.
PDFs are generated at A4 size (210mm Ă— 297mm). Design your templates with this page size in mind.