HP (Hewlett-Packard) PCL 5 Printer User Manual


 
Draw first raster image
Position the cursor 1 inch
from the left margin and 1
inch below top margin
?*p300x300Y
Start raster graphics with
the current x position as
the left graphics margin.
?*r1A
Specify mode 0 compression
(no compression)
?*b0M
Transfer raster data by row
with 4200 bytes/row (3
bytes/pixel * 1400 pix-
els/row=4200 bytes/row)
?*b4200W
(This section is shown in C code to show how Raster data is formatted.)
for (i=0;i<200;i++) /* Red block */
fprintf(prn, “%c%c%c”,255,0,0)
for (i=0;i<200;i++) /* Green block */
fprintf(prn, “%c%c%c”,0,255,0)
for (i=0;i<200;i++) /* Blue block */
fprintf(prn, “%c%c%c”,0,0,255)
for (i=0;i<200;i++) /* Send 4 more blocks of color*/
fprintf(prn, “%c%c%c”,216,218,50)
for (i=0;i<200;i++)
fprintf(prn, “%c%c%c”,249,120,15)
for (i=0;i<200;i++)
fprintf(prn, “%c%c%c”,158,81,200)
for (i=0;i<200;i++)
fprintf(prn, “%c%c%c”,45,120,249)
Switch to mode 3 compres-
sion (delta row encoded)
and send the remaining
rows, which are identical
?*b3M
(Repeat the following command 200 times, which repeats the previous row each time)
Repeat the previous row ?*b0W
Send End Raster Graphics
command
?*rC
Raster Graphics 6-47Raster Graphics 6-47