HPRT PPTII-A Owner's manual

PPTII-A Programming Manual
www.hprt.com
2
REVISION RECORDS
Rev. Date Description Drawn Checked Approved
1.0 2014.02.17 —— Chen Weihua Lin Yang Ren Xiaowei
1.1 2014.07.30
1.change orders(ESC M n\ESC t n)
Chen Weihua Yang Kaiqu Ren Xiaowei

PPTII-A Programming Manual
www.hprt.com
3
CONTENTS
1. Overview.............................................................................................................................................................5
1.1 Key terms..................................................................................................................................................5
1.2 Command Notation..................................................................................................................................5
2. Printing command set........................................................................................................................................ 5
HT....................................................................................................................................................................6
LF.....................................................................................................................................................................6
FF.................................................................................................................................................................... 6
CR.................................................................................................................................................................... 6
CAN................................................................................................................................................................. 7
DLE EOT n....................................................................................................................................................... 7
DLE ENQ n.......................................................................................................................................................7
ESC FF..............................................................................................................................................................9
ESC SP n........................................................................................................................................................ 10
ESC ! n........................................................................................................................................................... 10
ESC $ nL nH................................................................................................................................................... 10
ESC % n......................................................................................................................................................... 11
ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)].................................................................................... 11
ESC * m nL nH d1... dk..................................................................................................................................12
ESC - n........................................................................................................................................................... 14
ESC 2............................................................................................................................................................. 14
ESC 3 n.......................................................................................................................................................... 15
ESC = n.......................................................................................................................................................... 15
ESC ? n.......................................................................................................................................................... 15
ESC @............................................................................................................................................................16
ESC D n1...nk NUL......................................................................................................................................... 16
ESC E n.......................................................................................................................................................... 16
ESC G n..........................................................................................................................................................16
ESC J n........................................................................................................................................................... 17
ESC L..............................................................................................................................................................17
ESC M n.........................................................................................................................................................17
ESC R n.......................................................................................................................................................... 18
ESC S............................................................................................................................................................. 18
ESC T n.......................................................................................................................................................... 18
ESC V n.......................................................................................................................................................... 19
ESC W xL xH yL yH dxL dxH dyL dyH.............................................................................................................20
ESC \ nL nH................................................................................................................................................... 20
ESC a n.......................................................................................................................................................... 21
ESC c 0 n........................................................................................................................................................21
ESC d n.......................................................................................................................................................... 22
ESC l n X0l X0h Y0l Y0h X1l X1h Y1l Y1h....................................................................................................... 22
ESC p............................................................................................................................................................. 22
ESC t n........................................................................................................................................................... 22
ESC v............................................................................................................................................................. 23
ESC { n........................................................................................................................................................... 24
FS p n m........................................................................................................................................................ 25
FS q n [xL xH yL yH d1...dk]1...[xL xH yL yH d1...dk]n.................................................................................. 25
GS FF............................................................................................................................................................. 26
GS ! n............................................................................................................................................................ 27
GS $ nL nH.....................................................................................................................................................28
GS ( A pL pH n m........................................................................................................................................... 29
GS * x y d1...d(x × y × 8)............................................................................................................................... 29
GS / m........................................................................................................................................................... 30
GS..................................................................................................................................................................31

PPTII-A Programming Manual
www.hprt.com
4
GS B n............................................................................................................................................................31
GS H n........................................................................................................................................................... 32
GS L nL nH..................................................................................................................................................... 32
GS W nL nH................................................................................................................................................... 33
GS \ nL nH..................................................................................................................................................... 33
GS f n.............................................................................................................................................................34
GS h n............................................................................................................................................................34
①GS k m d1 d2 …dk NUL ②GS k m n d1 d2 … dn.................................................................................. 34
GS r n............................................................................................................................................................ 34
GS v 0 m xL xH yL yH d1....dk........................................................................................................................35
GS w n........................................................................................................................................................... 36
3.Multi-byte code characters commands list...................................................................................................... 37
FS ! n............................................................................................................................................................. 38
FS &...............................................................................................................................................................38
FS -n.............................................................................................................................................................. 38
FS ..................................................................................................................................................................39
FS S n1 n2......................................................................................................................................................39
FS W n........................................................................................................................................................... 40
ESC m x x’ y y’ w w’ h h’........................................................................................................................ 40
ESC o x x’ y y’ r r’..................................................................................................................................41
GS x n............................................................................................................................................................ 42
GS i n........................................................................................................................................................... 42
GS ( k pL pH cn fn n (cn = 49, fn = 67)......................................................................................................... 42
GS ( k pL pH cn fn n (cn = 49, fn = 69)......................................................................................................... 43
GS ( k pL pH cn fn m d1…dk (cn = 49, fn = 80)............................................................................................ 43
GS ( k pL pH cn fn m (cn = 49, fn = 81)........................................................................................................ 43
4.Programming Process Guide............................................................................................................................. 44
Appendix...............................................................................................................................................................45
Appendix A: Code128 Bar Code................................................................................................................... 45
A.1 Description of th e CODE128 Bar Code................................................................................................. 46
B.1 General Description............................................................................................................................... 48
B.2 Setting Values in Standard and Page Modes.........................................................................................50
B.3 Formatting of Print Data in the Printable Area..................................................................................... 50

PPTII-A Programming Manual
www.hprt.com
5
1. Overview
1.1 Key terms
Real-time
commands:
These commands are act ed on immediately upon being received by the
printer ;
Page mode:
Under this mode, the printer stores all data in a specified memory and thinks
of this as a virtual page. The page is printed when the printer receives print
command either FF or ESC FF;
Standard mode:
Standard mode is the default mode of printer, namely line mode. Under this
mode, the printer prints data and feeds paper upon print line buffer full (data
is enough for one print line) or receiving print command like LF;
HRI character:
Bar code note character. Human Readable Interface;
NV:
Non-volatile memory in which data stored does not loss when powered off.
NV: Non- volatile;
RAM :
Random Access Memory;
ASB:Auto Send Back
DPI:
Print dots per inch (one inch equals to 25.4mm). It is us ed to identify the
resolution of a printer.
1.2 Command Notation
[Name]
The name of the command.
[Format]
The code sequence.
[ ]k indicates the contents in brackets [ ] should be repeated k times.
[Range]
Gives the allowable ranges, if any, for the command parameters.
[Default]
Gives the default values, if any, for the arguments.
[Description]
Describes the function of the command.
” − “ in the table indicates 0 or 1.
[Notes]
Provides important information on setting and using the printer command, if
necessary.
[Reference]
Gives references, if any.

PPTII-A Programming Manual
www.hprt.com
6
2.Printing command set
HT
[Name]
Horizontal tab
[Format]
ASCII HT
Hex 09
Decimal 9
[Dscription]
Moves the print position to the next horizontal tab position.
[Notes]
•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.
•Set Horizontal tab default to 8 character width of character ASCII (12×24).
•When the print buffer is full,the printer performs the following actions:
In standard mode,the printer prints the current line and sets the print position to the
beginning of the line.
In page mode, the printer sets the print position to the beginning of the line.
LF
[Name]
Print the contents in the print buffer
[Format]
ASCII LF
Hex 0A
Decimal 10
[Dscription]
Prints the data in the print buffer and feeds one line, based on the current line spacing
[Notes]
• This command sets the print position to the beginning of the line.
•When this command is processed in page mode, only the print position moves,
and the printer does not perform actual printing.
FF
[Name]
Print and feed the paper to the next page
[Format]
ASCII FF
Hex OC
Decimal 12
[Dscription]
Paper type is continuous paper
[Notes]
• This command sets the print position to the beginning of the line.
•When this command is processed in page mode, only the print position moves,
and the printer does not perform actual printing.
• In page mode, prints all the data in the print buffer collectively and switches from
page mode to standard mode.
• This command is equivalent to LF in standard mode.
• This command returns the values set by ESC W to the default values.
Paper type is marked paper :
• In page mode, prints all the data in the print buffer,not to return to standard
mode ,not clear the data in the print buffer. The printer feeds the marked paper
to the next print starting position after finished printing.Don’t change horizontal
and vertical coordinates in the print buffer.
• This command sets the print position to the beginning of the line.

PPTII-A Programming Manual
www.hprt.com
7
CR
[Name]
Print and carriage return
[Format]
ASCII CR
Hex 0D
Decimal 13
[Dscription]
When the command is allowed, it functions in the same way as LF; when it is not, the
command is ignored.
[Notes]
•Set the print position to the beginning of the line.
•Whether the command is allowed or not only up to the factory defaults.
CAN
[Name]
Cancel print data in page mode
[Format]
ASCII CAN
Hex 18
Decimal 24
[Dscription]
Delete all the print data for the current print job in page mode.
[Notes]
• This command is effective only in the page mode.
•If the regional set up previously overlaped with the current area, the overlap
will be deleted.
DLE EOT n
[Name]
Real-time status transmission
[Format]
ASCII DLE EOT n
Hex 10 04 n
Decimal 16 4 n
[Range]
1 ≤ n ≤ 4
[Dscription]
• The status is transmitted whenever the data sequence <10>H<04>H<n>(1 ≤ n ≤4) is
received.
Example:In ESC ∗m nL nH d1...dk, d1=<10>H, d2=<04>H, d3=<01>H
• Do not use this command within another command that consists of 2 or more bytes.
Example:If you attempt to transmit ESC 3 n to the printer, but DTR (DSR for the host
computer) goes to MARK before nis transmitted and then
DLE EOT 3interrupts before nis received, the code <10>H for DLE
EOT 3is processed as the code for ESC 3 <10>H.
• The printer transmits the current status. Each status item is represented by one-byte
of data.
• The printer transmits the status without confirming whether the host computer can
receive data.
• The printer executes this command upon receiving it.
• This command is executed even when the printer is offline, the receive buffer is full, or
there is an error status with a serial interface model.

PPTII-A Programming Manual
www.hprt.com
8
[Dscription]
• With a parallel interface model, this command cannot be executed when the printer is
busy. This command is executed even when the printer is offline or in error status, when
Memory Switch 1-3 is on with a parallel interface model.
• When Auto Status Back (ASB) is enabled using the GS a command, the status
transmitted by the DLE EOT command and the ASB status must be differentiated. (Refer
to Appendix C, TRANSMISSION STATUS IDENTIFICATION.)
n = 1 Printer status
Bit
0/1
HEX
Decimal
Function
0
0
00
0
Not used. Fixed to Off.
1
1
02
2
Not used. Fixed to On
2
0
00
0
Drawer kick-out connector pin 3 is LOW
1
04
4
Drawer kick-out connector pin 3 is HIGH
3
0
00
0
Reserved
1
08
8
Reserved
4
1
10
16
Not used. Fixed to On
5
0
00
0
Not waiting for online recovery
1
20
32
Waiting for online recovery
6
0
00
0
Reserved
1
40
64
Reserved
7
0
00
0
Not used. Fixed to Off
n = 2 Printer status
Bit
0/1
HEX
Decimal
Function
0
0
00
0
Not used. Fixed to Off.
1
1
02
2
Not used. Fixed to On
2
0
00
0
Cover is closed
1
04
4
Cover is open
3
0
00
0
Reserved
1
08
8
Reserved
4 1 10 16 Not used. Fixed to On
5
0
00
0
No paper-end stop
1
20
32
Reserved
6
0
00
0
No error
1
40
64
Error occurred
7
0
00
0
Not used. Fixed to Off.

PPTII-A Programming Manual
www.hprt.com
9
[Dscription]
n = 3 Printer status
Bit
0/1
HEX
Decimal
Function
0
0
00
0
Not used. Fixed to Off.
1
1
02
2
Not used. Fixed to On
2
0
00
0
Reserved
1
04
4
Reserved
3
0
00
0
Reserved
1
08
8
Reserved
4
1
10
16
Not used. Fixed to On
5
0
00
0
Reserved
1
20
32
Reserved
6
0
00
0
Reserved
1
40
64
Reserved
7
0
00
0
Not used. Fixed to Off
n = 4 Printer status
Bit
1/0
HEX
Decimal
Function
0
0
00
0
Not used. Fixed to Off.
1
1
02
2
Not used. Fixed to On
2,3
00
00
0
Reserved
11
0C
12
Reserved
4
1
10
16
Not used. Fixed to On
5,6
00
00
0
Roll paper end sensor: paper present
11
60
96
Roll paper end sensor: paper not present
7
0
00
0
Not used. Fixed to Off.
DLE ENQ n
[Name]
Real-time request to print
[Format]
ASCII DLE ENQ n
Hex 10 05 n
Decimal 16 5 n
[Range]
1 ≤ n ≤ 2
[Dscription]
In response to host device, n definition as follows:
n
Requests
1 Printer recovers from error status and go on printing interrupted
2
Printer recovers from error status clear commands receive and print the
buffer area.
[Notes]
1) This command is only effective, when marking the mistake and no paper.
2) With a serial interface model, printer executes this command once received.
3) With a parallel interface model, this command is not executed when it is busy.
4) Don’t put this command into command sequence which is with 2 Byte or more.
5) Even printer is prohibited by command ESC = (choose peripherals), this command is
effective

PPTII-A Programming Manual
www.hprt.com
10
ESC FF
[Name]
Print data in the page mode
[Format]
ASCII ESC FF
Hex 1B 0C
Decimal 27 12
[Dscription]
Print all buffered data in the printable area collectively in page mode.
[Notes]
1) This command is enable only in page mode.
2) When using label paper, when this command is executed, label location is not
executed.
3) The butter data, ESC T and ESC W set and character set are not deleted after printing.
ESC SP n
[Name]
Set character spacing
[Format]
ASCII ESC SP n
Hex 1B 20 n
Decimal 27 32 n
[Range]
0 ≤ n≤255
[Dscription]
Sets the right-side character spacing to [n×0.125mm(n×0.0049 inch)]
[Notes]
•When characters are enlarged, the character spacing is n times normal value.
• This command sets values independently in each mode (standard and page modes).
[Default]
n=0
ESC ! n
[Name]
Select print mode(s)
[Format]
ASCII ESC ! n
Hex 1B 21 n
Decimal 27 33 n
[Range]
0 ≤ n ≤ 255
[Dscription]
Selects print mode(s) using n as follows:
Bit
1/0
HEX
Decimal
Function
0
0
00
0
Character font 0 selected.
1
01
1
Character font 1 selected.
1,2
Undefined.
3
0
00
0
Emphasized mode not selected.
1
08
8
Emphasized mode selected.
4
0
00
0
Double-height mode not selected.
1
10
16
Double-height mode selected.
5
0
00
0
Double-width mode not selected.
1
20
32
Double-width mode selected.
6
Undefined.
7
0
00
0
Underline mode not selected.
1
80
128
Underline mode selected.

