Branded document templates (feature 065)
Branded document templates (feature 065)
Section titled “Branded document templates (feature 065)”Summary: Configure organisation-wide brand settings (logo, colours, fonts) and have Ajutant automatically apply them to generated DOCX and PDF documents.
What this feature does
Section titled “What this feature does”Ajutant feature 065 (doc-brand-templates) lets an admin upload and save brand settings that apply to generated documents.
When brand settings are configured, document generation uses them automatically for:
- Word (DOCX): logo in the header, configured fonts, brand primary colour for headings, and secondary colour for table header row backgrounds.
- PDF: logo in the header area, brand colours for headings and table headers, and configured fonts throughout.
If brand settings are not configured, Ajutant uses the existing default styling (graceful fallback, no error).
Status
Section titled “Status”The feature is listed as partial in the feature catalogue entry.
Prerequisites
Section titled “Prerequisites”- You must have access to the admin settings area where brand settings are managed.
- Brand settings are stored as organisation-wide configuration.
Step 1: upload and configure brand settings
Section titled “Step 1: upload and configure brand settings”- Navigate to the brand settings page in the admin settings area.
- Upload a logo image.
- Accepted file types are not fully listed in the source, but the acceptance criteria explicitly mention rejecting invalid types (example:
.exe). - The source states the logo upload has a size limit (example acceptance criteria refers to “under 2 MB”).
- Accepted file types are not fully listed in the source, but the acceptance criteria explicitly mention rejecting invalid types (example:
- Enter brand colours:
- Provide a primary colour hex code (example shown:
#003366). - Provide a secondary colour (used for table header row backgrounds in DOCX).
- Provide a primary colour hex code (example shown:
- Choose fonts:
- Select a heading font from the available options.
- Select a body font from the available options.
- Click Save.
Validation and persistence checks
Section titled “Validation and persistence checks”After saving, the following should hold:
- Refreshing the page shows the saved configuration.
- Reloading the page displays previously saved values (logo, colours, fonts).
- Clicking Remove Logo deletes the logo, and documents revert to unbranded headers.
Error handling (upload)
Section titled “Error handling (upload)”The source specifies that uploads should be rejected with clear errors when:
- The file type is invalid (example:
.exe). - The file exceeds the size limit.
Step 2: generate a branded Word document (DOCX)
Section titled “Step 2: generate a branded Word document (DOCX)”When Ajutant generates a DOCX and brand settings are configured, the Word document should include:
- Logo in the header
- Heading text in the primary colour
- Fonts applied:
- Headings use the configured heading font
- Body text uses the configured body font
- Secondary colour usage:
- Table header rows use the secondary colour as the background
Default behaviour when no brand settings exist
Section titled “Default behaviour when no brand settings exist”If no brand settings are configured, DOCX generation should:
- Use the existing default styling (example given: default Calibri styling)
- Include no logo
- Avoid errors (no regression)
Step 3: generate a branded PDF document
Section titled “Step 3: generate a branded PDF document”When Ajutant generates a PDF and brand settings are configured, the PDF should include:
- Logo in the header area
- Brand colours for:
- Headings
- Table headers
- Configured fonts applied throughout
Default behaviour when no brand settings exist
Section titled “Default behaviour when no brand settings exist”If no brand settings are configured, Ajutant should fall back gracefully to existing default styling (no error).
Notes for reviewers (what to confirm in the UI)
Section titled “Notes for reviewers (what to confirm in the UI)”Because the feature is marked partial, confirm the following against the actual Ajutant UI and document outputs:
- The brand settings page supports uploading a logo and validates file type and size.
- Primary colour hex codes are validated and a swatch preview is shown.
- Heading and body font selections are persisted.
- DOCX output matches the acceptance criteria (logo header, primary colour headings, secondary colour table header backgrounds, fonts).
- PDF output matches the acceptance criteria (logo header area, brand colours for headings and table headers, fonts throughout).
Acceptance criteria checklist (from the specification)
Section titled “Acceptance criteria checklist (from the specification)”Use this checklist to verify the end-to-end behaviour.
Brand settings upload and configuration
Section titled “Brand settings upload and configuration”- Logo upload is stored and a preview thumbnail is shown.
- Primary colour hex code is validated and a swatch preview is displayed.
- Heading font and body font selections persist.
- Clicking Save persists all brand settings as organisation-wide configuration.
- Invalid file type uploads are rejected with a clear error.
- Oversized logo uploads are rejected with a size error.
- Reloading the page shows saved logo, colours, and fonts.
- Remove Logo deletes the logo and documents revert to unbranded headers.
DOCX generation
Section titled “DOCX generation”- Logo appears in the document header.
- Heading text uses the primary colour.
- Headings use the configured heading font, body uses the configured body font.
- Table header rows use the secondary colour as background.
- With no brand settings, default Calibri styling is used and no logo is included.
PDF generation
Section titled “PDF generation”- Logo appears in the header area.
- Headings and table headers use brand colours.
- Configured fonts are applied throughout.