SUMMARY: HP LaserJet 4M with SunOS 4.1.3

From: Henrik Schmiediche (henrik@PICARD.TAMU.EDU)
Date: Sat Nov 06 1993 - 02:44:26 CST

I needed to set up a HP LaserJet 4M on a SunOS 4.1.3 system using the
bpp0 port. Thanks to all who responded. There are several ways to
configure the system to work with this printer. First of, if you use
NewsPrint you can simple add the printer as a PostScript printer using
the NewsPrint software. If you choose to set it up yourself, the key
is that the data be filtered through a driver that usually does
nothing but tell the Printer that the end-of-line marker is a newline,
not a carriage return/newline combo. Here is my printcap entry:

hp|hp1|LaserJet 4M:\

where the name of the driver is /usr/local/lib/drv/hpof. Even though
several people submitted drivers to me, all of them assumed HP only
use, I wanted to use post PostScript and HP PCL (HP 4M is set up to
automatically switch between PostScript and HP PCL language depending
on the data by setting the "personality to 'auto'").

Here is my driver (/usr/local/lib/drv/hpof):

echo "<ESC>%-12345X@PJL JOB"
echo "<ESC>%-12345X@PJL RESET"
unix2dos -ascii
echo "<ESC>%-12345X@PJL EOJ"

Note that <ESC> is ASCII character \027 - sometimes it is displayed
as '^['.

I use the HP 4M "new" PJL language to encase each job with a "Begin
Job" and "End of Job" marker. The "Reset" command is optional and may
not be desirable in certain environment. The filter "unix2dos -ascii"
converts the end-of-line characters to DOS format. If the HP 4M is set
up to only do PostScript and nothing else, the "unix2dos" filter can
be replaced with "cat". If the HP 4(M) is set up do nothing but HP
PCL, then one can use the following filter (untested!!!!):

echo "<ESC>%-12345X@PJL JOB"
echo "<ESC>%-12345X@PJL RESET"
echo -n '^[&k2G'
echo "<ESC>%-12345X@PJL EOJ"

which sends a PCL command to do the end-of-line translation at the
printer level not in the system software. The PJL language can be used
to further fine tune these printers. For example to force a printer
into PostScript one can add the command:


after the "PJL RESET" command above. Many other PJL commands are

Any comments and suggestions are most welcome, there may be things I am
missing here.

    - Henrik

Henrik Schmiediche, Dept. of Statistics, Texas A&M, College Station, TX 77843
E-mail:  |  Tel: (409) 845-9447   |  Fax: (409) 845-3144

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:28 CDT