PPTII-A Programming Manual
www.hprt.com
11
[Notes]
• When both double-height and double-width modes are selected, quadruple-size
characters are printed.
• The printer can underline all characters, but cannot underline the space set by
HT or 90 clockwise rotated characters.
• The thickness of the underline is that selected by ESC , regardless of the character
size.
•When some characters in a line are double or more height, all the characters in the
line are aligned at the baseline.
• ESC E can also turn on or off emphasized mode. However, the setting of the last
received command is effective.
• ESC G print effect is the same with emphasized mode. However, the setting of the last
received command is effective.
• ESC can also turn on or off underline mode. However, the setting of the last
received command is effective.
• GS ! can also select character size. However, the setting of the last received command
is effective.
[Default]
n = 0
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≤nL ≤ 255
0 ≤nH≤255
[Dscription]
The distance from the beginning of the line to the print position is
[(nL + nH ×256) ×0.125 mm].
[Notes]
•Settings outside the specified printable area are ignored.
• ESC W can set horizontal starting position in page modes. However, the setting of the
last received command is effective.
ESC % n
[Name]
Select/cancel user-defined character set
[Format]
ASCII ESC % n
Hex 1B 25 n
Decimal 27 37 n
[Range]
0 ≤ n ≤255
[Dscription]
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.
[Notes]
•When the user-defined character set is canceled, the built-in character set is
automatically selected.
•n is available only for the least significant bit.
[Default]
n = 0

