Chapter 14: Epson - Standard Functions
Additional ESC/P2 commands
ESC/P2 commands extend the scope of functions of the Epson emulation in the area of scalable fonts.
Setting step size and character spacing
Function Dec.
Hex.
ASCII
Set horizontal basic step size (HMI)
27 99
Lp Hp
Lp = 0 to 255
1B 63
Lp Hp
Hp = 0 to 255 (MSB ignored)
ESC c
Lp Hp
With this command is defined the basic step size, i.e. the spacing between two characters of a character set.
The parameters Lp and Hp specify the basic step size in accordance with the following formulae:
Hp = integer (basic step size / 256)
Lp = basic step size - (Hn * 256)
HMI = (Lp + Hp * 256) / 360
If the parameters Lp and Hp = 0 are set, this command is ignored and the previously fixed basic step size remains valid. If the basic step size (Lp + Hp * 256) / 360 > 3 inches is set, it is fixed at 36 / 360
= 1/10 inch.
If the basic step size goes over the right margin, the printing is continued at the left margin of the next line. This command is also immediately valid within a line. The character spacing last set is the current one. The basic step size set with this command is overwritten by commands for setting character pitch and for selecting the font by means of character pitch and point size, if these commands are used after defining the basic step size.
The following commands use the basic step size defined with this command:
ESC I Pn, ESC Q Pn: Set left and right margin
ESC D: Setting of horizontal tabs
BS: Backspace
Setting the basic spacing
The basic step size is not valid for bit image graphics and bar codes.
14-27
Chapter 14: Epson - Standard Function
The set basic step size is deleted by the command for setting the character separation and the previously selected character pitch becomes valid again. A set character separation is in turn deleted by setting the basic step size.
If underlining is set, this is performed if this command is used.
The lamp display on the control panel is not altered by this command.
The commands for double-width font and for double-width font for one line and also the commands for condensed font are deleted by this command.
The basic step size is reset by the following commands and printed with the previously selected or newly set character pitch:
ESC P, ESC M, ESC g: commands for setting the character pitch,
SI, ESC SI: condensed font,
ESC W Pn: double-width font,
SO, ESC SO: double-width font for one line,
ESC w Pn, ESC US Pn: double-height font,
ESC p Pn: proportional font,
(the character pitch set in the menu is valid)
ESC x Pn Hp Lp: font defining by character pitch and point size
If the printer menu is called, the defined basic step size is deleted.
If the printer is reset by means of hardware, software or the control panel, the defined basic step size is deleted and the character pitch selected in the menu is valid.
14-28
Chapter 14: Epson - Standard Functions
Function Dec.
Hex.
ASCII
Setting of page length in basic step sizes
27 40 67
Ln Hn
Lp Hp
1B 28 43
Ln Hn
Lp Hp
Ln = 0 to 255
Hn = 0 to 255 (MSB ignored)
Lp = 0 to 255
Hp = 0 to 255 (MSB ignored)
ESC (C
Ln Hn
Lp Hp
This command defines the page length of the currently selected paper path. The parameters Ln and Hn specify the number of parameters following this:
Hn = integer (number of characters / 256)
Ln = number of characters - (Hn * 256)
For this command, Hn = 0 and Ln = 2 must be set. With Ln + Hn *
256 < 2, this command is ignored. With Ln + Hn * 256 > 2, all Ln +
Hn * 256 data following Lp, Hp are ignored.
The parameters Lp and Hp define the page length in whole multiples of the current basic step size:
Hp = integer (page length in basic step sizes / 256)
Lp = page length in basic step sizes - (Hp * 256)
Valid values for the basic step size are: 1/360, 1/180, 1/120, 1/90,
1/72 and 1/60 inch.
All page lengths in the range 1/360 inch to 22 inches are valid. If, in this command, values of Lp = Hp = 0 or Lp + Hp * 256 > 22 inches are used, this command is ignored and the previously set page length is retained.
This command is immediately valid in the current print line and the current print position becomes the top of page position. Where single cut sheets are being fed, the current print position does not become the top of page position if the menu item Page Length Con-
trol
is set to the value by Menu Setting.
This command resets the perforation skip and the top and bottom non-printable margins. A previously selected top non-printable area is, however, taken into account from the next page on unless the top and bottom non-printable areas are re-defined immediately after this command.
Set page length in basic step sizes
14-29
Chapter 14: Epson - Standard Function
Horizontal and vertical basic step size
A set-up vertical format unit and set vertical tabs are not reset by this command.
A defined page length is not affected if the basic step size is changed later on.
If the printer is reset, the page length in the initial setting becomes valid again.
Function Dec.
Hex.
ASCII
Setting of horizontal 27 40 85 1B 28 55 ESC (U and vertical basic step size Ln Hn Pn Ln Hn Pn Ln Hn Pn
Ln = 0 to 255
Hn = 0 to 255 (MSB ignored)
Pn = 0 to 255 (MSB ignored)
With this command, the basic step sizes for the horizontal and vertical direction can be defined.
The parameters Ln and Hn specify the number of parameters which follow:
Hn = integer (number of characters / 256)
Ln = number of characters - (Hn * 256)
For this command, Hn = 0 and Ln = 1 must be set. With Ln = Hn = 0, this command is ignored. With Ln+Hn*256>1, all Ln+Hn*256-1 data following Pn are ignored. The parameter Pn specifies the basic step size = Pn/360 inch. The following table gives the possible values:
Value of Pn
0 0
≤
Pn
≤
0 9
10
≤
Pn
≤
19
20
≤
Pn
≤
29
30
≤
Pn
≤
39
40
≤
Pn
≤
49
50
≤
Pn
≤
59
60
≤
Pn
≤
69
70
≤
Pn
≤
127
Defined basic step size
no change
1/360 inch
1/180 inch
1/120 inch
1/90 inch
1/72 inch
1/60 inch no change
14-30