HP (Hewlett-Packard) 900 Printer User Manual


 
HP PCL Commands
78 HP DeskJet 600, 700, 800, 900 & HP 2000 Series PCL Developer’s Guide
Method 1 requires byte pairs: a Transfer Raster (Esc * b # V or Esc * b # W) command
with an odd value field is ignored and the data discarded.
Method 2 - Tagged Image File Format Encoding (TIFF revision 4)
Method 2 (“packbit” encoding) combines methods 0 and 1, with blocks of repeated bytes and
blocks of literal (unencoded) bytes. A control byte precedes the raster data; it indicates the
number of succeeding bytes, and whether they are repeated or literal.
The control byte is in 2’s complement format. If bit 7 is set (byte = -1 to -127), the following
bytes are repeated. The control byte’s absolute value is the number of repetitions (occur-
rences = repetitions + 1). For example, a control byte of -5 means the subsequent byte is
repeated 5 times (6 occurrences).
If bit 7 of the control byte is zero (byte = 0 to 127), the following bytes are literal. The number
of succeeding data bytes is 1 + the value of the control byte. A control byte of 0 means 1 literal
byte follows; a control byte of 6 means 7 literal bytes follow.
A control byte of -128 is ignored; the next byte is then treated as a control byte.
It is more efficient to code two consecutive identical bytes as a repeated byte, unless these
bytes are preceded and followed by literal bytes. Three-byte repeats should always be
encoded as replicate runs.
The row length indicated by the Transfer Raster commands (Esc * b # V, Esc * b # W)
has precedence if it is met before the literal run count.
EXAMPLES OF METHODS 0 - 2:
The following examples show how methods 0 - 2 can be used to send the raster row below:
Byte Number #1 #2 #3 #4 #5 #6 #7
Bits 01010101. 01010101. 01010101. 01010101. 01000001. 01010100. 01010100
ASCII U U U U A T T
Compression method 0 - Unencoded
Esc*r1 A
Esc*b0m7WUUUUATT
Esc*rC
!
!