PPTII-A Programming Manual
www.hprt.com
12
ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]
[Name]
Define user-defined characters
[Format]
ASCII ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]
Hex 1B 26 y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]
Decimal 27 38 y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)]
[Range]
y = 3
32 ≤ c1 ≤ c2 ≤ 127
1 ≤ x ≤ 24
0 ≤ d1 ... d(y × xk) ≤ 255
[Dscription]
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.
•x specifies the number of dots in the horizontal direction.
[Notes]
•The allowable character code range is from ASCII code <20>H to <7E>H .
•It is possible to define multiple characters for consecutive character codes.
If only one character is desired, use c1 = c2.
•d is the dot data for the characters. The dot pattern is in the horizontal direction from
the left side.
•The data to define user-defined characters is (y × x) bytes.
• When x is less than 13, the user-defined character width by default into 13 points.
•Set a corresponding bit to 1 to print a dot or 0 not to print a dot.
• Can define up to 26 user-defined characters.
• The user-defined character definition is cleared when:
①ESC ? is executed.
②The power is turned off.
[Default]
The internal character set
[Example]

PPTII-A Programming Manual
www.hprt.com
13
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
0 ≤ nL ≤ 255
0 ≤ nH ≤ 3
0 ≤ d ≤255
[Dscription]
Select a bit-image mode using m, bit-image dot is decided by nL and nH.
m
Mode
Vertical Direction
Horizontal Direction
Number of
Bits for
vertical data
Dot
Density
(DPI)
Dot
Density
(DPI)
Amount of Data(k)
0
8-dot
single-density
8
67 DPI
101 DPI
nL + nH × 256
1
8-dot
double-density
8
67 DPI
203 DPI
nL + nH × 256
32
24-dot
single-density
24
203 DPI
101 DPI
( nL + nH × 256) × 3
33
24-dot
double-density
24
203 DP
203 DPI
( nL + nH × 256) × 3
[Notes]
• If the value of m out of the specified range, nL and the subsequent data will be
processed as normal one.
• The number of horizontal direction is up to nL and nH, the total number is nL + nH ×
256.
• The part which bit-image is beyond the current area will be amputated.
• d indicates the bit image data. Set a bit to 1 to print a dot, or set a bit to 0 to not print
a dot.
• After the bit-image is sent successfully, the printer will be back to the normal data
processing mode.
• If the width printing area set by GSL and GSW lee than the printing width of GS /
required by the data sent with the ESC* command, the following will be performed on
the line in question (but the printing cannot exceed the maximum printable area):
① The width of the printing area is extended to the right to accommodate the amount
of data.
② If step ¬ does not provide sufficient width for the data, the left margin is reduced to
accommodate the data. For each bit of data in single-density mode (m = 0, 32), the
printer prints two dots: for each bit of data in double-density mode (m = 1, 33), the
printer prints one dot. This must be considered in calculating the amount of data that
can be printed in one line.
• It back to the normal data processing mode after printing a bit-image.
• This command won't be influenced by other print modes (emphasized /double-strike
/underline /characters amplification /white / black reverse), except upside-down
printing mode.
• the relationship between data and the point to be print as follows:

