[comp.protocols.appletalk] Is Mac-generated PostScript non-conformant?

blarsen@spider.uio.no (Bjorn Larsen) (10/11/89)

I am creating a print spooler on a Unix machine. Among other things, it
accepts print jobs from Macintoshes. To implement this, I have used 
the CAP package from Columbia.

A few days ago we received a large number of downloadable fonts. My
intention is to keep these on the spooler, and do a simpleminded
preload of fonts for those documents that need it.

Much to my dismay, the PostScript files produced by our Macintoshes
are not conforming to the Adobe structuring conventions. To be
more exact; they do not include a %%DocumentFonts comment in
the header (or anywhere else, for that matter).

The only way I can think of offhand to determine the fonts used by a
Macintosh PostScript program is to parse the input and search for an
occurrence of the sequence

mark{} T /fontname /|______fontname 0 rf

which seems to be defining the font for the Mac prep routines.

Of course the syntax and spacing of the statement above can vary widely;
after examining four or five documents I've discovered three variations.

It might be that I'm going about this the wrong way and that there is some
fancy way to get the information I need inside the PAP daemon. If not, I
seem to be stuck with the approach mentioned above.

It seems to me that somebody is bound to have run into this problem
before me.

Enlightenment, anybody?


(Followups to comp.lang.postscript, please)