Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 1995 17:19:59 -0500 (EST)
From:      rhh@ct.picker.com (Randall Hopper)
To:        questions@FreeBSD.org
Subject:   Re: Printing in FreeBSD
Message-ID:  <9512152219.AA10309@elmer.ct.picker.com>

next in thread | raw e-mail | index | archive | help
> > Okay.  Question on printing with FreeBSD, sans ghostscript.  The system
> > is FreeBSD v2.1.0, i'm catting files to /dev/lpt0.  The files come out in 
> 
> Is there a peculiar reason why you don't use
> lpd printing (/etc/printcap)?
> 
> Either you add a filter to /etc/printcap (apsfilter e.g. or a simple shell
> script or C-program) ) or you send your printer
> the sequence to make it understand the <lf> carriage control.
> 
> Here is a snippet that someone else grabbed drom usenet:
> This issue is overdue to find reflection in the FAQ
> if it isnt't yet.

     I posted the printcap & ghostscript scripts quoted here (printcap was
one I hacked from the 386BSD FAQ).  I have since tweaked them a little;
the raw (lp) queue is now just that, the printer now does EOL conversion
instead of unix2dos program, etc.  Nothing big.

     Here's the new version and script file I'm using for printing on an HP
Laserjet 4P w/o Postscript SIMM.

------------------------------/etc/printcap-----------------------------------

#       @(#)printcap    5.3 (Berkeley) 6/30/90

lp|LJ4P (Raw):\
        :lp=/dev/lpt0:sd=/usr/var/spool/lpd:lf=/var/log/lpd-errs:\
        :mx#0:ff=\033E:fo:sh:tr=\033E:

text|LJ4P (w/ UNIX->DOS EOL text conversion):\
        :lp=/dev/lpt0:sd=/usr/var/spool/lpd:lf=/var/log/lpd-errs:\
        :mx#0:ff=\033E\033&k2G:fo:sh:tr=\033E:

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

----------------------------/usr/local/bin/gslj--------------------------------

#!/bin/sh

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

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





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