PPTII-A Programming Manual
www.hprt.com
14
Choosing 8-dot density:
Choosing 24-dot density:
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
[Dscription]
turn underline mode on/off, n value as follows:
n Function
0, 48 underline mode is turn off
1, 49 underline mode ( one dot width) is turn on
2, 50 underline mode ( two dot width) is turn on
[Notes]
1) This command is effective for all characters (including the blank space), but not the
blank space set by HT.
2) When underline mode is on, 90°clock wise rotated characters and characters and
white / black reverse characters cannot be underline.

PPTII-A Programming Manual
www.hprt.com
15
[Notes]
3) When underline mode is off, there is no underline for following characters. Underline
width stays the same, default width: one dot width.
4) Character size change has no effects on underline width.
5) Turn underline mode on / off can be set by ESC !, the command executed at last is
effective.
[Default]
n = 0
ESC 2
[Name]
Set character line spacing for 30
[Format]
ASCII ESC 2
Hex 1B 32
Decimal 27 50
[Dscription]
Selects 3.875 mm (31* 0.125 mm) line spacing.
[Notes]
The line spacing can be set independently in standard mode and in page mode.
ESC 3 n
[Name]
Set character line spacing
[Format]
ASCII ESC 3 n
Hex 18 33 n
Decimal 27 51 n
[Range]
0 ≤ n ≤ 255
[Dscription]
Sets the line spacing to [n*0.125 mm].
[Notes]
The line spacing can be set independently in standard mode and in page mode.
[Default]
n =31.
ESC = n
[Name]
Select peripheral device
[Format]
ASCII ESC = n
Hex 1B 3D n
Decimal 27 61 n
[Range]
0≤n≤1
[Dscription]
selects the device to which the host computer sends data, based on the value of n as
follows:
Bit
1/0
Hex
Decimal
Function
0
0
00
0
Printer disabled.
1
01
1
Printer enabled
1-7
Undefined.
[Notes]
• When the printer is disabled, it ignores all received data with the exception of DLE
EOT 、DLE ENQ and ESC =.
[Default]
n=1

