Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: "Scott Collins" <scollins@galstar.com>
Subject: Re: Help printing from Alpha to Lexmark RT
Date: 1998/02/15	[thread overview]
Message-ID: <6c7fuo$729@mercury.galstar.com> (raw)
In-Reply-To: 34e62c84.38794455@news.uth.tmc.edu


David,

The printer sounds as though it is fully able to act as an lpd print server
and I assume that it auto-senses Postscript or PCL input. It sounds as
though straight text input (which goes through the PCL interpreter) is your
problem. If the formatting has a kind of stairway effect, where each new
line starts horizontally where the previous line ended, I know what your
problem is. DOS/Windoze supply CR/LF (carriage return & line feed) pairs to
terminate lines which is the default for most printers. UNIX however ends
each line with only a LF which does not reset the cursor position to the
left margin on printers configured like this.

You have three options. Use a utility such as "mpage" which formats your
output and sends it to the printer as postscript, reconfigure the printer to
act properly with just LF characters to terminate lines, or use a printcap
file which resets the printers PCL interpreter to treat lone LF's properly.

Following is a korn shell script which contains a printcap file which resets
the printers PCL interpreter to treat lone LF's properly by using the
script.

================================================
#!/bin/ksh
#
#  Name: hpljf
#  Author: Scott Collins
#  Purpose: HP Laserjet UNIX printer filter
#
#  Directions:
# Place this file "hpljf" into /usr/local/bin.  This file is the
# printer filter.  The file paths to the binaries in this script may
# need to be changed for your system.
#
#######################################################################
# Set up your printer in the /etc/printcap. Add the following
# text in it, or whatever paths are appropriate to your system.
#
#
# lp0|lj|0:\
#         :lf=/usr/adm/lp0err:\
#         :lp=:\
#         :rm=printer.name.here:\
#         :rp=ps:\
#         :if=/usr/local/bin/hpljf:\
#         :mx#0:sh:\
#         :sd=/usr/spool/lpd0:
#
#######################################################################
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

echo -ne "\033E\c"  # reset printer
echo -ne "\\033)0B\c" # secondary character set line draw
 echo -ne "\\033&k2G\c" # set line termination mode
cat
echo -ne "\\f"
=========================================================

David S. Loose-Mitchell wrote in message
<34e62c84.38794455@news.uth.tmc.edu>...
>Anyone out there know how to write the princap file for a Lexmark
>printer from OSF 3.2c? The Lexmark is a true network printer in that
>it has its own netcard and runs LPR/LPD; it supports both postscript 1
>and 2 and HPL-5. I can sent data to the printer with no problem but
>it's woefully misformatted.
>
>Cheers,
>David





  reply	other threads:[~1998-02-15  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-14  5:00 Help printing from Alpha to Lexmark RT David S. Loose-Mitchell
1998-02-15  5:00 ` Scott Collins [this message]
1998-02-18  5:00 ` Ernest LaBonte
1998-02-26  5:00 ` mark vallee
  -- strict thread matches above, loose matches on Subject: below --
1998-02-14  5:00 David S. Loose-Mitchell
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox