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

  1. Open General / Print Designer.
  2. Select the Print File to edit.
  3. Click Duplicate before editing an operational template.
  4. Edit Name when needed, but be careful with Group Design.
  5. Use Code for loops, conditions, calculations, and complex tables. Use WYSIWYG for simple text or layout changes.
  6. Set paper size, custom width/height, margins, and orientation.
  7. Click Save to store the design on the server.
  8. 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 as if, 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.

Top Buttons

ButtonUse
RefreshReload the print file list from the server.
ImportLoad a JSON design file from the computer.
DuplicateCreate a copy of the selected design before editing.
SaveSave the current design to the server.
Save as JSONDownload the design as JSON for backup or migration.
DeleteDelete the design file after confirmation.

Default Page Setup

SettingExplanation
Paper SizeStandard paper size or custom size for the printout.
OrientationPortrait or landscape. Use landscape for wide tables.
Custom Width / HeightUseful for thermal printers and special paper.
MarginsControls left, right, top, and bottom spacing.
ActiveMarks 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.