ESC - POS AK912 English Command Specifications V1.4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

ESC/POS Command Specifications

V1.4

The command is applicable to AK912


ESC/POS AK912 Command Specifications 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

1.4.2 GS * x y d1…dk 0x1D 0x2A x y d1…dk Define download bit images


1.4.3 GS / n 0x1D 0x2F n Print download bit images
1.4.4 FS P n 1C 50 n Print NV bit image
Bar code printing command
1.5.1 GS h n 0x1D 0x68 n Set bar code height
1.5.2 GS w n 0x1D 0x77 n Set bar code horizontal size
1.5.3 GS H n 0x1D 0x48 n Select HRI character print position
1.5.4 GS f n 0x1D 0x66 n Select HRI character font
1.5.5 GS k m … 0x1D 0x6B m Print bar code
1.5.6 GS Z n 0x1D 0x5A n Select the 2D bar code
1.5.7 ESC Z m n k sL sH 0x1B 0x5A m n k sL Print the 2D bar code
d1…dn sH d1…dn
Curve the print command
1.1.1 GS ‘ 0x1D 0x27 n x1sL x1sH Print curve
x1eL x1eH … xnsL xnsH
xneL xneH
1.1.2 GS “ 0x1D 0x22 n xL xH c1 Print character on the curve
c2 … 0x00
Print Chinese characters command
1.7.1 FS & 0x1C 0x26 Specify Chinese character mode
1.7.2 FS . 0x1C 0x2E Cancel Chinese character mode
1.7.3 FS U nL nH 0x1C 0x55 nL nH Print Unicode code character
1.7.4 ESC t n 0x1B 0x74 n Select character code page
1.7.5 ESC R n 0x1B 0x52 n Select international characters
1.7.6 US f 1F 66 id nL nH crc16L In frame mode data transmission
crc16H d1…dn
1.7.7 US q 1F 71 id Frame status query
Especial command
1.8.1 US sBrP(1F 73 42 72 0x1F 0x73 0x42 0x72 Read the Bluetooth password
50) 0x50
1.8.2 US sBsP k n1…nk 0x1F 0x73 0x42 0x73 Setup the Bluetooth password
0x50 k n1…nk

The illustration of the format in description:

【COMMAND】+【parameter】

【COMMAND】are commands consisting of ESC characters and command characters in bold. ESC characters are

ESC(0x1B), FS(0x1C),GS(0x1D). Some single byte commands have no ESC characters.

【parameter】are parameters,which are not digital characters but the value of the characters in italic and bold.

For example, ESC J n

ESC J is the command while n is the parameter.


 n,nL,nH,n1,n2,nk,m,d1,dk,x,y,c1,c2 indicates a certain value. Please pay attention to the difference
between decimal and hexadecimal digit while using.
 To indicate a hexadecimal digit, it is prefixed by 0x in this instruction. For example, 0x10 indicates 16 of decimal digit.

3 / 30
ESC/POS AK912 Command Specifications V1.4

1.1 Basic control command


1.1.1 ESC @

[Name] Initialize printer


[CODE] ASCII ESC @
Hex. 0x1B 0x40
Decimal 27 64
[RANGE]
[DESCRIPTION] Clear data in printing buffer area. Set printing commands to defaults.
[ATTENTION] Not set to the original factory defaults, but to the default parameters of printing command
setting.
[DEFAULT VALUE]
[REFERENCE]

1.1.2 FF

[Name] Print and feed paper 1 lines


[CODE] ASCII FF
Hex. 0x0C
Decimal 12
[RANGE]
[DESCRIPTION] Print all data in printing buffer area and paper feed paper 1 lines
[ATTENTION] ● All buffer data is deleted after printing
● Sets the print position to the beginning of the next line after execution.

[DEFAULT VALUE]
[REFERENCE] SO

1.1.3 SO

[Name] Print and paper feed to the right black bar


[CODE] ASCII SO
Hex. 0x0E
Decimal 14
[RANGE]
[DESCRIPTION] Print all data in printing buffer area and paper feed to the right black bar.
[ATTENTION] ● This command is used to locate to the minor black bar when printing the vouchers to be
printed. It can be used with FF command to print double-layered vouchers to be printed.
● Delete the data in buffer area after printing.
● This command is to set the starting point of printing lines.
● If there is a black bar in the paper, paper feeding will stop at the right black bar after all
data in the buffer area are printed. If there is not a black bar in the paper, paper feeding
will stop at a distance of 20cm.
[DEFAULT VALUE]
[REFERENCE] FF

4 / 30
ESC/POS AK912 Command Specifications V1.4

1.1.4 LF

[Name] Line feed


[CODE] ASCII LF
Hex. 0x0A
Decimal 10
[RANGE]
[DESCRIPTION] Print all data in printing buffer area and paper feed one line forward with the line space set.
ESC 2,ESC 3 can set the line space.
[ATTENTION] ● This command is to set the starting point of printing lines.
● If there is no data in line buffer area, paper feeds one line forward only.
● If this command is followed by CR command,paper feeds one line forward only.
[DEFAULT VALUE]
[REFERENCE] CR
ESC 2
ESC 3

1.1.5 CR

[Name] Print and carriage return


[CODE] ASCII CR
Hex. 0x0D
Decimal 13
[RANGE]
[DESCRIPTION] Print all data in printing buffer area and paper feed one line forward with the line space set.
ESC 2,ESC 3 can set the line space.
[ATTENTION] This command is to set the starting point of printing lines.
● If there is no data in line buffer area, paper feeds one line forward only.
● If this command is followed by LF command,paper feeds one line forward only.
[DEFAULT VALUE]
[REFERENCE] LF
ESC 2
ESC 3

