Sei sulla pagina 1di 26

4.

Printer Commands List


NO. Command Function Description
01 HT Horizontal tab(#)
02 LF Print and line feed
03 CR Print and carriage return (#)
04 ESC SO Set all characters times width print
05 ESC DC4 Cancel all characters times width print
06 ESC SP n Set right-side character spacing (#)
07 ESC ! n Select print mode
08 ESC $ nL nH Select absolute print position (#)
09 ESC % n Select/cancel user-defined character set
10 ESC & Defined user-defined characters
11 ESC * Select bit-image mode
12 ESC - n Turn underline mode on/off (#)
13 ESC 2 Select default line spacing
14 ESC 3 n Set line spacing
15 ESC ? n Cancel user-defined characters
16 ESC @ Initialize printer
17 ESC D Set horizontal tab position (#)
18 ESC E n Turn emphasized mode on/off (#)
19 ESC G n Turn double-strike mode on/off (#)
20 ESC J n Print and feed paper
21 ESC R n Select international characters list (#)
22 ESC \ nL nH Set relative horizontal position (#)
23 ESC a n Set justification (#)
24 ESC c 5 n Enable/disable panel buttons
25 ESC d n Print and feed n lines
26 ESC p m t1 t2 General pulse for cash drawer
27 ESC t n Select characters code list (#)
28 ESC { n Turns on/off upside-down printing mode (#)
29 GS * x y d1dk Define downloaded bit image
30 GS / m Print downloaded bit image
31 GS H n Select printing position for HRI characters
32 GS L nL nH Set left margin (#)
33 GS W nL nH Set printing area width (#)
34 GS h n Select barcode height
35 GS k m ddk NUL Print barcode
GS k m n d1dn
36 GS v 0 m Print raster bit image
37 GS w n Set barcode width
38 FS ! n Set print mode(s) for Kanji characters (#)
39 FS & Select Kanji character mode
40 FS - n Turn underline mode on/off for Kanji characters (#)
41 FS . Cancel Kanji character mode
42 FS 2 c1 c2 d1...dk Define user-defined Kanji characters
(#)Note: this command is available for POS58 model.

5. Printer Commands List


5.1 Command Conception

POS58 series printers support ESC/POS print commands.

Descriptions as following:

Print Command Functions

Format : ASCII: Showing as standard ASCII characters

Decimal: Showing as Decimal figure list

Hex: Showing as hex figure list

Description: This command function and instruction.

For example: Give some examples to understand this command clearly

5.2 Command Description

HT

[Name] Horizontal tab

[Format] ASCII HT

Hex 09

Decimal 9

[Description] Moves the print position to the next horizontal tab position.

[Details] This command is ignored unless the next horizontal tab position has been set.
If the next horizontal tab position exceeds the printing area, the printer sets the
printing position to [Printing area width + 1].
Horizontal tab positions are set with ESC D.
If this command is received when the printing position is at [printing area
width + 1], the printer executes print buffer-full printing of the current line and
horizontal tab processing from the beginning of the next line.
The default setting of the horizontal tab position for the paper roll is font A
(12 24) every 8th character (9th, 17th, 25th, ... column).
[Reference] ESC D

LF

[Name] Print and line feed

[Format] ASCII LF

Hex 0A

Decimal 10

THERMAL RECEIPT PRINTER 1


[Description] Prints the data in the print buffer and feeds one line based on the current line
spacing.

[Note] This command sets the print position to the beginning of the line.

[Reference] ESC 2, ESC 3

CR

[Name] Print and carriage return

[Format] ASCII CR

Decimal 13

Hex 0DH

[Description] When automatic line feed is enabled, this command functions the same as LF
LF;
when automatic line feed is disabled, this command is ignored.
[Details] Sets the print starting position to the beginning of the line.
The automatic line feed is ignored with a serial interface model.
This command is set according to the DIP switch 1-1 setting with a parallel
interface model.
[Reference] LF

ESC SO

[Name] Set all character times width print

[Format] ASCII ESC SO

Hex 1B 0E

Decimal 27 14
[Description] Printing characters with two times width in one line after this command; Cancel this
command by ENTER or ESC DC4 command.

ESC DC4

[Name] Cancel all the characters times width print

[Format] ASCII ESC DC4

Hex 1B 14

Decimal 27 20
[Description] Printing characters as normal width.

THERMAL RECEIPT PRINTER 2


ESC SP n

[Name] Set right-side character spacing (#)

[Format] ASCII ESC SP n

Hex 1B 20 n

Decimal 27 32 n

[Range] 0 n 255

[Description] Sets the character spacing for the right side of the character to inches [ n x
horizontal motion units].
[Details] When characters are enlarged n times, the right-side character spacing is n
times normal value.
The maximum right-side spacing is 255/203 inches. Any setting exceeding the
maximum is converted to the maximum automatically.

ESC ! n

[Name] Set print mode

[Format] ASCII ESC ! n

Hex 1B 21 n

Decimal 27 33 n

[Range] 0 n 255

[Description] Set characters print mode, to select to print characters times width and times
height. Default n=0, characters normal size printing; n=16, characters times
height printing; n=32, characters times width printing; n=48, characters times
width and times height printing.

ESC $ nL nH

[Name] Set absolute print position

[Format] ASCII ESC $ nL nH

Hex 1B 24 nL nH

Decimal 27 36 nL nH

[Range] 0 n 255
[Description] Sets the distance from the beginning of the line to the position at which
subsequent characters are to be printed.

The distance from the beginning of the line to the print position is

THERMAL RECEIPT PRINTER 3


[( nL + nH x 256) x (vertical or horizontal motion unit)] inches.

Settings outside the specified printable area are ignored.

ESC % n

[Name] Select/cancel user-defined character set

[Format] ASCII ESC % n

Decimal 27 37 n

Hex 1B 25 n

[Range] 0 nL 255
[Description] Selects or cancels the user-defined character set.
When the LSB of n is 0, the user-defined character set is canceled.
When the LSB of n is 1, the user-defined character set is selected.
[Details] When the user-defined character set is canceled, the internal character set is
automatically selected.
n is available only for the least significant bit.
[Default] n=0
[Reference] ESC &ESC
ESC ?

ESC & y c1 c2

[Name] Define user-defined characters

[Format] ASCII ESC & y c1 c2 [x1 d1...d(yx1)]...[xk d1... d(yxk)]

Hex 1B 26 y c1 c2 [x1 d1...d(yx1)]...[xk d1... d(yxk)]

Decimal 27 38 y c1 c2 [x1 d1...d(yx1)]...[xk d1... d(yxk)]

[Range] y=3

32 c1 c2 126

0 x 12 Font A (9 x 9)

0 x 9 Font B(7 x 9)

0d1d(yxk)255

[Description] Defines user-defined characters.

y specifies the number of bytes in the vertical direction.


c1 specifies the beginning character code for the definition, and c2 specifies the
final code. Only when c1=c2, up to 96 user-defined characters can be defined.
x specifies the number of dots in the horizontal direction.

THERMAL RECEIPT PRINTER 4


[Details] d is the dot data for the characters. The data to define a user-defined

character is (xy) bytes and total is (c2-c1+1) characters.

The defined user-defined characters will be valid till redefinition or reset or

printer power off.

Example: using the standard ASCII code Font (12 x 24)

[Default] The internal character set

[Reference] ESC %ESC


ESC ?

ESC * m nL nH d1 . . . dk

[Name] Select bit-image mode

[Format] ASCII ESC * m nL nH d1...dk

Hex 1B 2A m nL nH d1...dk

Decimal 27 42 m nL nH d1...dk

[Range] m = 0, 1, 32, 33;

1 (nL+nH x 256) 1023

THERMAL RECEIPT PRINTER 5


0nL255;

0nH3;

0d255;

k=nL+ nH256 (m=0, 1); k=(nL+ nH256)3 (m=32 , 33)

[Description] Selects a bit-image mode using m for the number of dots specified by nL and

nH.

The nL and nH indicate the number of dots of the bit image in the

horizontal direction. The number of dots is calculated by nL + nH 256.

If the bit-image data input exceeds the number of dots to be printed on a line,
the excess data is ignored.
d indicates the bit-image data. Set a corresponding bit to 1 to print a dot or to 0

to not print a dot.

Selects a bit-image mode using m for the number of dots specified by nL

and nH, as follows:


m Vertical Direction Horizontal Direction
Mode Dots Density Density k
Data
Datak
0 8-dot single-density 8 67 DPI 100 DPI nL + nH 256
1 8-dot double-density 8 67 DPI 200 DPI nL + nH 256
32 24-dot single-density 24 200 DPI 100 DPI (nL + nH 256)3
33 24-dot double-density 24 200 DPI 200 DPI (nL + nH 256)3
Example: 8-dot density selected

THERMAL RECEIPT PRINTER 6


24-dot density selected

ESC - n

[Name] Turn underline mode on/off

[Format] ASCII ESC - n

Hex 1B 2D n

Decimal 27 45 n

[Range] 0 n 2, 48 n 50

[Description] Turns underline mode on or off, based on the following values of n:


n Function
0, 48 Turn off underline mode
1, 49 Turn on underline mode (1 dot width)
2, 50 Turn on underline mode (2 dot width)
[Details] The printer can underline all characters (including right-side character spacing), but

cannot underline the space set by HT.

Underline mode can also be turned on or off by using ESC ! .

This command is ignored when n exceeds the specified range.

This command does not affect the setting of Kanji characters.

THERMAL RECEIPT PRINTER 7


[Default] n=0

ESC 2

[Name] Select default line spacing

[Format] ASCII ESC 2

Hex 1B 32

Decimal 27 50

[Description] Selects 3.75mm line spacing.

ESC 3 n

[Name] Set line spacing

[Format] ASCII ESC 3 n

Hex 1B 33 n

Decimal 27 51 n

[Range] 0 n 255

[Description] Sets the line spacing to n dots

[Default] n = 30

[Reference] ESC 2

ESC n

[Name] Cancel user-defined characters

[Format] ASCII ESC ? n

Hex 1B 3F n

Decimal 27 63 n

[Range] 32 n 126

[Description] Cancels user-defined characters.

[Details] This command cancels the pattern defined for the character code specified by n. After

the user-defined characters are canceled, the corresponding pattern of the internal

character is printed.

This command deletes the pattern defined for the specified code in the font selected

by ESC ! .

THERMAL RECEIPT PRINTER 8


If a user-defined character has not been defined for the specified character code, the

printer ignores this command.

[Reference] ESC &ESC


ESC %

ESC @

[Name] Initialize printer

[Format] ASCII ESC @

Hex 1B 40

Decimal 27 64

[Description] Clears the data in the print buffer and resets the printer mode to the mode

that is in effect when the power is turned on.

ESC D n1...nk NUL

[Name] Set horizontal tab positions

[Format] ASCII ESC D n1nk NUL

Hex 1B 44 n1nk 00

Decimal 27 68 n1nk 0

[Range] 1 n 2550 k 32

[Description] Sets horizontal tab positions.

n specifies the column number for setting a horizontal tab position from the

beginning of the line.

k indicates the total number of horizontal tab positions to be set.

[Details] The horizontal tab position is stored as a value of [character width x n] measured from

the beginning of the line. The character width includes the right-side character spacing,

and double-width characters are set with twice the width of normal characters.

This command cancels the previous horizontal tab settings.

When setting n = 8, the print position is moved to column 9 by sending HT


HT.

Up to 32 tab positions ( k = 32) can be set. Data exceeding 32 tab positions is

processed as normal data.

Transmit [n] k in ascending order and place a NUL code 0 at the end. When [n] k

is less than or equal to the preceding value [n] k-1, tab setting is finished and the

THERMAL RECEIPT PRINTER 9


following data is processed as normal data.

ESC D NUL cancels all horizontal tab positions.

The previously specified horizontal tab positions do not change, even if the

character width changes.

[Reference] HT

ESC E n

[Name] Turn emphasized mode on/off

[Format] ASCII ESC E n

Hex 1B 45 n

Decimal 27 69 n

[Range] 0 n 255

[Description] Turns emphasized mode on or off.

When the LSB of n is 0, emphasized mode is turned off.

When the LSB of n is 1, emphasized mode is turned on.

[Details] Only the least significant bit of n is enabled.

Bit image is not to be emphasized.

This command and ESC ! turn on and off emphasized mode in the same way.

ESC G) and in emphasized mode.


Printer output is the same in double-strike mode (ESC

Alphanumeric characters and Kanji characters are affected by this command.

[Default] n=0

[Reference] ESC !ESC


ESC G

ESC G n

[Name] Turn on/off double-strike mode

[Format] ASCII ESC G n

Hex 1B 47 n

Decimal 27 71 n

[Range] 0 n 255

[Description] Turn double-strike mode on or off.

When the LSB of n is 0, emphasized mode is turned off.

THERMAL RECEIPT PRINTER 10


When the LSB of n is 1, emphasized mode is turned on.

[Details] Only the least significant bit of n is enabled.

Bit image is not to be double-strike.

Printer output is the same in double-strike mode and in emphasized mode

(ESC E).

Alphanumeric characters and Kanji characters are affected by this command.

[Note] Bi-direction print is with a lower speed in the double-strike mode.

[Default] n=0

[Reference] ESC E

ESC J n

[Name] Print and feed paper

[Format] ASCII ESC J n

Hex 1B 4A n

Decimal 27 74 n

[Range] 0 n 255

[Description] Print the data in the print buffer and feeds the paper [n x 0.176mm (1/44inches)].

[Details] After printing is completed, this command sets the print starting position to

the beginning of a line.

The paper feed amount set by this command does not affect the values set

by ESC 2 or ESC 3.

ESC R n

[Name] Select international characters list

[Format] ASCII ESC R n

Hex 1B 52 n

Decimal 27 82 n

[Range] 0 n 15

[Description] Select an international character set by setting n to the following values:


n Character Set
0 U.S.A.
1 France

THERMAL RECEIPT PRINTER 11


2 Germany
3 U.K.
4 Denmark
5 Sweden
6 Italy
7 Spain I
8 Japan
9 Norway
10 Denmark II
11 Spain II
12 Latin America
13 Korea
14 Slovenia/Croatia
15 China
[Default] n=0

ESC \ nL nH

[Name] Set relative horizontal position

[Format] ASCII ESC \ nL nH

Hex 1B 5C nL nH

Decimal 27 92 nL nH

[Range] 0 nl 2550 nH 255

[Description] This command sets the print starting position to where that [( nL + nH 256)

horizontal move unit] away.

The printer ignores the settings that out of the printable area.

ESC a n

[Name] Select justification

[Format] ASCII ESC a n

Hex 1B 61 n

Decimal 27 97 n

[Range] 0 n 2, 48 n 50

[Description] Aligns all data in one line to the specified position.

n selects the justification as follows:


n Justification
0,48 Left justification
1, 49 Center
2, 50 Right justification

THERMAL RECEIPT PRINTER 12


[Details] The command is enabled only when processed at the beginning of a line.

This command justifies the space area of the data skipped by command HT
HT,

ESC $ and ESC \.

[Default] n=0

ESC c 5 n

[Name] Enable/disable panel buttons

[Format] ASCII ESC c 5 n

Hex 1B 63 35 n

Decimal 27 99 53 n

[Range] 0n255

[Description] Enable or disable the panel buttons.

When the LSB of n is 0, the panel buttons are enabled.


When the LSB of n is 1, the panel buttons are disabled.

[Details] Only the least significant bit of n is enabled.

[Default] n=0

ESC d n

[Name] Print and feed n lines

[Format] ASCII ESC d n

Hex 1B 64 n

Decimal 27 100 n

[Range] 0n255

[Description] Prints the data in the print buffer and feeds n lines.

ESC p m t1 t2

[Name] Generate pulse

[Format] ASCII ESC p m t1 t2

Hex 1B 70 m t1 t2

Decimal 27 112 m t1 t2

[Range] m=0,1,48,49; 0t1255; 0t2255

THERMAL RECEIPT PRINTER 13


[Description] The pulse ON time is [t1 x 2 ms] and the OFF time is [t2 x 2 ms].

If t2 < t1, the OFF time is [t1x 2 ms] .

ESC t n

[Name] Select character code table

[Format] ASCII ESC t n

Hex 1B 74 n

Decimal 27 116 n

[Range] 0 n 10, 16 n 19

[Description] Selects a page n from the character code table:


n Page
0 PC437 [U.S.A. & Europe Standard]
1 Katakana
2 PC850 [Multilingual]
3 PC860 [Portuguese]
4 PC863 [Canadian & French]
5 PC865 [Nordic]
6 West Europe
7 Greek
8 Hebrew
9 PC755: East Europe
10 Iran
16 WPC1252
17 PC866: Cyrillice#2
18 PC852: Latin2
19 PC858
[Default] n=0

ESC { n

[Name] Turn upside-down printing mode on/off

[Format] ASCII ESC { n

Hex 1B 7B n

Decimal 27 123 n

[Range] 0 n 255

[Description] Turns upside-down printing mode on or off.

When the LSB of n is 0, upside-down printing mode is turned off.

When the LSB of n is 1, upside-down printing mode is turned on.

THERMAL RECEIPT PRINTER 14


[Details] Only the least significant bit of n is enabled.

This command is enabled only when processed at the beginning of a line.

In upside-down printing mode, the printer rotates the line to be printed by 180

and then prints it.

[Default] n=0

[Example]

GS * x y d1 dk
d1dk

[Name] Define download bit image

[Format] ASCII GS * x y d1dk

Hex 1D 2A x y d1dk

Decimal 29 42 x y d1dk

[Range] 1x48, 1y48, xy1500, k=xy8

[Description] Defines download bit image.

[Details] Only the least significant bit of n is enabled.

d indicates the bit image data, that is, d=1 for printing the corresponding dot and

d=0 for not printing the corresponding dot.

There are (x8) dots on horizontal direction and (y8) dots on vertical direction.

Once the download bit image has been defined, it is valid till executes redefine,

printer reset or printer power-off.

Relation between print data and download bit image:

THERMAL RECEIPT PRINTER 15


GS / m

[Name] Print downloaded bit image

[Format] ASCII GS / m

Hex 1D 2F m

Decimal 29 47 m

[Range] 0 m 3, 48 m 51

[Description] Prints downloaded bit image using the mode specified by m.

[Details] m is for selecting bit image mode.

GS * command can be use to define bit image.

Selects bit image mode using m as follows:


m Vertical Dot Horizontal
Mode
Density Dot Density
0, 48 Normal 200 DPI 200 DPI
1, 49 Double-width 200 DPI 100 DPI
2, 50 Double-height 100 DPI 200 DPI
3, 51 Double-width & 100 DPI 100 DPI
Double-height
[Reference] GS *

GS H n

[Name] Select printing position for HRI characters

[Format] ASCII GS H n

Hex 1D 48 n

Decimal 29 72 n

THERMAL RECEIPT PRINTER 16


[Range] 0 n 3, 48 n 51

[Description] Selects the printing position of HRI characters when printing a bar code.

n selects the printing position as follows:


n Printing position
0, 48 Not printed
1, 49 Above the bar code
2, 50 Below the bar code
3, 51 Both above and below the bar code
HRI indicates Human Readable Interpretation.

[Details] HRI characters are printed using the font specified by GS f.

[Default] n=0

[Reference] GS f, GS k

GS L nL nH

[Name] Set left margin

[Format] ASCII GS L nL nH

Hex 1D 4C nL nH

Decimal 29 76 nL nH

[Range] 0 nL 255; 0 nL 255

[Description] Sets the left margin using nL and nH.

The left margin is set to [( nL + nH x 256) x horizontal motion unit]] inches.

[Details] This command is effective only processed at the beginning of the line.

If the setting exceeds the printable area, the maximum value of the printable area

is used.

[Default] nL = 0, nH = 0

[Reference] GS P, GS W

GS W nL nH

[Name] Set printing area width

[Format] ASCII GS W nL nH

THERMAL RECEIPT PRINTER 17


Hex 1D 57 nL nH

Decimal 29 87 nL nH

[Range] 0 nL 255; 0 nL 255

[Description] Sets the printing area width to the area specified by nL and nH.

The printing area width is set to [( nL + nH x 256) x horizontal motion unit]]

inches.

[Details] This command is effective only processed at the beginning of the line.

If the [left margin + printing area width] exceeds the printable area, [printable area

width - left margin) is used.

[Default] nL = 128, nH = 1

[Reference] GS L, GS P

GS h n

[Name] Select bar code height

[Format] ASCII GS h n

Hex 1D 68 n

Decimal 29 104 n

[Range] 0 n 255

[Description] Selects the height of the bar code. (n0.125mm)

n specifies the number of dots in the vertical direction.

[Default] n = 162

[Reference] GS k

GS k m d1 dk NUL
d1dk GS k m n d1 dn
d1dn

[Name] Print bar code

[Format] ASCII GS k m d1dk NUL

Hex 1D 6B m d1dk NUL

Decimal 29 107 m d1dk NUL

THERMAL RECEIPT PRINTER 18


ASCII GS k m n d1dn

Hex 1D 6B m n d1dn

Decimal 29 107 m n d1dn

[Range] 0 m 6 (k and d depends on the bar code system used)

65 m 73 ( n and d depends on the bar code system used)

[Description] Selects a bar code system and prints the bar code.

m selects a bar code system as follows:


m Bar Code System Number of Characters Characters Remarks
0 UPC-A 11 k 12 09 48 d 57

1 UPC-E 11 k 12 09 48 d 57
2 JAN13 (EAN13) 12 k 13 09 48 d 57
3 JAN8 (EAN8) 7k8 09 48 d 57
09 45 d 57
AZ 65 d 90
SP$%+ d = 32, 36, 37, 43,
4 CODE39 1 k 255 -., / 45, 46, 47
* (Start/End d = 42(Start/End
character) character)
5 ITF 1 k 255even number 09 48 d 57
09, 48 d 57,
AD 65 d 68,
6 CODABAR 1 k 255 d = 36, 43, 45, 46,
$, +, -, .,
/,: 47, 58
65 UPC-A 11 n 12 09 48 d 57
66 UPC-E 11 n 12 09 48 d 57
67 JAN13 (EAN13) 12 n 13 09 48 d 57
68 JAN8 (EAN8) 7n8 09 48 d 57
09 45 d 57
AZ 65 d 90
SP$%+ d = 32, 36, 37,
69 CODE39 1 n 255 -., / 43,45, 46, 47
* d = 42
(Start/End (Start/End
character)
character)
70 ITF 1 n 255even number 09 48 d 57
71 09, 48 d 57,
AD 65 d 68,
CODABAR 1 n 255 d = 36, 43, 45, 46,
$, +, -,
., /,: 47, 58
72 NUL 0 d 127
CODE93 1 n 255
SP(7FH)
73 NUL 0 d 127
CODE128 2 n 255
SP(7FH)

THERMAL RECEIPT PRINTER 19


[Details] If dk or dn is outside of the specified range, the printer only feeds paper and

processes the following data as normal data.

If the horizontal size exceeds printing area, the printer only feeds the paper.

This command feeds as much paper as is required to print the bar code,

regardless of the line spacing specified by ESC 2 or ESC 3.

This command is enabled only when print position is at the beginning of the line.

After printing bar code, this command sets the print position to the beginning of

the line.

GS v 0 m xL xH yL yH d1....dk

[Name] Print raster bit image

[Format] ASCII GS v 0 m xL xH yL yH d1....dk

Hex 1D 76 30 m xL xH yL yH d1....dk

Decimal 29 118 48 m xL xH yL yH d1....dk

[Range] 0xL48, xH=0; 0yL255, yH=0; 0d255

k=(xL+xH256)(yL+yH256)(k0)

[Description] Selects Raster bit-image mode. The value of m selects the mode, as follows:
Vertical Dot Horizontal
m MODE
Density Dot ensity
0, 48 Normal 200 DPI 200 DPI
1, 49 Double-width 200 DPI 100 DPI
2, 50 Double-height 100 DPI 200 DPI
3, 51 Quadruple 100 DPI 100 DPI
xL, xH, select the number of data bits ( xL+ xH 256) in the horizontal

direction for the bit image.

yL, yH, select the number of data bits ( yL+ yH 256) in the vertical

direction for the bit image.

[Details] In standard mode, this command is effective only when there is no data in the

print buffer.

This command has no effect in all print modes (character size, emphasized,

double-strike, upside-down, underline, white/black reverse printing, etc.) for raster

bit image.

THERMAL RECEIPT PRINTER 20


The part of bit image that exceeds the printable area will not be printed.

d indicates the bit-image data. Set time a bit to 1 prints a dot and setting it to 0

does not print a dot.

GS w n

[Name] Set bar code width

[Format] ASCII GS w n

Hex 1D 77 n

Decimal 29 119 n

[Range] 2 n 5

[Description] Sets the horizontal size of the bar code.

n specifies the bar code width as follows:

Module Width (mm) for Binary-level bar codes


n
Multi-level Bar Code Thin element width (mm) Thick element width (mm)
2 0.25 0.25 0.625
3 0.375 0.375 1.0
4 0.5 0.5 1.25
5 0.625 0.625 1.625
Multi-level bar codes: JAN13 (EAN13), JAN8 (EAN8)

Binary-level bar codes: CODE39

[Default] n=3

[Reference] GS k

FS ! n

[Name] Set print mode(s) for Kanji characters

[Format] ASCII FS ! n

Hex 1C 21 n

Decimal 28 33 n

[Range] 0 n 255

[Description] Sets the print mode for Kanji characters, using n as follows:
Bit 0/1 Hexadecimal Decimal Function
0, 1 --- --- Undefined.
0 00 0 Double-width mode is OFF.
2 1 04 4 Double-width mode is ON.
3 0 00 0 Double-height mode is OFF.

THERMAL RECEIPT PRINTER 21


1 08 8 Double-height mode is ON.
4-6 -- -- Undefined.
0 00 0 Underline mode is OFF.
7 1 80 128 Underline mode is ON.
[Details] When both double-width and double-height modes are set (including right- and left-

side character spacing), quadruple-size characters are printed.

The printer can underline all characters (including right- and left-side character

spacing), but cannot underline the space set by HT and 90 clockwise-rotated

characters.

The thickness of the underline is that specified by FS -, regardless of the character

size.

When some of the characters in a line are double or more height, all the characters

on the line are aligned at the baseline.

It is possible to turn under line mode on or off using FS -, and the setting of the last

received command is effective.

[Default] n=0

[Reference] FS -, FS W, GS !

FS &

[Name] Select Kanji character mode

[Format] ASCII FS &

Hex 1C 26

Decimal 28 38

[Description] Selects Kanji character mode .

[Reference] FS . , FS C

FS - n

[Name] Turn underline mode on/off for Kanji characters

[Format] ASCII FS - n

Hex 1C 2D n

Decimal 28 45 n

[Range] 0 n 2, 48 n 50

THERMAL RECEIPT PRINTER 22


[Description] Turns underline mode for Kanji characters on or off, based on the following

values of n.
n Function
0, 48 Turns off underline mode for Kanji characters
1, 49 Turns on underline mode for Kanji characters (1-dot thick)
2, 50 Turns on underline mode for Kanji characters (2-dot thick)
[Details] The printer can underline all characters (including right- and left-side character

spacing), but cannot underline the space set by HT and 90 clockwise-rotated

characters.

After the underline mode for Kanji characters is turned off, underline printing is no

longer performed, but the previously specified underline thickness is not changed.

The default underline thickness is 1 dot.

The specified line thickness does not change even when the character size changes.

It is possible to turn underline mode on or off using FS !, and the last received

command is effective.

[Reference] FS !

FS .

[Name] Cancel Kanji character mode

[Format] ASCII FS .

Hex 1C 2E

Decimal 28 46

[Description] Cancels Kanji character mode .

[Details] Every character is processed as ASCII code and 1byte is processed every

time.

Kanji character mode is selected while printer is power on.

[Reference] FS &, FS C

FS 2 c1 c2 d1
d1dk

[Name] Define user-defined Kanji characters

[Format] ASCII FS 2 c1 c2 d1dk

Hex 1C 32 c1 c2 d1dk

THERMAL RECEIPT PRINTER 23


Decimal 28 50 c1 c2 d1dk

[Range] c1=[FEH][A1H] c2[FEH]k=720d255

[Description] Defines user-defined Kanji characters for the character codes specified by

c1 and c2.

[Details] c1 and c2 indicate character codes for the defined characters. c1 specifies for the

first byte, and c2 for the second byte.

d indicates the dot data. Set a corresponding bit to 1 to print a dot or to 0 to not print a

dot.

[Example]

THERMAL RECEIPT PRINTER 24


THERMAL RECEIPT PRINTER 25

Potrebbero piacerti anche