Professional Documents
Culture Documents
ESC - POS AK912 English Command Specifications V1.4
ESC - POS AK912 English Command Specifications V1.4
ESC - POS AK912 English Command Specifications V1.4
V1.4
INTRUDCUTION
ESC command is a standard instruction set made by EPSON for needle
printer, which has become an effective industrial standard of the control
language of needle printers.
ESC/POS printing command is a simplified version of ESC printing control
commands. ESC/POS instruction set is a major practice applied in voucher
printing.
The notable characteristic of this command is most of the instructions are a
group of codes beginning with ESC control characters.
AK912 are compatible with ESC/POS command.
COMMAND FUNCTION LIST
CHAPTER Commands HEX Name
Basic control command
1.1.1 ESC @ 0x1B 0x40 Initialize printer
1.1.2 FF 0x0C Print and feed paper 1 lines
1.1.3 SO 0x0E Print and paper feed to the right black bar
1.1.4 LF 0x0A Line feed
1.1.5 CR 0x0D Print and carriage return
1.1.6 ESC J n 0x1B 0x4A n Print and Paper Feed
1.1.7 ESC d n 0x1B 0x64 n Print and feed paper n lines
1.1.8 HT 0x09 Horizontal tab
1.1.9 GS FF 0x1D 0x0C Print and paper feed to the label gap
1.1.10 GS 0x99 0x1D 0x99 Read the printer status
Character parameter set command
1.2.1 ESC ! n 0x1B 0x21 n Select character printing mode
1.2.2 GS ! n 0x1D 0x21 n Select character size
1.2.3 ESC M n 0x1B 0x4D n Select character font
1.2.4 ESC – n 0x1B 0x2D n Specify/cancels underline mode
1.2.5 ESC E n 0x1B 0x45 n Specify/cancel emphasized printing
1.2.6 GS B n 0x1D 0x42 n Specify/cancel white/black inverted printing
1.2.7 ESC V n 0x1B 0x56 n Specify/cancel char. 90 deg. clockwise rotation
Print layout parameters set command
1.3.1 ESC $ nL Nh 0x1B 0x24 nL nH Specify absolute position
1.3.2 ESC D n1 n2…nk NULL 0x1B 0x44 nL,nk Set horizontal tab position
00(FF)
1.3.3 ESC 2 0x1B 0x32 Set default line spacing
1.3.4 ESC 3 n 0x1B 0x33 n Set line feed amount
1.3.5 ESC SP n 0x1B 0x20 n Set character right space amount
1.3.6 ESC a n 0x1B 0x61 n Position alignment
1.3.7 GS L n 0x1D 0x4C nL nH Set left margin
Graphics / image print command
1.4.1 ESC * m nL nH d1…dk 0x1B 0x2A m nL nH Specify bit image mode
d1…dk
2 / 30
ESC/POS AK912 Command Specifications V1.4
【COMMAND】+【parameter】
【COMMAND】are commands consisting of ESC characters and command characters in bold. ESC characters are
【parameter】are parameters,which are not digital characters but the value of the characters in italic and bold.
3 / 30
ESC/POS AK912 Command Specifications V1.4
1.1.2 FF
[DEFAULT VALUE]
[REFERENCE] SO
1.1.3 SO
4 / 30
ESC/POS AK912 Command Specifications V1.4
1.1.4 LF
1.1.5 CR
1.1.6 ESC J n
5 / 30
ESC/POS AK912 Command Specifications V1.4
[ATTENTION] ● Set the line space to the length of Command ESC2 & ESC 3 set.
● Set the beginning of the next line as the starting point when this command is executed.
● If there is no data in line buffer area, paper feeds n vertical dot pitch.
[DEFAULT VALUE]
[REFERENCE] ESC d n
1.1.7 ESC d n
1.1.8 HT
1.1.9 GS FF
6 / 30
ESC/POS AK912 Command Specifications V1.4
After all data printed in buffer area, for label printing, paper feeds to the next
segmentation line of the label; for printing plain paper without right black bar, paper feeds
to a distance of 20cm; for printing paper with right black bar, paper feeds to the right
black bar.
● This command is only effective when the segmentation line space is 2mm~4mm.
[DEFAULT VALUE]
[REFERENCE]
7 / 30
ESC/POS AK912 Command Specifications V1.4
8 / 30
ESC/POS AK912 Command Specifications V1.4
1.2.2 GS ! n
1.2.3 ESC M n
9 / 30
ESC/POS AK912 Command Specifications V1.4
1.2.4 ESC – n
n IMPLICATION
CHARACTER HEXADECIMAL
0 0x00 Unlock underline
1 0x01 Set underline(1 dot width)
2 0x02 Set underline(2 dots width)
'0' 0x30 Unlock underline
'1' 0x31 Set underline(1 dot width)
'2' 0x32 Set underline(2 dots width)
[ATTENTION] ● Space, rotated and reversed characters generated by HT can’t be underlined.
● The weight of underline can be impacted by changing of character size.
● ESC ! can be used to set or unlock the underline mode. The last setting command takes
the effect.
● This command is effective for both English and Chinese characters.
[DEFAULT VALUE] n =0
[REFERENCE] ESC !
1.2.5 ESC E n
10 / 30
ESC/POS AK912 Command Specifications V1.4
1.2.6 GS B n
N IMPLICATION
CHARACTER HEXADECIMAL
0 0x00 Unlock reversed printing
1 0x01 Lock reversed printing
'0' 0x30 Unlock reversed printing
' ' 0 31 Lock reversed printing
[ATTENTION] ● This command is effective for all built-in characters.
● This command does not impact bitmaps, barcodes, characters read by barcode and space
generated by HT, ESC $.
● Reverse mode is prior to underline mode. When reverse mode is locked, underline mode is
not effective, not unlocked.
[DEFAULT VALUE]
[REFERENCE] n=0
1.2.7 ESC V n
11 / 30
ESC/POS AK912 Command Specifications V1.4
[REFERENCE] ESC !
ESC –
12 / 30
ESC/POS AK912 Command Specifications V1.4
[REFERENCE] HT
1.3.3 ESC 2
1.3.4 ESC 3 n
1.3.5 ESC SP n
13 / 30
ESC/POS AK912 Command Specifications V1.4
1.3.6 ESC a n
n IMPLICATION
CHARACTER HEXADECIMAL
0 0x00 Left aligned
1 0x01 Centered
2 0x02 Right aligned
0' 0x30 Left aligned
'1' 0x31 Centered
' ' 0x32 Right aligned
[ATTENTION] ● This command is only effective when start processing at the beginning of a line.
● This command controls alignment within printing area.
● This command can make space area aligned by the instruction of ESC $.
● This command can be impacted by the left margin position generated by GS L
[DEFAULT VALUE] n = 0
[REFERENCE]
1.3.7 GS L nL nH
14 / 30
ESC/POS AK912 Command Specifications V1.4
m = 32: d1、d2、d3 indicate the data of column dot of 1 and 2, and the like. Bn indicates the n
digit of byte.
m = 33: d1、d2、d3 indicate the data of column dot of 1, and the like. Bn indicates the n digit
of byte.
15 / 30
ESC/POS AK912 Command Specifications V1.4
1.4.2 GS * x y d1…dk
d4 d7 d45
0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 b7
0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 b1
0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 b5
d1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 b4
0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 b3
0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 b2
0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 b1
0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 1 b0
0 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 b7
0 0 0 0 1 0 0 1 1 1 1 1 1 0 0 0 b1
0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 b5
d2 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 b4
0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 b3
0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 b2
0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 b1
0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 b0
0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 0 b7
0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 0 b1
0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 b5
dy 0 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 b4
y=3 0 0 1 0 0 1 1 1 1 1 1 1 1 0 0 0 b3
0 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 b2 打印放大图
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 b1
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b0
1.4.3 GS / n
17 / 30
ESC/POS AK912 Command Specifications V1.4
n IMPLICATION
0 Normal
1 Double-width
2 Double-height
3 Double-width & double-height
[ATTENTION] ● This command is ineffective if the bitmap data is undefined.
● This command is not impacted by printing mode(bold, overstriking, underline, font size
and reverse printing).
● If the downloading bitmap goes beyond the printable area, the data exceeded will not be
printed.
● If the height of bitmap exceeds 160 dots, only the height not exceeded can be printed. The
height should not exceed 80 dots if the double-height mode is in use.
[DEFAULT VALUE]
[REFERENCE] GS *
1.4.4 FS P n
[DESCRIPTION] This command is used to print the binary bitmaps pre-saved in the nonvolatile memory of the
printer. The binary bitmaps in the nonvolatile memory can be generated and read by
professional software from PC. The maximum height of the bitmap should be no more than 200
dots and the product of height times width cannot exceed 4000.
n is the bitmap no. 8 binary bitmaps can be uploaded in all.
[ATTENTION] ● This command is ineffective when a certain number of bitmap is not defined.
● Binary bitmaps only.
● Unknown results may occur if n exceeds the range.
● This command is not impacted by printing mode(bold, overstriking, underline, font size
and reverse printing).
● Please reset the printer after uploading pre-saved image to prevent unknown error.
[DEFAULT VALUE]
[REFERENCE] GS / n
18 / 30
ESC/POS AK912 Command Specifications V1.4
1.5.2 GS w n
1.5.3 GS H n
19 / 30
ESC/POS AK912 Command Specifications V1.4
[DESCRIPTION] Select the printing position of the readable character when printing the barcode.
The printing position selected by setting n:
n POSITION OF READABLE
CHARACTER HEXADECIMAL CHARACTERS
0 0x00 Non print
1 0x01 Above barcode
2 0x02 Beneath barcode
'0' 0x30 Non print
'1' 0x31 Above barcode
'2' 0x32 Beneath barcode
[ATTENTION] ● Print the readable characters in the font GS f has designated.
● The readable characters of barcode are not impacted by printing mode (overstriking,
underline, font size and reverse printing).
[DEFAULT VALUE] n = 0
[REFERENCE] GS f, GS k
1.5.4 GS f n
1.5.5 GS k m …
20 / 30
ESC/POS AK912 Command Specifications V1.4
21 / 30
ESC/POS AK912 Command Specifications V1.4
● The barcode characters the printer receives should be contained in the character set the
barcode type has specified. If any character cannot be found in the character set, this
command becomes ineffective. Please refer to barcode standards for specified barcode
character set of different types of barcode.
● When format 2 command is in use,nL的value should be equal to the data length of the
barcode, if the data bit length is specified by this type of barcode. If n does not equal to the
specified data length, this command becomes ineffective. Please refer to barcode standards
for specified data bit length of different types of barcode.
● When the data length of INTERLEAVED 25(ITF) barcode is odd number,the printer
calculates the parity-check code automatically and complement it to even number. If
format 1 is in use to print ITF barcode,k(the barcode data length the printer has
received)value should be odd number. If format 2 is in use to print ITF barcode, n value
should be odd number.
● If the horizontal size exceeds the printing area, the part exceeded shall be ignored.
● This command is not impacted by printing mode(bold, overstriking, underline, font size and
reverse printing).
● Barcode coding rule should be followed when printing barcodes, otherwise barcode
scanning is unable.
● When printing the readable characters, the invisible characters of CODE93 & CODE128
cannot be printed. They are substituted by‘□’.
● CODE39 does not contain extended CODE39 (EXTERN CODE 39).
Please remember to add ‘*’ at both the beginning and the end of the printed content.
● CODE93 does not contain extended CODE93 (EXTERN CODE 93).
● CODE128 barcode selects characters automatically (CODE A, CODE B, 或CODE C)
and print the type of barcode according to the requirement, usually CODE A.
● If m is not meant to be 0x00,it can be set as 0x80. The result is the same with m=0x00.
[DEFAULT VALUE]
[REFERENCE]
1.5.6 GS Z n
23 / 30
ESC/POS AK912 Command Specifications V1.4
QRCode TYPE:
1.m specifies the character version.
0≤m≤40
Attention:1.If m = 0,the character version will be calculated automatically according to
the data length.
2.The maximum character version number is 20 due to limitation of the width of
printing paper.
2.n specifies the ECC error correction level.
n CORRECTION LEVEL
1 L:7%,low level, large amount of data
2 M:15%,middle level
3 Q:25%,optimized correction
4 H:30%,top level,small amount of data
3.k undefined.
4. sL,sH is the specified data length. sL is low-order byte. sH is upper byte.
The data length is sL+sH*256.
DataMatrix type:
1.m undefined.
2.n undefined.
3.k undefined.
4.sL,sH is the specified data length. sL is low-order byte. sH is upper byte.
The data length is sL+sH*256.
[ATTENTION] ●Please set the printable character according to the printable area of the printer due to limitation
of the width of printing paper.
●The maximum height of the printable barcode is 270 dots*0.125(33.75mm).
●Please refer to the relevant standards for details of binary barcode coding standards.
●GS w n can set the width of barcode.
[REFERENCE] GS w n
GS Z n
24 / 30
ESC/POS AK912 Command Specifications V1.4
1.6.2 GS “
25 / 30
ESC/POS AK912 Command Specifications V1.4
1.7.2 FS .
1.7.3 FS U nL nH
26 / 30
ESC/POS AK912 Command Specifications V1.4
1.7.4 ESC t n
27 / 30
ESC/POS AK912 Command Specifications V1.4
2) Reference : http://msdn.microsoft.com/en-us/goglobal/bb964653.aspx
http://en.wikipedia.org/wiki/Code_page
[DEFAULT VALUE] n=255 Simplified Chinese
1.7.5 ESC R n
[DESCRIPT 3 UK £ $ @ [ \ ] ^ ` { | } ~
4 Denmark I # $ @ Æ Ø Å ^ ` æ ø å ~
ION]
5 Sweden # ¤ É Ä Ö Å Ü é ä ö å ü
6 Italy # $ @ ° \ é ^ ù à ò è ì
7 Spain I ₧ $ @ ¡ Ñ ¿ ^ ´ ¨ ñ } ~
8 Japan # $ @ [ ¥ ] ^ ` { | } ~
9 Norway # ¤ É Æ Ø Å Ü é æ ø å ü
10 Denmark II # $ É Æ Ø Å Ü é æ ø å ü
11 Spain II # $ á ¡ Ñ ¿ é ´ í ñ ó ú
12 Latin Amer # $ @ ¡ Ñ ¿ é ü í ñ ó ú
13 Korea # $ @ [ ₩ ] ^ ` { | } ~
[[ATTENTI
ON]]
[DEFAULT n=0
VALUE]
1.7.6 US f
28 / 30
ESC/POS AK912 Command Specifications V1.4
1.7.7 US q
29 / 30
ESC/POS AK912 Command Specifications V1.4
US f is given. The processing time depends on the content and length of the frame data.
[DEFAULT VALUE]
[REFERENCE] US f
30 / 30