07/13/1998
This list has been compiled from a variety of sources by Colin Bryant (bryant@interchg.ubc.ca). Thanks to those who have added to the list or told Colin where to find codes.
Colin is always interested in how people apply the list. Please let him know what software you use the codes with. If you learn any more codes, please let him know what they are so that he can continue to pass them on. It is all North American market information, unless otherwise stated. While the codes are all ESC/P2, many will also work with the older ESC/P printers.
Link to Epson's on line ESC/P2 manual in PDF format from Epson's UK site.
Link to an online ESC/P2 manual in PDF format from what appears to be a personal site in Korea.
(Colin's words below)
My experience with sending printer command codes is with
Paradox for DOS (a relational database). When designing a report, I create
a calculated field and enter the Esc sequence within quotes. The quotes
indicate that it's a string to be passed on, rather than a command for
Paradox. "Esc" tells the printer that all characters before the next space
are part of a printer command. It seems to be necessary to convert the
"Esc" to ASCII but optional to convert the rest of the command. The "\027"
is simply the ASCII equivalent
of "Esc".
I've picked some examples from a report;
"\027x0\015" puts my ESC600 into compressed mode (17 char. per inch)
"\027w\001" turns expanded mode on (large characters)
"\027w\000" turns expanded mode off (back to 10 char per inch)
blue = from the Paradox for DOS manual for LQ1500 (dot matrix)
navy = from the Epson's escp2.txt file
fuchsia = from ESCODE.TXT, was pulled from the Epson bbs.
purple
= from Peter Curran's MX100 (dot matrix) manual
















n = 1 Select Bin 1 n = 2 Select Bin 2 n = 4 Enable CSF n = R Eject Sheet 





























n/216inch 



n/72inch 

















To determine the values for n1 and n2 perform the following steps. 1. Determine the desired page length in inches. 2. Multiply the page length by 360. 3. Divide the result by 256 using long division. 4. The remainder in the quotient from step 3 is the value for n1. 5. The whole number in the quotient from step 3 is the value for n2. EXAMPLE 1. The page length is 8.5 inches. 2. 8.5 x 360 = 3060 3. 3060 divided by 256 = 11 with a remainder of 244. 4. n1=244 5. n2=11 

















































To determine the values for n1 and n2 perform the following steps. 1. Determine the desired vertical distance from the Top of Form in inches. 2. Multiply the distance by 360. 3. Divide the result by 256 using long division. 4. The remainder in the quotient from step 3 is the value for n1. 5. The whole number in the quotient from step 3 is the value for n2. EXAMPLE 1. The desired distance from the Top of Form is 1 inch. 2. 1 x 360 = 360 3. 360 divided by 256 = 1 with a remainder of 104. 4. n1=104 5. n2=1 



















































immediate n/180 feed 



reverse feed n/180 





n = 1 San Serif n = 2 Courier n = 3 Prestige n = 4 Script n = 5 OcrB n = 6 OcrA n = 7 Orator (only with multfont module) n = 8 Orator (only with multfont module) 





10 12 15 17 20 
80 96 120 137 use 10 condensed 160 use 12 condensed 











































n = 1 Elite n = 2 Proportional n = 4 Condensed n = 8 Emphasized n = 16 Double Strike n = 32 Double Wide n = 64 Italic n = 128 Underline 





























































n2 Must be 0 m Must be 1 d1 = 1 Underscore d1 = 2 StrikeThrough d1 = 3 Overscore d2 = 0 Cancel selected score d2 = 1 Single line continuous d2 = 2 Double Line continuous d2 = 5 Single Line broken d2 = 6 Double Line broken 



n = 1 Outline n = 2 Shadow n = 3 Outline & Shadow 























n = 1 centering n = 2 flush right n = 3 justified 



0 Italic 1 Graphic set/PC437 (US) 2 Userdefined Characters (remap to 80hFFh) 3 PC437 (US) 





0 Italic 1 PC437 (US) 2 Userdefined Characters 3 PC437 (US) 
0 Italic 1 PC437 (US) 3 PC850 (International) 7 PC860 (Portugal) 8 PC863 (Canada  French) 9 PC865 (Norway) 





n = 1 France n = 2 Germany n = 3 United Kingdom n = 4 Denmark I n = 5 Sweden n = 6 Italy n = 7 Spain n = 8 Japan n = 9 Norway n = 10 Denmark II n = 11 Spain II n = 12 Latin America n = 13 Korea n = 64 Legal 











> 1 = Sans Serif font > 2 = Courier 


expanding the printable character set. 







To determine the values for n1 and n2 perform the following steps. 1. Determine how many ASCII codes will be sent sequentially immediately following n1 and n2. 2. Using long division, divide the quantity of ASCII codes that will be sent sequentially immediately following n1 and n2 by 255. 3. The remainder in the quotient is the value for n1. 4. The whole number in the quotient is the value for n2. EXAMPLE






m = 0 = 60 DPI m = 1 = 120 DPI m = 2 = 120 DPI Hi Spd m = 3 = 240 DPI m = 4 = 80 DPI m = 5 = 72 DPI m = 6 = 90 DPI m = 7 = 144 DPI 24Pin Graphics: m = 32 = 60 DPI m = 33 = 120 DPI m = 38 = 90 DPI m = 39 = 180 DPI m = 40 = 360 DPI 





























































n = 1 Red (Magenta) n = 2 Blue (Cyan) n = 3 Violet n = 4 Yellow n = 5 Orange n = 6 Green 








