My original problem was I needed to print Postscript documents on an HP laser
printer. Here is how I did it under Solaris 2.3.
First, get yourself the latest copy of Aladdin Ghostscript from ftp.cs.wisc.edu
in /pub/ghost/aladdin. If you get the GNU version, make SURE you get the
patches or else it won't work! I lost a week on this problem.
Second, get yourself the latest copy of Ghostview from your favorite GNU
repository. Ghostview is not really necessary to printing postscript files, but
it has the postscript fonts. You can also get fonts from the Aladdin site
referenced in the paragraph above.
Once you have compiled and installed the software, now comes the fun part. You
have to create a filter using the "lpfilter" command. This was the hardest
part of the whole process for me.
Let's assume ghostscript is in /usr/local/bin. Create a shell script (here
is an example called ghostprint).
PATH=/usr/bin/:/usr/ucb:/usr/local/bin; export PATH
gs -q -sDEVICE=laserjet -dNOPAUSE -sOutputFile=- -
I put this script in /usr/lib/lp/postscript. The next step may not be the
best solution, but it was the only one I could find that worked. Delete
all you existing lp filters by typing "lpfilter -f all -x". Now add your
new filter. I added the filter from the command line as follows:
lpfilter -f ghostscript -
Input types: postscript
Output types: simple
Printer types: any
Printers: <the name of the printer goes here>
Filter type: slow
Please read the man pages on "lpfilter".
If you are using SunOS, put a shell script (call it hp.gs) like the following
/usr/local/bin/gs -q -sDEVICE=laserjet -sOutputFile=- -
Now modify /etc/printcap with the following entry:
That all there is to it. :-) THe whole process took me about one week
working on it about half time. Yes, I know I am slow!
Major thanks are owed to Gordon Rowell (firstname.lastname@example.org) and Peter
Dalgaard (email@example.com) for making this job easier. And thanks to every-
one who recommended Ghostview/Ghostscript. It was worth the effort.
P.S. A special thanks to Peter Deutsch at Aladdin Enterprises and
firstname.lastname@example.org for their most helpful pointers.
-- H.A.N.D. ;-) Thomas A. Plesha Physical: Mare Island Naval Shipyard (707)646-1326 P.O. Box 2035 FAX (707)646-1307 Vallejo, CA 94592-5100 Logical: TAP116@NOCC.MINSY.NAVY.MIL AKA: TAP116@[126.96.36.199]
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:17 CDT