Subject: Re: Printing Problems
To: Stuart McLuckie <postmaster@mcluckie.abel.co.uk>
From: Frederick Bruckman <fredb@fb.sa.enteract.com>
List: port-mac68k
Date: 05/27/1998 15:35:50
On Mon, 25 May 1998, Stuart McLuckie wrote:

>         $ lpc status
>         lp:
>                 queuing is enabled
>                 printing is enabled
>                 4 entries in spool area
>         stylps:
>                 queuing is enabled
>                 printing is enabled
>                 4 entries in spool area
>         cstylps:
>                 queuing is enabled
>                 printing is enabled
>                 4 entries in spool area

Do you really have three printers??? This is what works for me. I'm using
ghostscript-5.10, built with the package system. You can possibly adapt
this to your driver (one of /usr/pkg/share/ghostscript/5.10/*.upp), and
your favorite shell.

In /etc/printcap:

# Epson Stylus Pro
lp|stc|Epson Stylus Pro:\
        :lp=/dev/tty01:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:\
        :br#57600:pc#500:xc#0177777:ms=-parity,ixon,-opost:sh:\
        :if=/usr/local/libexec/lpr/stcf:


cat /usr/local/libexec/lpr/stcf

#!/usr/pkg/bin/bash
#
# Input Filter for using Ghostscript with the Epson Stylus Color Pro
#
# F. Bruckman, 5/3/98
#
#
/usr/pkg/bin/gs -q -sOutputFile=- "@stc.upp" /dev/stdin -c quit;


Now I can just type

	lpr something.ps

or even

	lp something.ps

and walk away. It often takes quite a while. :)

The key point here is that lpr doesn't generally like to get large binary
files as input. By running ghostscript in a filter, it doesn't have to.
The xc# and ms fields in the printcap entry are to make certain that the
output path is 8-bit clean, and to set up the line for hardware
handshaking. Check the documentation with your printer for the proper
setting for br#.

I also find that by using the filter, as opposed to setting the OutputFile
to a temporary file and printing it with `lpr -l', the big jobs will start
printing as soon as the first page is rendered.