Using Line Printer Mode; Overview Of Line Printer Mode; Line Printer Commands - Oneil microFlash2 Programming Reference Manual

Table of Contents

Advertisement

Using Line Printer Mode

Overview
Line printer mode is the simplest protocol supported by the 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). For more
information on fonts, refer to the O'Neil Portable Printers Fonts Guide.
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. So 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. But 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.
Note: This chapter assumes a basic knowledge of computer programming and is
designed to be used by programmers, software engineers, and technicians.

Line Printer Commands

The following table lists Line Printer commands:
Command
Description
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
ESC V n1 n2 Bit-mapped graphics mode select
ESC B
Begins acceptance of compressed graphics
ESC E
Ends acceptance of compressed graphics
SO
Sets double wide print
SI
Condensed print
FF
Form feed
LF
Line feed
CR
Carriage return
ESC w n
Font select. The range for n is 21-26 hex.
ESC @
Resets the printer
O'Neil Programming Language Reference Manual
2
Page
9
9
9
10
11
11
11
11
12
12
12
12
12
8

Advertisement

Table of Contents
loading

Related Products for Oneil microFlash2

Table of Contents