HP PCL Barcode Font Installation & Printing

< Back
You are here:
Print

HP PCL Barcode Font Installation & Printing

Solution(s):

This document describes issues and solutions related to HP PCL (HP’s Printer Command Language) fonts and their use with PCL compatible printers which have an internal PCL Rasterizer. PCL fonts can be used on any operating system that can send files to a PCL compatible printer in binary mode. IDAutomation’s PCL fonts are PCL level 5 bitmap fonts which offer compatibility with several different printer manufacturers.

PCL Font Printing Example:

The example provided in this tutorial is only one method of printing with PCL fonts. This example is provided to test IDAutomation’s PCL fonts to ensure they are compatible with the intended printer. Developer support may be needed in the final solution to automate similar commands that copy escape sequences and fonts to the printer as a single chunk of data.

In the example below, the Esc represents the ASCII 27 Escape Character.

To download a font to the printer and assign it an ID number of 70, send the following commands to the printer:

  1. <Esc>*c70D tells the printer it will receive a soft font and to assign it an id of 70 (provided in file c70D.txt)
  2. Copy the font file to the printer
  3. <Esc>*c5F tells the printer to make this a permanent font (provided in file c5F.txt)
  4. <Esc>(70X selects the font (provided in file data.txt)

IDAutomation has created test files to perform PCL font tests from MS-DOS or a Windows command prompt. To perform the commands listed below, simply run the TEST.BAT file provided in the PCL folder of IDAutomation’s Barcode Font Packages. If in doubt as to which product to use for testing, IDAutomation recommends downloading the Code 39 Barcode Font Package Demo. The TEST.BAT file assumes a PCL printer is attached to the LPT1 port of a PC. Printing to a network printer may be accomplished by replacing LPT1 with the printer’s UNC path in the BAT file. View the files c70D.txt, c5F.txt and data.txt with a standard text editor to see the escape commands.

Type the copy commands manually from the prompt to select a different font, for example:

copy /B c70D.txt +NewFont +c5F.txt +data.txt LPT1

The files may also be copied to a printer on a network, for example:

copy /B c70D.txt +NewFont +c5F.txt +data.txt \\192.168.31.127\BINARY_P1

Printing PCL SFP Fonts in Landscape Mode:

Separate landscape versions of SFP barcode fonts (aka: SFL) are not necessary to print in Landscape mode or at an angle. The Print Direction PCL command rotates the logical page coordinate with respect to the current orientation, which allows printing standard PCL Barcode Fonts in landscape.
The PCL command is:
[ESC]&a#P
Where # is the orientation angle. Valid values are 0 (default), 90, 180, and 270.

How to Determine if the Font is Installed:

To determine if the font is installed in the printer, obtain a font printout from the printer.

Font is Lost after Printer is Powered Off:

If the printer is powered off or to reset, the font will have to be copied to the printer again even if the <Esc>*c5F command is sent to the printer to make the font permanent. This is by design of the printer manufacturer. Because of this limitation, the font should be sent to the printer at the beginning of every print job.

Cannot Download PCL Font to Printer:

Some printers such as the HP 3100, HP 3150, and any printers in HP’s “All-in-One” product family do not have an internal PCL rasterizer. Instead, they use a software PCL emulator that is built into the print driver. PCL fonts are not downloadable to these types of printers. Other HP LaserJet printers have an internal PCL rasterizer and internal printer fonts; PCL fonts are downloadable to these types of printers. To find out if the printer being used has an internal PCL rasterizer, contact the printer manufacturer.

Switching Between PCL Fonts:

To print IDAutomation’s custom PCL fonts along with other fonts, select the custom font first and then select another. For example, to select a MICR font that has an ID of 70 send the following command to the printer “<Esc>(70X” to select another font with an ID of 72, send the following command to the printer “<Esc>(72X”. Font ID’s can usually be determined by obtaining a font printout from the printer.

Interleaved 2 of 5 PCL Fonts Not Printing Correctly:

Problems may occur when printing ASCII 130 to ASCII 160 of the Interleaved 2 of 5 PCL font. The problems have been corrected in the fonts dated January 2002 or later. If an updated version is needed, please contact IDAutomation with the font order ID.

Other PCL Font Issues:

For all other PCL font issues, contact the printer manufacturer or refer to the HP Printer PCL Reference.