##General
-
<T>
(Title) : When used it will format line as a title. -
<F>
(Fill) : For example<F>-
creates a line with - chars or<F>=
creates a line with = chars. -
<EB>
(Enable Bold) Prints everything Bold until<DB>
command. -
<DB>
(Disable Bold) Ends<EB>
command -
<Jxy>
(Justified) Justifies a line from pipe char.<J00>Total:|0.00
separates line from pipe (|) char. It alignsTotal:
part left and0.00
part right. When used on a ESC/POS compatible ticket printer numeric parts sets font size. First number sets font height and second number sets font width. For example<J10>
sets font height to 1 and font width to 0. -
<Cxy>
(Center) Same as<J00>
but this command centers text. -
<Lxy>
(Left) Same as<J00>
but this one left aligns text. -
<Rxy>
(Right) Same as<J00>
but this one right aligns text. -
<Jxy:n>
(Justify Wide) Same as<J>
tag but if you’re using wide char languages such as Chinese you can define char length here. For example<J00:2>
means characters are 2 characters wide.
##Custom Commands
-
<XCT>
(Execute) Useful to send escape commands to printers or data to port printers. For example<XCT>27,112,0,25,250
to send open drawer command to printer. -
<BEEP>
(Beep Sound) If ticket printer supports printer will beep on this command. Generally used at the end of ticket template to inform user about something printed. Generally useful on kitchen printers. -
<Bxy>
(Custom Beep) - x: Beep Count
-
y: Beep Duration.
<B22>
beeps two times. -
<CUT>
Sends paper cut command to printer.
##Logo printing, Barcode Printing and Bitmaps
-
<BMP>[FileName]
Prints Bitmap file.<BMP>C:\logo.bmp
. -
<BAR>
Prints bar code in code 128 format.<BAR>123456789
- Supports 13,39,08,93,11,25 barcode types.
<BAR13>
prints Ean13 format.
- Supports 13,39,08,93,11,25 barcode types.
-
<QR>
Prints QR Code.<QR>ABCDEFG
- x: Bitmap size. [1-9]
- y: Error Correction. [1-4]
<QR23>55aa
##Positioning
-
<el>
Enable Left -
<ec>
Enable Center -
<er>
Enable Right
These tags are useful to position bitmaps. For example after <ec>
tag everything (including logos & bitmaps) prints center aligned. To disable it you can change alignment with <el>
or <er>
tag.
For positioning more precisely you can use space characters. For example <QR> 12313
tag has two spaces between tag and code. That means bitmap will slide right by two pixels. It works with <BAR>, <QR> and <BMP>
tags.
##Expressions
Printer Templates supports custom expressions to make some simple calculations.
Syntax: [=<expression>]
For example: [=2+3]
expression prints 5
.
You can use current printer template tags to make calculations based on ticket values.
[={TICKET TOTAL}*0.1]
Prints %10
of the ticket total.
Numeric tags such as {TICKET TOTAL}
prints formatted numbers such as 1,523.00
. To be able to use these numbers safely in expressions we need to convert them to numbers by stripping thousand separators and correcting decimal separator. To be able to do this we can use (ToNumber) TN
function. So our expression becomes [=TN('{TICKET TOTAL}')*0.1]
These are the available functions:
-
F
: Format Function.[=F(<number>,<format>)]
.
Formats numeric values with given format. -
FF
Fix Format Function.[=FF(<string>,<format>)]
.
Fixes formatting of the string formatted number. -
TN
: ToNumber Function[=TN(<string>)]
.
Converts string formatted number to a numeric value. -
FD
: Format Date Function[=FD(<date>,<format>)]
.
Changes formatting of date values. -
ADD
: Add Days Function[=ADD(<date>,<days>]
.
Adds days to date values. -
ADM
: Add Months Function[=ADD(<date>,<months>]
.
Adds months to date values.
####Examples
[=FF('{TICKET TOTAL}','#')]
Strips decimal parts from numbers.
[=FF('{TICKET TOTAL}','#;-#;0')]
By using semicolon ;
character you can define separate formats for positive and negative numbers. First section will be used for positive, second section for negafive numbers. Third section is for zeros.
For example:
-+#;minus #;zero
. format will display +
infront of positive numbers, minus
word in front of negative numbers and zero
instead of 0.
-'#,#0.00;#,#0.00'
will remove -
sign in front of negative numbers.
[=FD(ADD('{TICKET DATE}',1),'dd/MM/yyyy')]
Adds 1 day to date value and prints with dd/mm/yyyy format.
[=F(TN('{TICKET TOTAL}')*0.2,'#')]
Calculates %20 of Ticket Total and strips decimals from number.