[comp.lang.postscript] Trying to get Microsoft Word's POSTSCRP.INI to work ...

kovar@husc4.HARVARD.EDU (11/04/88)

  We're running Microsoft Word in a DOS window on a Sun386i. A printed
document gets a file called POSTSCRP.INI added to the front of it
and it is then passed on to lpr which passes it to an Apple LaserWriter
via some CAP utilities.

  When I first tried to get this to work, the document would never
appear on the laserwriter. The following line appeared to be
responsible:

	userdict /msdict known { stop } if

And then the initialization when on to define /msdict in such a
way that it appears to stay resident. So, the next time you tried to
print a paper, it would find /msdict and the job would abort. At
least that is how I see it.

So, I commented out the check for /msdict and everything worked.
'cept I get an infinite number of copies of whatever document is
being printed.

So, finally, a few questions. 1) Has anyone encountered and solved this
problem before? 2) Is there anyway to make it just not define /msdict
if itis already defined? (I tried making it skip over the definition
of /msdict et al if /msdict was known but I was getting stackoverflow
errors.) 3) Any ideas, off hand, why I would be getting multiple
copies of the paper?

I realize that these questions might be dificult to answer without
the actual PostScript but I don't think I'm allowed to distribute
MicroSoft's initialization routines. 

Thanks very much for any help you might be able to provide ...

-David Kovar

P.S. There is no easy way to just load the initialization stuff
into the printer each time it reboots and not send it with each job.
At least, I've not come up with any yet ...

geof@apolling (Geof Cooper) (11/09/88)

Microsoft word puts the header in front of the file with a ^D between
the header and the file.  The header attempts to install itself as
an "exitserver program".  The first line is something like you gave:

    userdict /msdict known { stop } if

This attempts to flush to the next ^D if the header is already loaded.
The next line is something like:

    serverdict begin 0 exitserver

This turns on exitserver mode.

The problem you are seeing is either than the "stop" goes past the ^D for
some reason, or that the ^D is getting flushed.

A simple fix is to remove the ^D's from the file and comment out both the
above lines.  In this case, the prefix is interpreted each time you send
down a file to be printed.  If you have decent communications with the
printer, the overhead of this is small.

- Geof