1.1.6 ESC J n

[Name] Print and Paper Feed


[CODE] ASCII ESC J n
Hex. 0x1B 0x4A n
Decimal 27 74 n
[RANGE] 1≤ n ≤255
[DESCRIPTION] Print all data in printing buffer area and paper feed to n vertical dot pitch plus line space set.
Each dot pitch is 0.125mm.

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

[Name] Print and feed paper n lines


[CODE] ASCII ESC d n
Hex. 0x1B 0x64 n
Decimal 27 100 n
[RANGE] 1≤ n ≤255
[DESCRIPTION] Print all data in printing buffer area and paper feed n lines.
[ATTENTION] ● This command sets the beginning of a line as the printing starting point.
● This command can be impacted by such line space setting commands as ESC 2 & ESC 3.
● This command can be impacted by font size setting commands.
[DEFAULT VALUE]
[REFERENCE] ESC J n

1.1.8 HT

[Name] Horizontal tab


[CODE] ASCII HT
Hex. 0x09
Decimal 9
[RANGE]
[DESCRIPTION] Move to the next horizontal tab.
[ATTENTION] ● Set the horizontal tab with Command ESC D.
● If the next horizontal tab is not set, this command is passed.
● If the next horizontal tab is occupied, move to the next tab but one.
● The default of horizontal tab is 8-character width of character A(12×24), i.e. Column 9,
17, 25 …
[DEFAULT VALUE]
[REFERENCE] ESC D

1.1.9 GS FF

[Name] Print and paper feed to the label gap


[CODE] ASCII Gs FF
Hex. 0x1D 0x0C
Decimal 29 12
[RANGE]
[DESCRIPTION] Print all data in printing buffer area and paper feed to the next segmentation line of the label.
[ATTENTION] ● It locates to the segmentation line when this command is applied for labels.
● This command sets the beginning of a line as the printing starting point.

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]

1.1.10 GS 0x99 (0x1D 0x99)

[Name] Read the printer status


[CODE] ASCII GS 0x99
Hex. 0x1D 0x99
Decimal 29 153
[RANGE]
[DESCRIPTION] This command is to read the interrelated status of the equipment. The feedback characters shall
be 1D 99 XX FF when the printer receives the command.
Each character of the first five characters indicates:

DIGIT VALUE IMPLICATION


0 0 PAPER LOADED
1 PAPER OUT
1 0 COVER CLOSED
1 COVER OPEN
2 0 TEMPERATURE OF PRINTER
ENGINE NORMAL
1 OVERHEAT OF PRINTER ENGINE
3 0 BATTERY LEVEL NORMAL
1 LOW BATTERY LEVEL
4 0 STANDBY
1 PRINTING
The last three digits indicate the paper bin no.
7 6 5 PAPER BIN NO. REMARKS
0 0 0 0 /
0 0 1 1 VAT INVOICE
0 1 0 2 RECEIPT
0 1 1 3 WAY BILL
1 0 0 4 /
1 0 1 5 /
1 1 0 6 /
1 1 1 7 /
[ATTENTION] ● The feedback value indicates the printer status when it receives a command.
[DEFAULT VALUE]
[REFERENCE]

7 / 30
ESC/POS AK912 Command Specifications V1.4

1.2 Character parameter set command


1.2.1 ESC ! n

[Name] Select character printing mode


[CODE] ASCII ESC ! n
Hex. 0x1B 0x21 n
Decimal 27 33 n
[RANGE] 0≤ n ≤ 255
[DESCRIPTION] Select printing mode by setting the parameter n.
The implication of n is as follows:
DIGIT VALUE IMPLICATION
0 0 Western character Font A(12x24)
Chinese character Font A(24x24)
1 - Undefined
2 - Undefined
3 0 Unlock bold mode
1 Bold mode
4 0 Unlock double-height mode
1 Set double-height mode
5 0 Unlock double-width mode
1 Set double-width mode
6 - Undefined
7 0 Unlock underline mode
1 Set underline mode
[ATTENTION] ● When both double-height and double-width mode are selected, the character size is
quadrupled.
● This command can be used to set underline mode for all characters. The underline is two-dot
width defaulted, unless is set one-dot width by ESC. It cannot be used to set underline mode
for the space, rotated and reversed characters generated by HT.
● When there are double-height or even bigger height characters in a line, all characters
align to the baseline.
● ESC M can be used to set font. The last setting command takes the effect.
● ESC E can be used to lock or unlock bold mode. The last setting command takes the
effect.
● ESC – can be used to lock or unlock underline mode. The last setting command takes the
effect.
● GS ! can be used to set character size. The last setting command takes the effect.
● This command is effective for English characters, numbers, symbols and Chinese
characters.
● If n is not meant to be 0, set any digit of 1, 2 and 6 of n to 1.
[DEFAULT VALUE] n =0
[REFERENCE] ESC –
ESC E
GS !
ESC M

8 / 30
ESC/POS AK912 Command Specifications V1.4

1.2.2 GS ! n

[Name] Select character size


