HP PCL/PJL reference (PCL 5 Printer Language) - Technical Reference Manual Part II

EN DI, Absolute Direction 23-35
Table 23-15 Example: Another DI Example
E
C
E Reset the printer.
E
C
%0B Enter HP-GL/2 mode.
IN; Initialize HP-GL/2 mode.
SP1; Select pen number 1. Even though there is
no physical pen, the SP command must be
used to enable printing.
PA3500,2500; Specify absolute plotting and move to
(3500,2500).
DT#,1; Define the “#” character as the label
terminator.
DI0,1;LB__1990#; Set the label direction to print at 90° and
print “__1990”.
DI1,1;LB__1991#; Set the label direction to 45° and print
“__1991”.
DI1,0;LB__1992#; Set the label direction to 0° and print
“__1992”;
DI,.71,-.71;
LB1993#;
Change the label direction using the cosine
and sine of 315° and print “__1993”.
DI,0,-1;LB__1994
CR#;
Change the label direction using the cosine
and sine of 270° and print “__1994”;
Carriage Return.
DI,-.71,-.71;
LB__1995
CR#;
Set the label direction using the cosine and
sine of 270° and print “__1995”; Carriage
Return.
DI,-1,0;LB__1996
CR#;
Set the label direction using the cosine and
sine of -180° and print “__1996”; Carriage
Return.
E
C
%0A Enter the PCL mode.
E
C
E Send a reset to end the job and eject the
page.