COMMAND | ASCII | HEX | DECIMAL |
intialize printer | ESC @ | 1B 40 | 27 64 |
select condensed | ESC SI | 1B 0F | 27 15 |
cancel condensed | DC2 | 12 | 18 |
select italic | ESC 4 | 1B 34 | 27 52 |
cancel italic | ESC 5 | 1B 35 | 27 53 |
select bold | ESC E | 1B 45 | 27 60 |
cancel bold | ESC F | 1B 46 | 27 70 |
select 10 CPI | ESC P | 1B 50 | 27 80 |
select 12 CPI | ESC M | 1B 4D | 27 77 |
select 15 CPI | ESC g | 1B 67 | 27 103 |
form feed | FF | 0C | 12 |
1 select colour | ESC r n | 1B 72 n | 27 114 n |
2 set bottom margin | ESC N n | 1B 4E n | 27 78 n |
cancel bottom margin | ESC O | 1B 4F | 27 79 |
3 set right margin | ESC Q n | 1B 51 n | 27 81 n |
4 set left margin | ESC 1 n | 1B 6C n | 27 108 n |
5 select point size | ESC X nl nh | 1B 58 nl nh | 27 88 nl nh |
1 where n is in the range 0-6 ,0 black ,1 magenta , 2 cyan , 3 violet , 4 yellow , 5 red , 6 green ( only applies to colour printers !) |
2 where n is in the range 0-127 |
3 where n is in the range 0-255 |
4 where n is in the range 0-255 |
5 m = 0 no change in pitch , m=1 selects proportional spacing , m>5 selects fixed pitch equal to 360/m CPI . Point size = (( nh*256)+nl)/2 |
E.g. using QBASIC type ''LPRINT CHRS$(27);CHR$(88);CHR$(1);CHR$(0.2);" following this command the ptinter will print in point size 26 |
1 point equals 1/72 inch |
please note the Stylus color 300, stylus color 400, stylus color 640 , stylus photo EX , stylus photo 750 , stylus photo 1200 , and the stlus photo 700 are not ESC/P2 compliant and hence the above commands wil NOT work |