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

EN UL, User-Defined Line Type 22-45
The following example demonstrates redefining and printing a line
type.
Figure 22-24
Table 22-24 Example: Using the UL Command
?E Reset the printer.
?%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.
PA4000,3000; Specify absolute plotting and move to
(4000,3000).
UL8,0,15,0,15,
0,15,40,15;
Redefine the user-defined line type with an
index number of 8; specify the lines and spaces
as follows, in percentages of the line distance:
gap1 as a dot (0%), gap2 as a space (15%),
gap3 as another dot (0%), gap4 as a space
(15%), gap5 as another dot (0%), gap6 as a
space (15%), gap7 as a line (40%), and gap8
as a space (15%).
LT8,10;PU2000,
2500;PD5000,
2500;
Specify line type number 8 (just defined), with a
pattern length of 10% of the distance between
P1 and P2 (in this case, the lower-left and
upper-right corners of the default PCL Picture
Frame); lift the pen and move to (2000,2500);
set the pen down and draw to (5000,2500).
?%0A Enter the PCL mode.
?E Send a reset to end the job and eject the page.