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

EN DI, Absolute Direction 23-33
When using either method, at least one parameter must not be zero.
The ratio of one parameter to the other is more important than the
actual numbers. The following table lists three common label angles
produced by using 1’s and 0s.
The relative size and sign of the two parameters determine the
amount of rotation. If you imagine the current pen location to be the
origin of a coordinate system for the label, you can see that the signs
of the parameters determine which quadrant the label is in.
Table 23-13
DI Command Label Direction
DI 1,0 horizontal
DI 0,1 vertical
DI 1,1 or DI 0.7,0.7
(or any parameters equal to each other)
45° angle
Table 23-14 Example: Using the DI Command
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; Enter absolute plotting mode and move to
(3500,2500).
DT*; Define (*) as the label terminator.
DI1,1;LB
DIRECTIONCR*;
Print the word “DIRECTION” in the first
quadrant and send a Carriage Return to return
the pen to the Carriage Return point
(3500,2500).
DI1,-1;LB
DIRECTIONCR*;
Print the same word in the fourth quadrant and
return the carriage to the Carriage Return
point.