Template editor

Last updated

In the template editor you design the PDF: text, tables, images, lines, or QR codes. Then you connect those elements to patient, consultation, or other form data with placeholders such as @field_name.

How to get here

From Templates, click Open template or create a new one. You also land here when you use a design from the gallery.

Editor bar

  • Editable title (click to rename it).
  • Back to documents returns you to the template list.
  • Save template (while it works: Saving...).
  • Data sources: choose where values come from (Select data sources...).
  • View available fields: lists the placeholders you can copy.
  • Template settings: assign this template as the default for consultations, prescriptions, or records.

Data sources and placeholders

Check the sources you will use, for example:

  • Patients
  • Records
  • Consultations
  • Prescription detail
  • Custom forms
  • System (includes Generation date and time)

Then open Available placeholders. Clicking a field copies @key to the clipboard (Copied to clipboard). Paste it into a text block or a table in the layout.

If the placeholder comes from a list or from subfields, use it inside a table: each row in the record becomes a row in the PDF.

Design the page

On the canvas you can place text, tables, images, field-bound images, SVG, lines, rectangles, ellipses, and QR codes.

On blank templates you can also adjust:

  • Page margins
  • Header and footerEdit header and footer on every page

If the template starts from a background PDF, those controls are usually disabled: the background already defines margins and chrome. Header and footer are only available for blank page templates, not uploaded PDF backgrounds.

The editor keeps a local draft in the browser. Save template sends it to the server and uploads embedded images. You need a document name. On success you will see Saved successfully.

If another template was already the default for the same purpose, saving shows: Another template is already assigned to this purpose. Saving will replace it.

Tip

Pick the data sources first, copy the @fields that actually exist, then arrange the layout. That way you avoid placeholders that will stay empty when you generate the PDF.

Keep learning