Skip to main content
APM templates support a variety of text formatting options that can be applied to elements using the Format property. Multiple format values can be combined by separating them with spaces.

Format Property

The Format property can be applied at both the section level (as a default for all elements) and at individual element levels. Element-level formats override section defaults.
{
  "Type": "Text",
  "StaticValue": "TOTAL",
  "Format": "Bold Large Center"
}

Font Types

APM supports two font types optimized for thermal printers:
FontA
string
Standard font - displays 48 characters per line on 80mm paper
FontB
string
Compressed font - displays 64 characters per line on 80mm paper (smaller and more compact)

Example

{
  "Type": "Text",
  "StaticValue": "Compact text",
  "Format": "FontB"
}

Text Styles

Style options modify the appearance of text:
Bold
string
Makes text bold/heavy weight
Underline
string
Adds underline decoration to text

Example

{
  "Type": "Text",
  "Source": "Sale.Total",
  "Format": "Bold Underline"
}

Size Options

Control the size of text using these format options:
Large
string
Double height text (2x vertical scale)
DoubleWidth
string
Double width text (2x horizontal scale)
SizeX
string
Proportional scaling from 1 to 8. Use Size2, Size3, Size4, etc.Examples: Size2 (2x scale), Size3 (3x scale), Size8 (8x scale)

Example

// Double height
{
  "Type": "Text",
  "StaticValue": "IMPORTANT",
  "Format": "Large"
}

// Proportional scaling
{
  "Type": "Text",
  "StaticValue": "HUGE TEXT",
  "Format": "Size3 Bold"
}

// Combined width and height
{
  "Type": "Text",
  "StaticValue": "BIG",
  "Format": "Large DoubleWidth"
}

Combining Formats

You can combine multiple format options by separating them with spaces:
{
  "Type": "Text",
  "StaticValue": "RECEIPT HEADER",
  "Format": "Bold Size2 FontA"
}
{
  "Type": "Text",
  "Source": "Store.Name",
  "Format": "Bold Large Underline"
}

Section-Level Formatting

Apply default formatting to all elements in a section:
{
  "Name": "Header",
  "Type": "Static",
  "Format": "Bold Center",
  "Elements": [
    {
      "Type": "Text",
      "StaticValue": "MY STORE"
      // Inherits "Bold Center" from section
    },
    {
      "Type": "Text",
      "Source": "Store.Address",
      "Format": "FontB"
      // Overrides with "FontB"
    }
  ]
}

Null Format

Set Format to null to inherit formatting from the parent section or use default printer settings:
{
  "Type": "Text",
  "Source": "Sale.Date",
  "Format": null
}

Build docs developers (and LLMs) love