Using line printer mode, Overview, Line printer commands – Datamax-O'Neil microFlash 2te Quick Reference Programming Guide User Manual
Page 7
3
Using Line Printer
Mode
Overview
Line printer mode is the simplest protocol supported by the Datamax-O’Neil thermal printers.
Using Line Printer mode, you can send a line of text as a sequence of characters to the
printer followed by a carriage return (0x0D), and/or a line feed (0x0A), or a form feed (0x0C)
and the printer prints that line of text. Commands can be used to change the way the
printout looks and to select different fonts (fonts are available as the common IBM PC Code
Page 437 mapping as well as many other mappings and international character sets).
Commands are usually either a single non-printable character, or a sequence of characters
beginning with a non printable character such as ESCape (0x1b). Although these commands
can be placed anywhere in the text, they will usually take effect exactly where they are
placed. Therefore, you must be careful to place them where you want the effect to take
place. For example, to change fonts you send ESC w n, where 'n' is the single character name
of the font (seen AN-3 or AN-12). If you do this at the beginning of the line, it will affect the
entire line. However, if you place this in the center of a line, it will affect only those
characters that come after. If you place this at the end of the line, it will have no effect on
that line at all, but will affect the next line.
Use Line Printer mode to print receipts and labels with text and simple, bitmap, graphics that
do not need to be stored. You can also use Line Printer mode to insert signatures.
Line Printer Commands
The following table contains the available Line Printer commands:
Note: This chapter assumes a basic knowledge of computer programming and is
designed to be used by programmers, software engineers, and technicians.
Command
Description
Page
ESC C n
Sets form length. Range for n is 1-255.
ESC A n
Sets interline spacing; n=0 (default).
CAN
Cancels buffer line
4
ESC V n1 n2 Bit-mapped graphics mode select
5
ESC Q n1n2 Permits different height characters across a single
line.
ESC B
Begins acceptance of compressed graphics
6
ESC E
Ends acceptance of compressed graphics
6
SO
Sets double wide print
6
SI
Condensed print
6
FF
Form feed
7
LF
Line feed
7
CR
Carriage return
7
ESC w n
Font select. The range for n is 21-26 hex.
7