PPTII-A Programming Manual
www.hprt.com
16
ESC ? n
[Name]
Cancel user-defined characters
[Format]
ASCII ESC ? n
Hex 1B 3F n
Decimal 27 63 n
[Dscription]
Cancels user-defined characters.
[Notes]
This command cancels the patterns defined for the character codes specified by n. After
the user-defined characters are canceled, the corresponding patterns for the internal
characters are printed.
If a user-defined characters have not been defined, the printer ignores this command.
ESC @
[Name]
Initialize printer
[Format]
ASCII ESC @
Hex 1B 40
Decimal 27 64
[Dscription]
Clears the data in the print buffer and resets the printer mode to the mode that was in
effect when the power was turned on.
[Notes]
• The bit image has been downloaded and custom characters in RAM is not
cleared.When the printer default is label paper, the print mode is page mode after
power-on.When the printer default is continuous paper, the print mode is standard
mode after power-on.
• The macro definition is not cleared.
ESC D n1...nk NUL
[Name]
Set horizontal tab positions
[Format]
ASCII ESC D n1…nk
Hex 1B 44 n1…nk
Decimal 27 68 n1…nk
[Range] k=8,n1 to nk must be according to the order from small to large
[Dscription]
In sequence from n1 to nk as horizontal anchor point value.
[Notes]
If the value of n1 to nk are not from small to large,when back value are not big than
front, pls stop setting.
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
[Dscription]
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.
[Notes]
• Only the least significant bit of n is enabled.
• This command and ESC ! turn on and off emphasized mode in the same way. however,
that the last received command is effective.
• Emphasized mode and double-strike mode ESC G can cancel each other.However, that
the last received command is effective.
[Default]
n = 0

