Subject: Re: Ugh! printing?
To: Martin Joseph <mjoecups@home.com>
From: Frederick Bruckman <fb@enteract.com>
List: port-mac68k
Date: 05/07/2001 10:58:31
On Mon, 7 May 2001, Martin Joseph wrote:
> I have a good install of the 1.5 release, I have an account where I can
> start xwindows and see that Ghostscript(6.01) is rendering my file, but
> I cannot get the printer to do anything.
>
> The Ghostscript error is /invalidfileaccess in --.outputpage. This is
> when I specify gs -sDEVICE=st800 filename.ps
As the other poster said, you need to give it an -sOutputFile argument.
> I cannot use lpr <filename> or I get lp: unknown printer.
>
> I'm sure it's some goddam basic cryptic Unix thing. Like setting the
> output parameters on the serial port? or setting the pipe?
Here's my entire config for making may 840 AV into a print server, using
ghostscript and an Epson Stylus Pro. You might need to vary the serial
port settings. If so, the best way is to use a comm programm (like
kermit) to experiment. Beware, the the printcap(5) man page warns that
all the minus ('-') settings need to follow all the plus ('') settings.
(I've posted most of this before, but I've reworked the "ms" entry to
use descriptive settings, rather than numbers, at the suggestion of
Dr. Bill Stundenmund.)
Here is the printcap entry on the Mac. It replaces the "lp" entry.
------8<----cut here----------------------------------------------------
lp|epson|Epson Stylus Pro:\
:lp=/dev/tty01:sd=/var/spool/lpd/epson:lf=/var/log/lpd-errs:\
:ms=cdtrcts,-opost,-icanon,-isig,-iexten,-echo:-echok:-parity:\
:br#57600:sh:if=/usr/local/libexec/lpr/stc-if:
------------------------------------------------------------------------
The filter, "/usr/local/libexec/lpr/stc-if", is just a shell script:
------8<----cut here----------------------------------------------------
#!/bin/sh
#
# Use: lpr [-l] [file] ...
#
# <default> print postscript level 1 and 2 and pdf files
# -l send ESC/P 2 rendered file directly to printer
#
case $1 in
-c) cat /dev/stdin
;;
*) /usr/pkg/bin/gs -q -sOutputFile=- "@stc.upp" /dev/stdin -c quit
# *) /usr/pkg/bin/gs -q -sOutputFile=- "@stc_h.upp" /dev/stdin -c quit
;;
esac
------------------------------------------------------------------------
For some reason, ghostscript takes "-sOutputFile=-" for standard output,
but doesn't understand "-" for standard input, hence the "/dev/stdin" trick.
The remote printcap entry (which you didn't ask for, but I'm
brain-dumping, here)...
------8<----cut here----------------------------------------------------
lp|epstypro|Epson Stylus Pro:\
:lp=515@corwin:rm=corwin:sd=/var/spool/lpd/epstypro:\
:lf=/var/log/lpd-errs:
------------------------------------------------------------------------
Naturally, "corwin" is the name of the Mac (and it's in /etc/hosts).
For completeness, corwin serves to a Mac running Mac OS, using
"netatalk". Here's the "/etc/netatalk/papd.conf" file...
------8<----cut here----------------------------------------------------
Epson Stylus Pro:\
:pr=lp:pd=/etc/netatalk/Stylus Pro.PPD:
------------------------------------------------------------------------
The "Postscript Printer Description" file should match the one given to
the LaserWriter driver on the Mac running Mac OS (and the printer).
These files are available with the Apple LaserWriter Driver, and also
all over the web (Adobe's web site and Epson's, at least).
Frederick