Printing Basic Bar Codes
Bar Code Sequences
To print bar codes, the following sequences are used in bar code mode:
BAR CODE SEQUENCE | FUNCTION |
BEL | Sound the Bell. |
ESC ESC n | Change Emulation Mode |
ETX | ETX/ACK Software Handshake. |
FF | Form Feed. |
LF | Fractional Line Feed (to next line boundary) |
^BNxccc...c^G | Horizontal Bar Code. |
^BN9xddddccc...c^G | Variable Width Horizontal Bar Code. |
^Htt | Bar Code Height. |
^Jttd | Relative Vertical Tab. |
^Ttttd | Absolute Horizontal Tab. |
^- | Bar Code Pass Terminator. |
These bar code sequences are described in detail in the following sections.
Measurements in Bar Code Mode
All measurements in bar code mode are specified in tenths of an inch and/or dots.
Bar codes are printed with a graphics resolution of 144 dots per inch both horizontally and vertically.
All references to tenths of an inch are in actuality 14/144's of an inch.
All references to dots are in actuality 1/144's of an inch. The range of dots that may be specified is 0 to
15.This range is represented using hexadecimal convention. The ASCII characters '0' to '9' represent
0to 9 dots, respectively. The ASCII characters 'A' to 'F', and 'a' to 'f', represent 10 to 15 dots, respectively.
Entering/Exiting Bar Code Mode
Bar code mode is entered by sending the escape sequence: ESC ESC ETX (27 27 03 decimal, 1B 1B 03 hex).
Bar code mode is used only to process the bar code sequences described in this document. While in bar code mode, other printable text, text mode escape sequences and control characters, graphics data, and graphics mode escape sequences and control characters should not be sent to the printer.
To exit bar code mode, use the sequence ESC ESC ? (27 27 63 decimal, 1B 1B 3F hex) to return to the previously selected emulation mode, or you may use a different ESC ESC n sequence to select a different emulation mode.
123