[CODE] ASCII GS ! n
Hex. 0x1D 0x21 n
Decimal 29 33 n
[RANGE] 0≤ n ≤ 255 (1 ≤vertical exansion≤ 8, 1 ≤horizontal expansion≤ 8)
[DESCRIPTION] Set character height with any digit of 0~3. Set character width with any digit of 4~7.
WIDTH 7 6 5 4 HEIGHT 3 2 1 0
ONE TIME - - 0 0 ONE TIME 0 0 0 0
DOUBLE - - 0 1 DOUBLE 0 0 0 1
TRIPLE - - 1 0 TRIPLE 0 0 1 0
[ATTENTION] ● This command is effective for all characters, English characters, numbers, symbols and
Chinese characters, but characters read by barcode.
● If n is defined out of range, unknown results may occur.
● Paper feed goes vertical, normal to the horizontal direction. However, if the character is
rotated 90°clockwise, the vertical direction and horizontal direction become reversed, i.e.
this command is subordinate to ESC V. When both commands are effective, the character
rotates first and enlarges after that.
● When different sized characters are enlarged in a line, all characters align to the baseline.
● ESC ! can be used to set character size. The last setting command takes the effect.
● If n is not meant to be 0, set any digit of 6 and 7 of n to 1.
[DEFAULT VALUE] n =0
[REGFERENCE] ESC !

1.2.3 ESC M n

[Name] Select character font


