This document describes how to print PCL (HP's Printer Command Language) fonts to PCL level 5 compatible printer. Our PCL fonts can be used on any operating system that can send files to a PCL 5 compatible printer in binary mode. In MS DOS this is performed by using the COPY command with the /B switch.
The last number in the font is the point size of the font. When using 12 or 14 point PCL fonts, an adjustment to the vertical motion index is not usually necessary. However, if you are using other sizes, you may need to adjust it to close the gap between rows. To set the vertical motion index, issue the command before printing with the Data Matrix font. The code for the vertical motion index Command is escape "<Ec>" + "&" + lowercase L "l" + Number Index + Capital "C". Use the chart below below to find the command for your font size. The number may be adjusted as necessary for your printer.
PCL Font Point Size | Vertical Motion Index Command to Use |
10 | <Ec> &l6.5C |
8 | <Ec> &l5.2C |
6 | <Ec> &l3.9C |
In the examples, the Ec represents the escape character for your software. In DOS Edit, Ec is represented by holding down the CTRL key and pressing the letter P, Releasing both keys and then press the ESC key.
To download a font to your printer and assign it an ID number of 70 you would send the following commands to the printer:
<Ec>*c70D (tells the printer it will receive a soft font and to assign it an id of 70) Copy the font file to the printer <Ec>*c70D (tells the printer it is finished receiving a soft font with an id of 70) <Ec>*c5F (tells the printer to make this a permanent font)
Next, to select this font we now need to send the following command to the printer: <Esc>(70X
After this command is sent, the characters of the font may be sent to create output.
With this example, we have created test files for you to do this from DOS using the font. To perform the commands above do the following at the DOS prompt in the directory where you copied the PCL fonts to. NOTE: this example assumes you have a PCL printer attached to LPT1 port of a PC.
COPY /B D1 LPT1
COPY /B DMat8.sfp LPT1
COPY /B D1 LPT1
COPY /B D2 LPT1
COPY /B PCLTEST LPT1
PCLTEST contains the string that will produce a proper Data Matrix barcode. This MUST be generated with our Data Matrix Font Encoder.
After you perform these binary copies to the printer, your printer should print out a sample of the font. View the files L1, L2 and PCLTEST with a standard text editor to view the commands in the files.
PCL defines a standard set of commands enabling programs to communicate with PCL or PCL compatible printers. If you need further information about PCL commands, you may want to obtain the Technical Reference Manual set, part number 5021-0377. Order the manual set from HP's Support Materials Organization.