HP deskjet 600 User Manual

Page of 124
Programming Hints
HP DeskJet 600, 700, 800, 900 & HP 2000 Series PCL Developer’s Guide
23
9.0.4
Priority of Commands
There are no finite rules when it comes to structuring your overall program.  In general, start by
setting the print environment with the printer control commands, such as Reset, Selecting the
Media Source, and so on. 
It is almost always advisable to start and end your program with the reset command (Esc E).
This clears the printer environment and places your program back to the default settings.  An
exception to this general rule is when the printer settings are intended to carry across a multi-
component print job.
Where specified in this manual, pay close attention to the order of commands.  For example,
raster graphics commands should be sent to the printer in the following order:
4
4
End Raster Graphics
4
4
Raster Graphics Resolution
4
4
Raster Graphics Width
4
4
Raster Graphics Compression Method
4
4
Start Raster Graphics
4
4
Transfer Raster Graphics Row(s) with or without Relative Vertical Pixel Movement
4
4
End Raster Graphics
9.0.5
Time Savers
The following list provides some helpful hints to make your program more efficient:
4
4
You do not need to specify leading and trailing zeroes.  The HP DeskJet 600/800/900 & 
HP 2000 Series printers will compensate if you do not include zeros that occur at the end 
of an escape sequence.  For example, if you want to specify 10 pitch during a font selec-
tion sequence, simply specify 10, rather than 0010.00.
4
4
Group printer control commands at the beginning of a print job.  If a number of consecu-
tive pages within a job have the same format (such as margins, HMI, VMI, etc.), the asso-
ciated page formatting commands only need to be set once for that group of pages.
4
4
Combine escape sequences where possible.  Shortening commands improves through-
put.  For example, instead of sending the Page Length command (Esc & 
l # P) and the 
Top Margin command (Esc & 
l # E) separately, send them as one parameterized escape 
sequence (Esc & 
l # p # E).  Follow the guidelines for parameterized escape sequences, 
which are described earlier in this chapter.
4
4
Minimize escape sequences where possible.  For example, if you wish to move the cursor 
two inches down the page, use one cursor movement command, rather than move the 
cursor by decipoints or dots a number of times.  
4
4
You do not need to send a request to load paper.  However, you do need to specify enve-
lope size and send a Media Source command to load envelopes.
4
4
Avoid using tabs to move the cursor across the page.  Using tabs may make you depen-
dent upon the current font pitch.  Instead, use cursor positioning commands.