HP PCL/PJL reference (PCL 5 Color) - Technical Reference Manual

B-10 Using Color Modes (Color LaserJet, 5, 5M, DeskJet) EN
Example:
MODE 1: INDEXED BY PIXEL
In mode 1, each pixel in a row is fully specified before any bits are
sent for the next pixel. The bits for each pixel form a palette index
number. Assuming 4 bits per index, the underlined block below is the
palette index for pixel 2 of row 1 (i1 is lsb).
?*v6W 00 00 03 08 08 08 # Binary data for CID represented in
hex. Sets color space to RGB, pixel
encoding mode to 0, palette size to 8
(3 planes), last 3 bytes ignored.
?*r1A # Start raster.
?*b1V10110000 . . . # Transfer plane 1 (the first bit for
each pixel in the first row).
Combining each bit with its
corresponding bit in the other planes
forms the palette index number for
that pixel.
?*b1V01110000 . . . # Transfer plane 2 (the second bit for
each pixel in the row).
?*b1W10101000 . . . # Transfer plane 3 (the third bit for
each pixel in the row) and move to
the next row. Note that the
?*b#W
command is used to send the last
plane of each row.
?*b#W row 1 i4 i3 i2 i1 i4 i3 i2 i1 . . .
?*b#W row 2 i4 i3 i2 i1 i4 i3 i2 i1 . . .
?*b#W row 3 i4 i3 i2 i1 i4 i3 i2 i1 . . .