PPTII-A Programming Manual
www.hprt.com
17
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
[Dscription]
Turns double-strike mode on or off.
•When the LSB of n is 0, double-strike mode is turned off.
•When the LSB of n is 1, double-strike mode is turned on.
[Notes]
•Only the lowest bit of n is enabled.
•Printer output is the same in double-strike mode and in emphasized mode.
•Emphasized mode and double-strike mode ESC G can cancel each other.However, that
the last received command is effective.
[Default]
n = 0
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
[Dscription]
Prints the data in the print buffer and feeds the paper [n×0.125 mm (0.0049”)].
[Notes]
After printing is completed, this command sets the print starting position to the
beginning of the line.
•The paper feed amount set by this command does not affect the values set by ESC 2 or
ESC 3.
•The maximum paper feed amount is 900 mm. If the paper feed amount (n ×line
spacing) of more than 900 mm is specified, the printer feeds the paper only 900 mm .
ESC L
[Name]
Select page mode
[Format]
ASCII ESC L
Hex 1B 4C
Decimal 27 76
[Dscription]
Switches from standard mode to page mode.
[Notes]
This command is enabled only when processed at the beginning of a line in standard
mode.
This command has no effect in page mode.
After printing by FF is completed or by using ESC S, the printer returns to standard
mode.
This command sets the position where data is buffered to the position specified by ESC
T within the printing area defined by ESC W.
This command switches the settings for the following commands (in which the values
can be set independently in standard mode and page mode) to those for page mode:
①Set right-side character spacing: ESC SP, FS S
②Select default line spacing: ESC 2, ESC 3

PPTII-A Programming Manual
www.hprt.com
18
[Notes]
Only valve settings is possible for the following commands in page mode; these
commands are not executed.
①Turn 90 clockwise rotation mode on/off: ESC V
②Select justification: ESC a
③Turn upside-down printing mode on/off: ESC {
④Set left margin: GS L
⑤Set printable area width: GS W
The printer returns to standard mode when power is turned on, the printer is reset,
or ESC @ is used.
ESC M n
[Name]
Select character font
[Format]
ASCII ESC M n
Hex 1B 4D n
Decimal 27 77 n
[Range]
0 ≤ n ≤ 2, 48 ≤ n ≤ 50
[Dscription]
select character font
n Function
0, 48 Choose character font A ( 12 * 24 )
1, 49 Choose character font B ( 9 * 17 )
2,50 Choose character font C ( 8 * 16 )
[Notes]
1) ESC ! can set character font too, the command received at last is effective.
2) If there is such font required in dot-matrix, this command is ineffective.
ESC R n
[Name]
Select an international character set
[Format]
ASCII ESC R n
Hex 1B 52 n
Decimal 27 82 n
[Range]
0≤n≤15
n
ASCII code
n
ASCII code
0
U.S.A.
8
Japan
1
France
9
Norway
2
Germany
10
Denmark II
3
U.K.
11
Spain II
4
Denmark I
12
Latin America
5
Sweden
13
Korea
6
Italy
14
Slovenia/Croatia
7
Spain I
15
China
[Notes]
• Only character Font 0 and Font 1 has international character set. The command is
ineffective with other fonts.
[Default]
n=0

