ESC/P

ESC / P ( Epson Standard Code for Printers ) is a technology developed by Seiko Epson command language for controlling printers. In the era of dot matrix printers easily in some cases an altered form was also used by other manufacturers (eg NEC).

The name derives for ESC / P is the introduction of escape sequences with the character ESC (escape = hexadecimal 1B or decimal 27) of the ASCII character set. For example, switching from Bold with ESC E and the off bold font with ESC F occurs (this is case-sensitive, because with ESC e a tabulator is defined, for example ).

Example: Graphic print with a nine - pin printers

This command k columns of raster graphics are printed. The escape character has the ASCII code 27 and the asterisk code 42

Bytes m is the resolution in the horizontal direction, for example is 5 to 72 dpi or 240 dpi for 3. The resolution in the vertical direction here is always 72 ​​dpi and results from the needle gauge.

For each column is a byte d to send the coded bit by bit to the beating needles. Bit 7 stands for the top needle. The lowermost (ninth ) needle is not used.

To make sense to print graphics, it still requires two additional commands: carriage return (CR = 0x0d and 13 respectively) and paper feed to n/216 inch ( ESC J n ). To directly print the next below the printed line, is here to work for n 24. However, the value for n is 8 is used, the feed rate is 8/3 of the needle spacing. In this way, can be printed at three times the vertical resolution, ie 216 dpi. The expression then takes but also three times as long.

To print the sample graph shown here is the following information that is needed to send to the printer:

316229
de