Clarix
Batches

EBR Document Templates

Customize the header, footer, and cover page of your Electronic Batch Record PDFs using the visual template editor.

EBR Document Templates

Clarix includes a visual template editor that lets your organization personalize the layout of Electronic Batch Record (EBR) PDF exports — including the header that appears on every page, the footer, and the cover block — without affecting the standard compliance MBR download.

How it works

Clarix has two separate EBR export paths:

PathDescription
Download MBRThe standard production PDF generated by the compliance-locked pdf-lib renderer. Never modified by templates.
Download Custom EBRA template-driven PDF that applies your configured header, footer, and cover to the same underlying EBR data. Appears on the batch detail page only after an approved template exists.

Your EBR data (steps, BOM, worksheets, signatures) is always sourced live from the database — templates control the document chrome, not the content.

Creating a template

  1. Go to Settings > EBR Document Templates.
  2. Click New Template.
  3. Give the template a name (e.g., "Standard Compounding MBR").
  4. Use the visual editor to configure:
    • Header Row — left, center, and right zones shown at the top of every PDF page.
    • Cover Block — large title and subtitle on the first page.
    • Footer Row — left, center, and right zones shown at the bottom of every page.
    • Text Block, Divider, Spacer — additional static elements.
  5. Toggle which EBR sections appear in the PDF body using the left panel checkboxes.
  6. Select Page size (US Letter or A4).
  7. Click Save draft.

Merge fields

Anywhere text is entered in the editor, you can use merge fields to insert live batch data at the time the PDF is generated. Wrap the field name in double curly braces:

Merge fieldResolves to
{{batchNumber}}Batch number (e.g., B-2026-0042)
{{productName}}Product name from the master formula
{{productCode}}Product code
{{formulaVersion}}Formula version number
{{organizationName}}Your organization name
{{generatedAt}}Date and time the PDF was generated
{{generatedDate}}Date the PDF was generated
{{scheduledDate}}Scheduled production date
{{completedDate}}Actual completion date
{{batchStatus}}Current batch lifecycle status
{{batchSizeQuantity}}Batch size quantity
{{batchSizeUnit}}Batch size unit (mL, units, etc.)
{{budDate}}Beyond-Use Date (BUD)

Example header:

Left:    {{organizationName}}
Center:  ELECTRONIC BATCH RECORD
Right:   {{batchNumber}}

Approving a template

Templates must be approved before they are applied to downloads. Only approved templates appear in the "Download Custom EBR" action on batch detail pages.

  1. Open the draft template from the list.
  2. Review the layout in the editor.
  3. Click Approve.

Approving a new template automatically supersedes any previously approved template with the same scope (org-wide or formula-specific). Only one approved template per scope is active at a time.

Template scope

ScopeWhen applied
Org defaultApplied to all batches in your organization.
Formula-specificApplied only to batches of a particular master formula, overriding the org default.

To create a formula-specific template, pass the formula ID when creating the template (currently via API; UI support planned).

EBR sections

The left panel in the editor lets you toggle which data sections appear in the PDF body. All sections are read-only in the PDF — data is always sourced from live EBR records:

  • Cover Page
  • Special Instructions
  • Bill of Materials
  • Manufacturing Steps
  • In-Process Controls
  • Environmental Monitoring
  • Particle Readings
  • Visual Inspection
  • Label Reconciliation
  • Lab Samples
  • Yield Summary
  • Annotations
  • Audit Disclaimer

Compliance notes

  • Template approval creates an immutable record. Approved templates cannot be edited — create a new draft and approve it to supersede the current one.
  • The Download MBR button on batch detail pages is not affected by templates and always uses the production pdf-lib renderer.
  • The Download Custom EBR button only appears when your organization has at least one approved template.
  • Custom EBR PDFs are logged in the observability system with renderer: "puppeteer-template" and the template ID and name.

On this page