Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 1996 19:05:30 -0400 (EDT)
From:      rhh@ct.picker.com (Randall Hopper)
To:        codonnell@bus.net (Chuck O'Donnell)
Cc:        kaplan@cslab.tuwien.ac.at, questions@FreeBSD.org
Subject:   Re: HP Laserjet 5L
Message-ID:  <199609032305.TAA14596@elmer.ct.picker.com>
In-Reply-To: <1.5.4.16.19960903220249.347f8d54@bus.net> from "Chuck O'Donnell" at Sep 3, 96 06:02:49 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Chuck O'Donnell:
 |>On Fri, 30 Aug 1996, Leon Kaplan wrote:
 |>> I followed the steps in the handbook but I just can't seem to
 |>> get this working:
 |>> 
 |>> My HP 5L is on /dev/lpt0. When I try to "cat /etc/printcap >
 |>> /dev/lpt0" then (appart from the missing LF -> CR+LF translation)
 |>> everything gets printed _very_ slowly (1/2 page per minute). If I use
 |>> a simple filter script as the one below then I have the same
 |>> problem. Could this be because of interrupt driven mode? Should I
 |>> switch to polling? Any experiences?
 |
 |I don't know about the slow printing problem, but for the CR/LF problem, you
 |can use the attached filter `laser.c'.  It also has settings for pitch,
 |font, and indentation.  The printer does have a built in escape sequence
 |command to set the the correct CR/LF action internally, but it was easier to
 |do it with a filter. Let me know if you want the HP command and I'll go see
 |if I can dig it out.

Missed the CRLF part of the question.  Sorry about that.  I thought the
escape code was easier to use/maintain myself.

Now that I'm home I can get to my config files.  Here's my printcap (for HP
LaserJet 4P, without Postscript SIMM).  There are some other goodies in
here in addition to CRLF conversion.  Also included my gslj script for
printing PostScript with GhostScript for completeness.  You'll want to
change lpt1 to lpt0 if your printer is on the first parallel port.  I've
also got my spool directory over on /usr2 so you may want to delete all
occurances of "/usr2", verifying that the paths you leave do exist.

Randall Hopper
rhh@ct.picker.com

lp|LJ4P RAW:\
        :lp=/dev/lpt1:sd=/usr2/var/spool/lpd/lp:lf=/var/log/lpd-errs:\
        :mx#0:ff=\033E:fo:sh:tr=\033E:

text|LJ4P TEXT (UNIX->DOS EOL text conversion & PC-8 [not Roman-8] Fontset):\
        :lp=/dev/lpt1:sd=/usr2/var/spool/lpd/text:lf=/var/log/lpd-errs:\
        :mx#0:ff=\033E\033&k2G\033(10U:fo:sh:tr=\033E:

ps|LJ4P POSTSCRIPT (Ghostscript PS->PCL conversion):\
        :lp=/dev/lpt1:sd=/usr2/var/spool/lpd/ps:lf=/var/log/lpd-errs:\
        :of=/opt/bin/gslj:\
        :mx#0:sf:sh:


#!/bin/sh
#
# PS->PCL Filter Script -- Uses GhostScript 

TMPDIR=/usr/tmp
GSLIB=/usr/local/lib/ghostscript/fonts
PATH=/usr/local/bin:/usr/bin:$PATH
export TMPDIR GSLIB PATH

exec gs -q -sDEVICE=ljet4 -dNOPAUSE -sOutputFile=- gslp.ps -



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609032305.TAA14596>