[CODE] ASCII ESC M n
Hex. 0x1B 0x4D n
Decimal 27 77 n
[RANGE] n = 0, 1,2,'0','1','2'
[DESCRIPTION] Select character font.
N IMPLICATION
CHARACTER HEXADECIMAL
0 0x00 Western character Font A(12x24)
Chinese character Font A(24x24)
'0' x30 Western character Font A(12x24)
Chinese character Font A(24x24)`
[ATTENTION] ● Can be used with the codepage selecting ‘FS c’
[DEFAULT VALUE] n =0
[REFERENCE] FS c

9 / 30
ESC/POS AK912 Command Specifications V1.4

1.2.4 ESC – n

[Name] Specify/cancels underline mode


[CODE] ASCII ESC – n
Hex. 0x1B 0x2D n
Decimal 27 45 n
[RANGE] 0≤ n ≤ 2
[DESCRIPTION] Set/unlock the underline mode based on the n value as follows:

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

[Name] Specify/cancel emphasized printing


[CODE] ASCII ESC E n
Hex. 0x1B 0x45 n
Decimal 27 69 n
[RANGE] 0 ≤ n ≤ 255
[DESCRIPTION] Lock/unlock bold mode.
N IMPLICATION
CHARACTER HEXADECIMAL
0 0x00 Unlock bold mode
1 0x01 Lock bold mode
'0' 0x30 Unlock bold mode
'1' 0x31 Lock bold mode
[ATTENTION] ● ESC !can be used to lock or unlock bold mode. The last setting command takes the effect.
[DEFAULT VALUE] n = 0
[REFERENCE] ESC !
ESC G

10 / 30
ESC/POS AK912 Command Specifications V1.4

1.2.6 GS B n

[Name] Specify/cancel white/black inverted printing


[CODE] ASCII GS B n
Hex. 0x1D 0x42 n
Decimal 29 66 n
[RANGE] 0 (0x30)≤ n ≤ 255
[DESCRIPTION] Lock/unlock reversed printing.

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

[Name] Specify/cancel char. 90 deg. clockwise rotation


[CODE] ASCII ESC V n
Hex. 0x1B 0x56 n
Decimal 27 86 n
[RANGE] 0≤ n ≤ 3
[DESCRIPTION] Set/unlock character rotation mode.
N IMPLICATION
CHARACTRER HEXADECIMAL CODE
0 0x00 Unlock rotation mode
1 0x01 Rotate 90°clockwise
2 0x02 Rotate 180°clockwise
3 0x03 Rotate 270°clockwise
'0' 0x30 Unlock rotation mode
'1' 0x31 Rotate 90°clockwise
'2' 0x32 Rotate 180°clockwise
'3' 0x33 Rotate 270°clockwise
[ATTENTION] ● Rotated characters are not underlined even underline mode is locked.
● In rotation mode, double-width and double-height characters’ direction is reverse to
double-width and double-height characters in normal mode.
[DEFAULT VALUE] n = 0x00 (0x30)

11 / 30
ESC/POS AK912 Command Specifications V1.4

[REFERENCE] ESC !
ESC –

1.3 Print layout parameters set command


1.3.1 ESC $ nL nH

[Name] Specify absolute position


[CODE] ASCII ESC $ nL nH
Hex. 0x1B 0x24 nL nH
Decimal 27 36 nL nH
[RANGE] 0≤ nL ≤ 255;0≤ nH ≤2
[DESCRIPTION] Set the distance from the starting point of one line to position where the character to be printed.
nL nH are the low-order byte and upper byte of the double byte unsigned whole number n. n
=nL + nH *256
It is n horizontal dot pitch from the starting point of one line to the position to be printed. Each
horizontal dot pitch is 0.125mm.
[ATTENTION] ● This command is only effective in its present line.
● If the printing position is beyond the set printable area, it will be printed at the starting point
of the next line.
● If there is data at the set printing position, the data will be replaced.
● If nH is not meant to be 0x00, it can be set as 0x80. The result is the same with nH=0x00.
[DEFAULT VALUE]
[REFERENCE]

1.3.2 ESC D n1 n2…nk NULL

[Name] Set horizontal tab position


[CODE] ASCII ESC D n1…nk NULL
Hex. 0x1B 0x44 n1…nk 00(FF)
Decimal 27 68 n1…nk 0(255)
[RANGE] 1≤ n1,..,nk ≤ 72 ;0 ≤ k ≤ 8;
[DESCRIPTION] Set the horizontal position.
n1,…,nk: Appoint the column no. of one line as the horizontal tab position.
k indicates the total number of the horizontal tab to be set.
[ATTENTION] ● Horizontal tab is saved as a value, which is n Western characters’ width, measured from
the starting point of one line. The width includes the default space between characters.
● This command is not impacted by character enlarging command ESC !, GS !.
● This command deletes the previously set horizontal position.
● 8 positions can be set(k = 8).Data exceeding 8 positions is treated as normal data.
● nk is transmitted in ascending sequence, ended with a NULL code(0x00 or 0xFF).
● nk >n(k-1) in this command. If nk is smaller or equals to the frontal value n(k-1), nk
position is ignored。
● ESC D NULL cancels all horizontal position setting.
[DEFAULT VALUE] The space between horizontal position is default to be 8 characters (12*24),i.e. column 9,17,
25, …

12 / 30
ESC/POS AK912 Command Specifications V1.4

[REFERENCE] HT

1.3.3 ESC 2

[Name] Set default line spacing


[CODE] ASCII ESC 2
Hex. 0x1B 0x32
Decimal 27 50
[RANGE]
[DESCRIPTION] Set current line space to the default value 1mm(8 vertical dot pitch)。
[ATTENTION] ● This command can impact the line space between the image and the character.
[DEFAULT VALUE]
[REFERENCE] ESC 3

1.3.4 ESC 3 n

[Name] Set line feed amount


[CODE] ASCII ESC 3 n
Hex. 0x1B 0x33 n
Decimal 27 51 n
[RANGE] 0≤ n ≤ 127
[DESCRIPTION] Set line space as n vertical dot pitch. Each vertical dot pitch is 0.125mm.
[ATTENTION] ● This command can impact the line space between the image and the character.
● If n is not meant to be 0x00,it can be set as 0x80. The result is the same with n=0x00.
[DEFAULT VALUE] n = 8
[REFERENCE] ESC 2

1.3.5 ESC SP n

[Name] Set character right space amount


[CODE] ASCII ESC SP n
Hex. 0x1B 0x20 n
Decimal 27 32 n
[RANGE] 0≤ n ≤ 48
[DESCRIPTION] Set each space on the right of a character as n horizontal dot pitch. Each horizontal dot pitch is
0.125mm.
[ATTENTION] ● Under double-width mode, the space on the right of a character is twice as normal. When
the character is enlarged, the space will be enlarged at the same times.
● This commands can impact the setting of both English and Chinese characters.
● If n is not meant to be 0x00,it can be set as 0x80. The result is the same with n=0x00.
[DEFAULT VALUE] n = 0 (0x80)
[REFERENCE]

13 / 30
ESC/POS AK912 Command Specifications V1.4

1.3.6 ESC a n

[Name] Position alignment


[CODE] ASCII ESC a n
Hex. 0x1B 0x61 n
Decimal 27 97 n
[RANGE] 0≤ n ≤ 2
[DESCRIPTION] Set the line alignment with n value.
The alternatives and implications of 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

[Name] Set left margin


[CODE] ASCII GS L nL nH
Hex. 0x1D 0x4C nL nH
Decimal 29 76 nL nH
[RANGE] 0 ≤ nL ≤255;0≤ nH ≤2
[DESCRIPTION] Left margin is the width from the left end to the left beginning of printable area.
nL & nH are the low-order byte and upper byte of the unsigned double-byte whole number.
Left margin is set to be n horizontal dot pitch.n = nL + nH * 256. Each horizontal dot pitch is
0.125mm.
[ATTENTION] ● This command is only effective when start processing at the beginning of a line.
● The maximum margin is 576. No contents can be printed when it goes beyond 576.
● If nH is not meant to be 0x00,it can be set as 0x80. The result is the same with nH=0x00.
[DEFAULT VALUE] nL = 0, nH = 0
[REFERENCE]

1.4 Graphics / image print command


1.4.1 ESC * m nL nH d1…dk

[Name] Specify bit image mode

14 / 30
ESC/POS AK912 Command Specifications V1.4

[CODE] ASCII ESC * m nL nH d1…dk


Hex. 0x1B 0x2A m nL nH d1…dk
Decimal 27 42 m nL nH d1…dk
[RANGE] m = 0, 1, 32, 33
0 ≤ nL ≤ 255
0 ≤ nH ≤ 2
0 ≤ d ≤ 255
[DESCRIPTION] This command is only effective for black and white bitmaps of 8-dot or 24-dot height and not
exceeding printable area.
The direction of image scanning is from top to bottom, left to right. When data bit is 1, black
dots are printed. When data bit is 0, no printing.
The implications of the parameters are as follows:
Use m to set the bitmap mode. The dot number of horizontal direction of bitmaps is determined
by nL & nH.
m(DECIMAL) VERTICAL DOTS IMPLICATION
(HEIGHT)
0 8 Double-width
1 8 Single-time-width
32 2 Double-width
33 2 Single-time-width
nL, nH are the low-order byte and upper byte of the double byte unsigned whole number n,
which indicate the dot number in horizontal bitmaps. The maximum value of single-time width
n is 576,the maximum of double-width is 288.
d1…dk indicate bitmap data, the format of which are described as follows:
m = 0 :d1 indicates the data of column dot of 1 and 2. dk indicates the data of column dot of
2k-1 and 2k. bn indicates the n digit of byte.
m = 1 :d1 indicates the data of column dot of 1. dk indicates the data of column dot of k. bn
indicates the n digit of byte.

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

[ATTENTION] ● If m exceeds the range,unpredictable results may occur。


● If the key-in bitmap data exceeds the number of the printable dots of the line, the data
exceeded shall be ignored.
● The printer returns to the normal data processing mode after printing a bitmap.。
● This command is not impacted by printing mode(bold, overstriking, underline, font size and
reverse printing).
[DEFAULT VALUE]
[REFERENCE] GS * x y d1…dk

1.4.2 GS * x y d1…dk

[Name] Define download bit images


[CODE] ASCII GS * x y d1…dk
Hex. 0x1D 0x2A x y d1…dk
Decimal 29 42 x y d1…dk
[RANGE] 1≤ x ≤72 (576/8);1≤ y ≤ 20;x * y ≤ 400
0≤ d ≤ 255;k=x * y * 8
[DESCRIPTION] Downloading bitmaps are defined by dot number of x & y.
The direction of image scanning is from top to bottom, left to right.
x * 8 indicates the horizontal dots.
y * 8 indicates the vertical dots.
[ATTENTION] ● Limited by the buffer area, if x * y value exceeds the range,this command becomes
ineffective.
● d indicates the bitmap data. The printing digit for d is 1, the non printing digit is 0.
● The downloading bitmaps defined by this command is printed by command GS / n.
16 / 30
ESC/POS AK912 Command Specifications V1.4

● Downloading bitmap definitions are cleared under below circumstances:


1. ESC @ is executed.
2. The printer is reset or power off.
[DEFAULT VALUE]
[REFERENCE] GS / n
[EXAMPLE] The picture below is a bitmap of 16-dot width and 24-dot height.
x =2,y =3,d1…dk values are as follows.
d1 = 0x00; d2 = 0x00; d3 = 0x00;//第1列 d4 = 0x00; d5 = 0x00; d6 = 0x03;//2
d7 = 0x00; d8 = 0x00; d9 = 0xFE;//3 d10 = 0x00; d11 = 0x3F; d12 = 0xE0;//4
d13 = 0x03; d14 = 0xE0; d15 = 0x30;//5 d16 = 0x0E; d17 = 0x00; d18 = 0x18;//6
d19 = 0x11; d20 = 0x00; d21 = 0x08;//7 d22 = 0x20; d23 = 0xC0; d22 = 0x0C;//8
d25 = 0x40; d26 = 0xC0; d23 = 0x0C;//9 d28 = 0x80; d29 = 0xC0; d30 = 0x0C;//10
d31 = 0x80; d32 = 0x40; d33 = 0x1C;//11 d34 = 0x80; d35 = 0x60; d36 = 0x1C;//12
d37 = 0x80; d38 = 0xFF; d39 = 0xF8;//13 d40 = 0x43; d41 = 0x9F; d42 = 0xF0;//14
d43 = 0x7F; d44 = 0x07; d45 = 0xC0;//15 d46 = 0x3E; d47 = 0x00; d48 = 0x00;//16

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

[Name] Print download bit images


[CODE] ASCII GS / n
Hex. 0x1D 0x2F n
Decimal 29 47 n
[RANGE] 0≤ n ≤ 3
[DESCRIPTION] Downloading bitmaps defined by command GS * are printed in the mode set by n.

17 / 30
ESC/POS AK912 Command Specifications V1.4

n sets the mode as follows:

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

[Name] Print NV bit image


[CODE] ASCII FS P n
Hex. 1C 50 n
Decimal 28 80 n
[RANGE]
n IMPLICATION
CHARACTER HEXADECIMAL
0 8 0x00 0x08 No.00 bitmap is selected to print
1 9 0x01 0x08 No.01 bitmap is selected to print
2 A 0x02 0x0A No.02 bitmap is selected to print
3 B 0x03 0x0B No.03 bitmap is selected to print
4 C 0x04 0x0C No.04 bitmap is selected to print
5 D 0x05 0x0D No.05 bitmap is selected to print
6 E 0x06 0x0E No.06 bitmap is selected to print
7 F 0x07 0x0F No.07 bitmap is selected to print

[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 Bar code printing command


1.5.1 GS h n

[Name] Set bar code height


[CODE] ASCII GS h n
Hex. 0x1D 0x68 n
Decimal 29 104 n
[RANGE] 12≤ n ≤160
[DESCRIPTION] Set the height of barcode. Set the vertical dots with n. Each dot pitch is 0.125mm.
[ATTENTION] ● If n <12, the height of barcode is set as n =12。
● If n >160, the height of barcode is set as n =160。
[DEFAULT VALUE] n = 36
[REFERENCE] GS k

1.5.2 GS w n

[Name] Set bar code horizontal size


[CODE] ASCII GS w n
Hex. 0x1D 0x77 n
Decimal 29 119 n
[RANGE] 1≤ n ≤ 4
[DESCRIPTION] Set the horizontal size of barcode.
n indicates as follows:
n UNIT WIDTH OF WIDTH OF BINARY BARCODE
MULTILEVEL NARROW LINE WIDE LINE
BARCODE(mm) WIDTH WIDTH
1 0.125 0.125 0.25
2 0.25 0.25 0.50
3 0.375 0.375 0.75
4 0.50 0.50 1.0
These are multilevel barcodes:
UPC-A, UPC-E, EAN13, EAN8, CODE93
These are binary barcodes:
CODE39,CODABAR,ITF
[ATTENTION]
[DEFAULT VALUE] n =2
[REFERENCE] GS k

1.5.3 GS H n

[Name] Select HRI character print position


[CODE] ASCII GS H n
Hex. 0x1D 0x48 n
Decimal 29 72 n
[RANGE] 0≤ n ≤ 2

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

[Name] Select HRI character font


[CODE] ASCII GS f n
Hex. 0x1D 0x66 n
Decimal 29 102 n
[RANGE] 0≤ n ≤ 1
[DESCRIPTION] Select font of the readable characters when printing barcode.
Alternatives and implications of n:
n POSITION OF READABLE
CHARACTER HEXADECIMAL CHARACTERS
0 0x00 Font A (12×24)
1 0x01 Font B (8×16)
'0' 0x30 Font A (12×24)
'1' 0x31 Font B (8×16)
[ATTENTION] ● Print the readable characters of barcode at the position GS H has set.
● The readable characters of barcode are not impacted by printing mode (overstriking,
underline, font size and reverse printing).
[DEFAULT VALUE] n = 0x00 (0x30)
[REFERENCE] GS H
GS k

1.5.5 GS k m …

[Name] Print bar code


[CODE] ASCII GS k m d1…dk NULL
Hex. 0x1D 0x6B m d1…dk 00(FF)
Decimal 29 107 m d1…dk 0(255)
[CODE 2] 65 ≤ m ≤ 73

20 / 30
ESC/POS AK912 Command Specifications V1.4

[CODE] ASCII GS k m nL d1…dn


Hex. 0x1D 0x6B m nL d1…dn
Decimal 29 107 m nL d1…dn
[RANGE] 0 (0x80)≤ m ≤ 8 (Data length(k) and data contents(d) are determined by the barcode system
being used.)
65 ≤ m ≤ 73 (Data length(nL) and data contents(d) are determined by the barcode system being
used.)
1≤ nL ≤255 nL is the data length of the printing barcode.
[DESCRIPTION] Select a barcode system and print. Parity-check code calculates automatically.
M defines the barcode system as follows:
BARCODE BARCODE CHARACTER SET RANGE(d)
m
TYPE LENGTH(k) DECIMAL
0 UPCA 11≤k≤12 48≤d≤57
1 UPC-E 7≤k≤8 48≤d≤57
2 EAN8 7≤k≤8 48≤d≤57
3 EAN13 12≤k≤13 48≤d≤57
CODE39 1≤k 48≤d≤57,65≤d≤90,
4
d= 32,36,37,43,45,46,47
INTERLEAVED 1≤k(odd number) 48≤d≤57
5
25(ITF)
CODABAR 1≤k 48≤d≤57,65≤d≤68,
6
d= 36, 43,45,46,47,58
CODE93 1≤k 48≤d≤57,65≤d≤90,
7
d= 32,36,37, 43,45,46,47
8 CODE128 2≤k≤232 0≤d≤127

BARCODE BARCODE DATA CHARACTER SET RANGE(d)


m
TYPE LENGTH(k) DECIMAL
65 UPC-A 11≤k≤12 48≤d≤57
66 UPC-E 7≤k≤8 48≤d≤57
67 EAN8 7≤k≤8 48≤d≤57
68 EAN13 12≤k≤13 48≤d≤57
CODE39 1≤k≤255 48≤d≤57,65≤d≤90,
69
d= 32,36,37,43,45,46,47
INTERLEAVED 1≤k≤255 (odd 48≤d≤57
70
25(ITF) number)
CODABAR 1≤k≤255 48≤d≤57,65≤d≤68,
71
d= 36, 43,45,46,47,58
72 CODE93 1≤k≤255 0≤d≤127
73 CODE128 2≤k≤232 0≤d≤127
[ATTENTION] ● When format 1 command is in use, if the data length is specified by barcode type, the
subscript of dk, k(the data length of barcode the printer has received)should be the
specified data length. If it 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.

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

[Name] Select the 2D bar code


[CODE] ASCII GS Z n
Hex. 0x1D 0x5A n
Decimal 29 90 n
[RANGE] n=0: Select PDF417(default) binary barcode.
n=1: Select DataMatrix binary barcode.
n=2: Select QR-CODE binary barcode.
[DEFAULT VALUE] n=0 (PDF417)
[REFERENCE] GS Z m n k sl sh d1…dn

1.5.7 ESC Z m n k sL sH d1…dn

[Name] Print the 2D bar code


22 / 30
ESC/POS AK912 Command Specifications V1.4

[CODE] ASCII ESC Z m n k sL sH d1…dn


Hex. 0x1B 0x5A m n k sL sH d1…dn
Decimal 27 90 m n k sL sH d1…dn
[DESCRIPTION]
PDF417 CODE:
1.m is the column number,manifesting how many code bits in each line. One code word i
17*w dots.
w is the value the barcode width command GS w n sets.
The line number is generated by the printer automatically, ranging from 3 ~ 90.
1≤ m ≤30
2.n is the level of error correction(ECC).
n CORRECTED CODE NUMBER STORABLE DATA VOLUMN(BYTES)
0 2 1108
1 4 1106
2 8 1101
3 16 1092
4 32 1072
5 64 1024
6 128 957
7 256 804
8 512 496
SUGGESTED ERROR CORRECTION LEVEL
BYTES CORRECTION LEVEL(k)
1 ~ 40 2
41 ~ 160 3
161 ~ 320 4
321 ~ 863 5
0≤ n ≤8
3. K is length-width ratio.
3≤ n ≤4
4. sL,sH is the specified data length. sL is low-order byte,sH is upper byte.
The data length is sL+sH*256.

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

1.6 Curve the print command


1.6.1 GS ‘ n x1sL x1sH x1eL x1eH… xnsL xnsH xneL xneH

[Name] Print curve


[CODE] ASCII GS ‘ n x1sL x1sH x1eL x1eH … xnsL xnsH xneL xneH
Hex. 0x1D 0x27 n x1sL x1sH x1eL x1eH … xnsL xnsH xneL xneH
Decimal 29 39 n x1sL x1sH x1eL x1eH … xnsL xnsH xneL xneH
[RANGE] 0≤n≤8
[DESCRIPTION] As is shown in the enlarged drawing below, each curve consists of several horizontal
segments(a dot can be regarded as a segment with the length of 1).This command is used to
print n segments of a horizontal line. The curve segment needed by the user can be produced

24 / 30
ESC/POS AK912 Command Specifications V1.4

by continuous use of this command.


n number of segments;
xksL The lower position of the horizontal axis of the
starting point of Segment k;
xksH The higher position of the horizontal axis of the
starting point of Segment k;
xkeL The lower position of the horizontal axis of the
ending point of Segment k;
xkeH The higher position of the horizontal axis of the
ending point of Segment k;
The coordinate position counts from the left end
of the printing area. The minimum value is 0.
The maximum value is 383,i.e. the maximum of
xkeL+xkeH*256 is 383.
It is not necessary to put segment data in sequence.
[ATTENTION] ● When printing a dot,xkeL = xksL, xkeH = xksH.
[REFERENCE] GS“

1.6.2 GS “

[Name] Print character on the curve


[CODE] ASCII GS “ n xL xH c1 c2 … NULL
Hex. 0x1D 0x22 n xL xH c1 c2 … 0x00
Decimal 29 34 n xL xH c1 c2 … 0
[RANGE] 0≤n≤1
[DESCRIPTION] This command is used to print the characters on the curve in current font. Characters are
automatically 90°rotated by this command when printing(character string rotates clockwise).
n is character number.
xL xH is the higher and lower position of the horizontal axis of the character.
c1 c2 … NULL is the character string that ends with 0.
[ATTENTION] ● This command is only effective between two ESC ‘ commands.
● The printer start printing 90°rotated characters in current line right after it receives this
command.
● When there have been characters in current horizontal dotted line,it needs to set other
values as character numbers to print other characters, but only limit to 0 and 1.
● There can be at most 2 characters in one horizontal dotted line.
● It needs enough number of horizontal dots or segments beneath the horizontal line to print
complete characters.
[REFERENCE] GS ‘

25 / 30
ESC/POS AK912 Command Specifications V1.4

1.7 Language Control Commands


1.7.1 FS &

[Name] Specify Chinese character mode


[CODE] ASCII FS &
Hex. 0x1C 0x26
Decimal 28 38
[DESCRIPTION] Select Chinese character mode.
[ATTENTION] Chinese character mode is selected when the power switch of printer is on.
[REFERENCE] FS .

1.7.2 FS .

[Name] Cancel Chinese character mode


[CODE] ASCII FS .
Hex. 0x1C 0x2E
Decimal 28 46
[RANGE]
[DESCRIPTION] Unlock Chinese character mode. When Chinese character mode is unlocked, the code exceeding
0x80 is still processed as ASCII characters. No Chinese characters will be printed, unless select
Chinese character mode again with command FS &.
[ATTENTION] ● Command ESC @ will make the printer select Chinese character mode after the equipment is
rest.
[DEFAULT VALUE]
[REFERENCE] FS &

1.7.3 FS U nL nH

[Name] Print Unicode code character


[CODE] ASCII FS U nL nH
Hex. 0x1C 0x55 nL nH
Decimal 28 85 nL nH
[RANGE]
[DESCRIPTION] Print n (n =nL + nH*256) Unicode characters.
[ATTENTION] ● Unicode is double-byte code. The 2*n (n = nL + nH*256) bytes after this command is
processed as Unicode characters.
● This command only supports the Chinese characters contained in GBK font, not all Chinese
characters contained in Unicode.
● This command is not impacted by Chinese commands.
● This command can be embedded with other commands like ESC / GS / FS,but in
Unicode.
● Please refer to ‘Chinese ISN Extension Standard’ made by the Technical Committee of
Information Technology Standardization for details of GBK.
● Please check the official website of Unicode http://www.unicode.org for the details of
Unicode.
[DEFAULT VALUE]

26 / 30
ESC/POS AK912 Command Specifications V1.4

1.7.4 ESC t n

[Name] Select character code page


[CODE] ASCII ESC t n
Hex. 0x1B 0x74 n
Decimal 27 116 n
[RANGE] 0 ≤ n ≤ 50 , n = 252,253,254,255
[DESCRIPTION] Selects a code page n from the character code table as follows.
n Character Type Remark (size)
0 Page 0 USA, Standard Europe [CP437]
1 Page 1 Katakana
2 Page 2 Multilingual(Latin-1) [CP850]
3 Page 3Portuguese [CP860]
4 Page 4 Canadian-French [CP863]
5 Page 5 Nordic [CP865]
6 Page 6 Slavic(Latin-2) [CP852]
7 Page 7 Turkish [CP857]
8 Page 8 Greek [CP737]
9 Page 9 Russian(Cyrillic) [CP866]
10 Page 10 Hebrew [CP862]
11 Page 11 Baltic [CP775]
12 Page 12 Polish
13 Page 13 Latin-9 [ISO8859-15]
14 Page 14 Latin1[Win1252]
15 Page 15 Multilingual Latin I + Euro[CP858]
16 Page 16 Russian(Cyrillic)[CP855]
17 Page 17 Russian(Cyrillic)[Win1251]
18 Page 18 Central Europe[Win1250]
19 Page 19 Greek[Win1253]
20 Page 20 Turkish[Win1254]
21 Page 21 Hebrew[Win1255]
22 Page 22 Vietnam[Win1258]
23 Page 23 Baltic[Win1257]
24 Page 24 Azerbaijani
25-29 Reserved
30 Thai[CP874]
31-39 Reserved
40 Page 25 Arabic [CP720]
41 Page 26 Arabic [Win 1256]
42 Page 27 Arabic (Farsi)
43 Page 28 Arabic presentation forms B
44-49 Reserved
50 Page 29 Hindi_Devanagari
252 Page 30 Japanese [CP932]
253 Page 31 Korean [CP949]
254 Page 32 Traditional Chinese [CP950]
255 Page 33 Simplified Chinese [CP936]

[ATTENTION] 1) Character code table can be different by printer version.

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

[Name] Select an international character set.


[CODE] ASCII ESC R n
Hex. 0x1B 0x52 n
Decimal 27 82 n
[RANGE] 0 ≤ n ≤ 13
Selects an international character set n from the following table.
n Country 0x2 0x2 0x4 0x5 0x5 0x5 0x5 0x6 0x7 0x7 0x7 0x7E
0 America # $ @ [ \ ] ^ ` { | } ~
1 France # $ à ° ç § ^ ` é ù è ¨
2 Germany # $ § Ä Ö Ü ^ ` ä ö ü ß

[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

[Name] In frame mode data transmission


[CODE] ASCII US f id nL nH crc16L crc16H d1…dn
Hex. 1F 66 id nL nH crc16L crc16H d1…dn
Decimal 31 102 id nL nH crc16L crc16H d1…dn
[RANGE] 0≤ id ≤255 ;0≤ nL ≤ 255 ;0 ≤ nH ≤ 255
[DESCRIPTION] Transmit data in frames.
id: ID of frame, 1 byte
nL:Low-order byte of data length,1 byte.
nH:Upper byte of data length, 1 byte.
Data length equals to nL+nH*251.
crc16L: Low-order byte checked by CRC16,1 byte.
crc16H: Upper byte checked by CRC16,1 byte.

28 / 30
ESC/POS AK912 Command Specifications V1.4

d1…dn:Frame data,n bytes. n=nL+nH*256


[ATTENTION] ● A frame data supports at most 4096 bytes.
● If nL+nH*256 in this command is bigger than 4096,this frame command is regarded as
invalid frame. The data will be processed as normal ESC data afterwards.
● This frame is invalid if CRC16 error occurs.
● Frame data can contain other ESC commands,but US f.
[DEFAULT VALUE]
[REFERENCE] US q

1.7.7 US q

[Name] Frame status query


[CODE] ASCII US q id
Hex. 1F 71 id
Decimal 1F 71 id
[RANGE]
[DESCRIPTION] This command turns back to the id status of last specified frame by US f, in the format: 1F 71 id
03 fs ps0 ps1.
Fixing data 03 indicates the parameter of 3-byte return, 1 byte.
fs:frame status,1 byte, shown as below:
Fs value IMPLICATION
00 FRAME_RESET
01 FRAME_DATA_OK
02 FRAME_DATA_ERROR
03 FRAME_PRINT_ERROR
04 FRAME_PRINTING
05 FRAME_PRINT_OK
ps0:Low-position of the printer,1 byte,upper-position is in the front.
ps1:Upper-position of the printer, 1 byte,upper-position is in the front.
BYTE Bit IMPLICATION VALUE REMARKS
0 Paper bin status 1:Paper out;0:Paper
loaded
1 Temperature of 1:Overheated;0:Nor Temperature higher
ps0 print head mal than 90℃
2 Battery voltage 1:Low
battery;0:Normal
3 Printing status 1:Busy;0:Idle
4 Cover status 1:Open;0:Closed
5 - 1
6-7 Hold
ps1 0-7 Hold
[ATTENTION] ● This command is non-real-time command. Correlated status is regained only after it
processes the frame data.
● It needs delayed time waiting for the processing command to check frame status after

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

1.8 Especial command


1.8.1 US sBrP

[Name] Read the Bluetooth password


[CODE] ASCII US sBrP
Hex. 0x1F 0x73 0x42 0x72 0x50
Decimal 31 115 66 114 80
[RANGE]
[DESCRIPTION] This command is used to read the pin code set by the equipment with Bluetooth. The feedback
characters are 1F 73 42 72 50 k after the printer receives the command.
N1…Nk,k is the digit of the password,N1…NK is the password data
The implication of each digit is:
[ATTENTION] ● The printer beeps when successfully reads the password of Bluetooth.
[DEFAULT VALUE]
[REFERENCE] US sBsP

1.8.2 US sBsP k n1…nk

[Name] Set the Bluetooth password


[CODE] ASCII US sBsP k n1…nk
Hex. 0x1F 0x73 0x42 0x73 0x50 k n1…nk
Decimal 31 115 66 114 80 k n1…nk
[RANGE] 1≤k≤7
[DESCRIPTION] To set the Bluetooth password, the password cannot be null. The maximum password is 7 digits.
n1...nk can consist of number of 0-9, both capital letters and lower case letters and "!" "@" "#"
"$" "%" "^" "&" "*".
The printer beeps and the bluetooth restarts (so it can be used as the command for unlocking the
bluetooth) after the password is successfully set.
[ATTENTION] ● Re-connection of matching is needed after the password is successfully set.
[DEFAULT VALUE]
[REFERENCE] US sBrP

30 / 30

You might also like