| |
   
Support Home | Search | FAQ | Library | Order | Forum  
Home : Fontware Products : PCL Fonts
Q10086 - HOWTO: Use LPR command to send fonts to a PCL-compatible...

Introduction

The kb article #10002 explains how to use the copy command to send PCL font to the printer. To use this approach, the printer must be physically connected to a computer via a parallel or USB port and shared across a Windows network. Another widely deployed solution is to connect the printer to the LAN directly using a built-in network adapter or a print server adapter. This configuration allows computers running operating systems such as UNIX and Macintosh to print using LPD protocol.

Note

To use this approach, the printer must be connected to a TCP/IP network directly and has the PCL interpreter built in. Some printers rely on the host driver to interpret PCL commands and do not accept direct PCL stream. Check with your printer configuration to make sure that the PCL interpreter is built in the printer itself.

Before we go details about LPR command, it is necessary to explain two terms used in the LPR.

Printer Name

The printer name refers to the host name or the IP address of the printer device, depending on the network configuration. A TCP/IP device may be identified with a full qualified DNS name, or an IP address. In our test lab, we assign our network printer a fixed IP address 192.168.1.22, and we use this address in the examples below.

Queue Name

The queue names are names assigned to the "processors" in the print server. Most print servers and network printers have the hardcoded names. Many also allow you to set up a queue with the names you'd like. On HP JetDirect printer servers, the raw PCL queues are named as raw, raw1, raw2 and raw3. In the below example we use raw as the queue name. Replace this name with the one from your printer.

Example Files

We use the files from kb #10002, which can be downloaded here (Zip file, 91,181 bytes).

Steps to send fonts to the printer

As indicated in kb #10002, you perform three steps to send the font to a printer. The first command, Font ID, assigns a unique number to the font followed. After that you send the font binary file to the printer. The last step makes the font permanent residing in the RAM by sending the Make Font Permanent command. Note: the font resides in the printer RAM, the font can not survive a power outage or power reset. To make sure that you always have the font available, repeat the font downloading steps at the beginning of each print job.

In our example, we store the data in three separate files: font-id.txt, code39ma.sfp, set-font.txt. We can use copy to send them in one stream. However, the LPR command does not support concatenating files. We need to combine these three files into one first and this can be done using the COPY command:

copy /b font-id.txt +code39ma.pcl +set-font.txt  total.bin

After we combine the three files into one, we can then use lpr to send the font:

lpr –S 192.168.1.22 –P raw –o l total.bin

The option o l is needed to send the file in binary format to the printer.

After we complete sending the font, we can send the content.txt to the printer to print a test page:

lpr –S 192.168.1.22 –P raw –o l contents.txt

Note: the lpr option "l" is the l as in "lucy", not digit 1.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 4/4/2006.
Last Modified on 2/15/2007.
Last Modified by glitch.
Suggested by glitch.
Article has been viewed 4330 times.
Rated 8 out of 10 based on 5 votes.
Print Article
Email Article