PPTII-A Programming Manual
www.hprt.com
19
ESC S
[Name]
Select standard mode
[Format]
ASCII ESC S
Hex 1B 53
Decimal 27 83
[Dscription]
Switches from page mode to standard mode.
[Notes]
1) this command is effective only in page mode.
2) Data in print buffer is cleared.
3) This command sets the print position to the beginning of the line.
4) Standard mode is selected as the default
5) This command returns the values to default value in standard mode:
a. set right-side character spacing: ESC SP, FS S
b. select line spacing: ESC 2, ESC 3
ESC T n
[Name]
Select character font
[Format]
ASCII ESC T n
Hex 1B 54 n
Decimal 27 84 n
[Range]
0 ≤ n ≤ 3, 48 ≤ n ≤ 51
[Dscription]
Set the print direction and starting position in page mode specified by n as shown
below:
n
Print Direction
Starting Position
0,48
Left to right
Upper left
(A in the figure)
1,49
Bottom to top
Lower left
(B in the figure)
2,50
Right to left
Lower right
(C in the figure)
3,51
Top to bottom
Upper right
(D in the figure)
[Notes]
1) this command is processed in standard mode, an internal flag is activated and this
command is enabled when the printer returns to page mode.
2) this command set the starting position of printing data in the printing area.
[Default]
n = 0

PPTII-A Programming Manual
www.hprt.com
20
ESC V n
[Name]
Turn 90° clockwise rotation mode on/off
[Format]
ASCII ESC V n
Hex 1B 56 n
Decimal 27 86 n
[Range]
0 ≤ n ≤ 1, 48 ≤ n ≤ 49
[Dscription] Set the print direction and starting position in page mode specified by n as shown
bellow.
n Function
0, 48 Turn 90° clockwise rotation mode off
1, 49 Turn 90° clockwise rotation mode on
[Notes] 1) This command is effective only in standard mode.
2) When choosing underline mode, underline cannot clockwise 90 degrees.
3) When 90°clockwise rotation mode is on, the direction of double height and double
width reverse to that in normal mode (90°clockwise rotation mode is off).
[Default] n=0
ESC W xL xH yL yH dxL dxH dyL dyH
[Name]
Set printing area in page mode
[Format]
ASCII ESC W xL xH yL yH dxL dxH dyL dyH
Hex 1B 57 xL xH yL yH dxL dxH dyL dyH
Decimal 27 87 xL xH yL yH dxL dxH dyL dyH
[Range]
0 ≤ xL, xH, yL, yH, dxL, dxH, dyL, dyH ≤ 255
(except for dxL= dxH=0 or dyL= dyH=0)
[Dscription]
Set the size and position of the printing area in page mode as follows:
Horizontal starting position: x0= [( xL + xH × 256) × 0.125mm]
Vertical starting position: y0 = [( yL + yH × 256) × 0.125mm]
Printing area width: dx = [ (dxL + dxH × 256) ×0.125mm]
Printing area height: dy = [ (dyL + dyH × 256) ×0.125mm]
[Notes]
•This command is processed in standard mode to set an activated internal flag so that
don't influence printing.
• The printer stop processing this command once horizontal starting position or vertical
starting position ran out of the printing area, the subsequent data are processed as
normal one.
• The printer stop processing this command once printing area width or height was set
to 0, the subsequent data are processed as normal one.
• This command confirms the current printing position with command ESC T.
•The default set of printing area width is horizontal printable width - horizontal starting
position if the value of horizontal starting position + printing area width was beyond
printable area.
• The default set of printing area height is vertical printable height - vertical starting
position if the value of vertical starting position + printing area height was beyond
printable area.
• The default settings of the horizontal and vertical motion units are 0.125mm.
•Assuming horizontal starting position, vertical starting position, printing area width
and printing area height X, Y, Dx, Dy, set the printing area as shown below:
Table of contents
Other HPRT Printer manuals