Print Designer
Print Designer is used to maintain print templates used by transactions, such as receipts, invoices, notes, and other printed documents.
Menu Route
General Designer
/printdesigner
When to Use
- When a print format needs to be adjusted, for example adding logo, changing title, arranging columns, or changing paper size.
- When implementors need template variations without changing the main application.
- When an old design should be duplicated before editing.
- When templates need to be moved between servers using JSON export and import.
Basic Concepts
- Print File is the print design selected from the server.
- Name is a friendly template name.
- Group Design is the design code/path called by other forms. Do not change it carelessly when already used.
- Template is HTML/EJS. HTML controls layout; EJS reads transaction data, loops detail lines, and prints totals.
- Code is safer for structure and EJS. WYSIWYG is useful for simple visual edits.
- EJS chip protects EJS code in visual mode so
<%= ... %>does not break. - Default Page Setup controls paper size, orientation, custom width/height, and margins.
Workflow
- Open General / Print Designer.
- Select the Print File to edit.
- Click Duplicate before editing an operational template.
- Edit Name when needed, but be careful with Group Design.
- Use Code for loops, conditions, calculations, and complex tables. Use WYSIWYG for simple text or layout changes.
- Set paper size, custom width/height, margins, and orientation.
- Click Save to store the design on the server.
- Use Save as JSON for backup and Import for templates from another server.
How to Read a Template
- Normal text in the template is printed as-is.
<%= ... %>displays a value such as transaction number, date, customer, or total.<% ... %>is logic such asif,for, subtotal calculation, or variable preparation.- Tables usually contain a header row and a detail row. Repeated detail rows are usually controlled by an EJS loop.
- Use Code mode when the template contains many conditions and loops.
Default Page Setup
| Setting | Explanation |
|---|---|
| Paper Size | Standard paper size or custom size for the printout. |
| Orientation | Portrait or landscape. Use landscape for wide tables. |
| Custom Width / Height | Useful for thermal printers and special paper. |
| Margins | Controls left, right, top, and bottom spacing. |
| Active | Marks whether the template should still be used. |
EJS Chips in WYSIWYG Mode
- EJS chips protect template code while users edit visually.
- Click Edit on a chip to change the EJS expression.
- Use Code mode when the chip represents loops, conditions, or calculations.
- After visual editing, preview or print a sample document before using it operationally.
Things to Check
- Export JSON or Duplicate before changing a template used in operations.
- Small EJS mistakes can make printing fail.
- If output is too wide or cut off, check paper size, orientation, and margins.
- If transaction data does not appear, check EJS field names.
- Delete only templates that are no longer used by active transactions.