printing postscript files
Jonathan I. Kamens
jik at athena.mit.edu
Wed Feb 21 07:17:34 AEST 1990
Several people have responded to the article asking how to print a
Mac-generated PostScript(TM) file on a printer hooked up to a Unix box.
However, I don't think anybody has given the "full story", so I'd like
to try to bring everything together in one message.
Most Mac programs which generate PostScript generate a special form of
PostScript which is designed to be printed in conjunction with a "Laser
Prep" header file which, in its original form, can be understood only by
the Apple LaserWriter. When printed directly from a Mac to a
LaserWriter, this isn't a problem because the LaserPrep file is
downloaded to the printer directly, either beforehand or at the
beginning of each job. In fact, I think the LaserPrep is designed in
such a way that it checks to see if it's already been downloaded each
time it is sent to the printer, and if it is already present in the
printer, aborts the evaluation of the rest of the LaserPrep, which
speeds things up quite a bit.
If you want to print PostScript to a file instead of to the printer
when using a Mac, there are two ways to do this, Command-f and
Command-k. Using Command-f will give you a PostScript file without the
LaserPrep file prepended to it, while Command-k will give you a file
with LaserPrep prepended. Unfortunately, most printers besides the
LaserWriter won't be able to print either of these as-is, for the
reasons mentioned above (i.e. they won't be able to understand the
LaserPrep header, and without the header the contents of the PostScript
file won't make any sense to the printer). Another possible problem is
that much of the software that is used to print to PostScript printers
from Unix relies on "%!" being the first two characters in any
PostScript file. If they are not, the file is considered a text file
and *passed through a formatter to print it as text* before it is sent
to the PostScript printer.
The best solution to this problem I've seen is a package called
"macps", written by Edward Moy (or, at least, he's the person who signs
the mail sent out about it :-). This package includes several program.
The two most importants ones are:
1. "prepfix", a program which will take a LaserPrep file uploaded to a Unix box
and fix it so that printers besides the LaserWriter will understand it. You
then install the fixed LaserPrep file(s) into a library directory so
that the
other important program can use them....
2. "macps", a program that reads a PostScript file generated on a Mac using
Command-f, figures out which version of LaserPrep it requires, pulls
the fixed
LaserPrep out of the library directory, prepends it to the beginning of the
file and sends the output to its standard output -- you can then pipe this
through lpr to print it to a PostScript printer.
The most recent version of macps (version 2.2, I think) is available for
anonymous ftp from the directory ~ftp/info-mac on the machine
sumex-aim.stanford.edu (36.44.0.6).
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8495 Home: 617-782-0710
More information about the Comp.unix.questions
mailing list