🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3981

Re: How do I recognize postscript from a file

#3981
From: Chris Lewis
Date: Fri, 06 Nov 1992 02:31
42 lines
2661 bytes
In article <AV.92Nov4095431@kielo.uta.fi> av@uta.fi (Arto V. Viitanen) writes:
>When printing from MS Windows to Postscript file, the file (if you don't
>make it not to) starts with characters ^D%! (i.e. control-D, %, !). In a way,
>this is right way, since ^D means end-of-job to a Postscript printer, so
>previous job is stopped. I only thought to say this, since lpr-filter on our
>department checks the %! -pair, and several times Postscript document has
>been run through Ascii-to-PS filter.

The correct way to handle this is for the application to *not*
append or prepend ^D's, and let the spooler handle it.  This is
because the spooler is the most likely to know whether the printer
actually needs it or not.  Ie: PostScript printers connected
by network protocols (AppleTalk, TCP/IP etc.) do *not* need it.

Other non-Adobe PostScript implementations also get indigestion from
^D - ie: imagens (Ultrascript).

If the spooler does it, there's no need to emit ^Ds to the printer
before the job because it knows that the previous job had one at
the end (unless something crashed).  If the spooler does emit
leading ^D's, you want all applications to have it.  If the
spooler does it, then this stuff doesn't interfere with anciliary
spooler facilities (automatic ascii sensing, font includers,
page reversers etc.) - they don't have to be mangled to accept
every different application foulup of the Adobe DSC standard.
And you don't have to muck around so much to use these package's
output as EPS.

If you really want this to work properly, you should manually strip
all ^Ds from application output, and implement it in the spooler.

If I recall correctly, Adobe's heuristic is something like: if you're
sending it to a device, and you know the printer needs ^D, append the ^D,
otherwise (pipe, file etc.) don't.

MS Windows use of ^D is a kludge workaround for somebody else's botch.
A bad kludge.  Because the output of MS Windows ain't PostScript because
of it.
-- 
Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
Ferret list: ferret-request@ferret.ocunix.on.ca
Technical Details
Message-ID: <3944@ecicrl.ocunix.on.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!nott!cunews!revcan!ecicrl!clewis
References: <1992Nov3.083527.20756@ugle.unit.no> <EWEINGAR.92Nov3111448@loanshark.cs.indiana.edu> <AV.92Nov4095431@kielo.uta.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!nott!cunews!revcan!ecicrl!clewis
From: clewis@ferret.ocunix.on.ca (Chris Lewis)
Newsgroups: comp.lang.postscript
Subject: Re: How do I recognize postscript from a file
Message-ID: <3944@ecicrl.ocunix.on.ca>
Date: 6 Nov 92 02:31:27 GMT
References: <1992Nov3.083527.20756@ugle.unit.no> <EWEINGAR.92Nov3111448@loanshark.cs.indiana.edu> <AV.92Nov4095431@kielo.uta.fi>
Organization: Elegant Communications Inc., Ottawa, Canada
Lines: 42