Commands
See Also
ESC *
Expression
ASCII ESC @
Decimal 27 64
Hex 1B 40
Parameters
None
ETB Raster Mode Compressed Graphics
Description
Provided for LabelWriter printer raster compatibility.
The ETB command is a synchronization character used to encode compressed raster
bitmap print data. Print data is encoded in strings of 8-bit bytes preceded by a singe
ETB (Hex 17) character. The control electronics in the printer do not check the validity
of the bitmap data.
Data compression is done through a form of run-length encoding. Bit seven (the sign
bit) of a compressed character represents the value to be printed:
0 = white space, 1 = a printed pixel. Bits 6 through 0 represent the number of
consecutive bits of the selected value plus 1.
Examples:
00 = 1 white pixel
80 = 1 printed pixel
0F = 16 white pixels
FF = 128 printed pixels
The data sent to the LabelWriter printer is handled on a line-by-line basis, so
compressed lines may be intermixed with normal lines. In addition, the compressed
mode also uses the set bytes per line command (ESC D) to determine how much data
from the host to expect for each line. However, the sum of the pixels must be equal to
the bytes per line variable (ESC D, default on the LabelWriter SE450 printer is 56)
multiplied by 8. No error checking is done on the incoming data and unexpected results
will occur if this caution is not observed.
Below is a sample compressed line for a ESC D 24 setting:
17 OF 8F 20 A0 20 A0 0F 8F
which would translate to:
16 white pixels
16 printed pixels
32 white pixels
32 printed pixels
32 white pixels
31