Article View: comp.lang.postscript
Article #4004Re: How do I recognize postscript from a file
From: Leslie Mikesell
Date: Sun, 08 Nov 1992 19:59
Date: Sun, 08 Nov 1992 19:59
40 lines
2646 bytes
2646 bytes
In article <3944@ecicrl.ocunix.on.ca> clewis@ferret.ocunix.on.ca (Chris Lewis) 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, %, !). >The correct way to handle this is for the application to *not* >append or prepend ^D's, and let the spooler handle it. Errr, since when does MS Windows *have* a print spooler? Don't you think it would be pretty silly of the applications to generate output that wouldn't work under the most common conditions? >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. Yes, having a single-tasking operating system is a botch I suppose, but it happens a lot in the real world. I say the botch is that postscript printers require the ^D to terminate a job over the serial/parallel ports, yet it isn't a defined postscript command. Personal computers typically output directly to the printer generally do not provide graceful termination when you cancel a print job or shut the machine down. Thus applications cannot assume that the previous job was correctly terminated and that the printer is in the correct state to start another one without a ^D to flush it. The same applies to printing to files under DOS/windows since the most likely use of those files is to simply copy them to the printer device. If ^D or some other token (perhaps not in the control character range) had been included in the postscript language definition to perform this needed function the problem simply wouldn't exist. In fact it could have been documented like showpage as an operator that should be redefined during EPS inclusion. As things stand, I think the best approach is to teach print spoolers to ignore leading ^D's on postscript documents. Otherwise it's impossible to get consistent behaviour when alternating between a direct connection to a postscript printer and a network link that ends up going through a print spooler. Les Mikesell les@chinet.chi.il.us
Technical Details
Message-ID:
<BxEy6H.KCs@chinet.chi.il.us>Path:
arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!sol.ctr.columbia.edu!emory!swrinde!elroy.jpl.nasa.gov!ncar!uchinews!machine!chinet!lesReferences:
<EWEINGAR.92Nov3111448@loanshark.cs.indiana.edu> <AV.92Nov4095431@kielo.uta.fi> <3944@ecicrl.ocunix.on.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!sol.ctr.columbia.edu!emory!swrinde!elroy.jpl.nasa.gov!ncar!uchinews!machine!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.lang.postscript Subject: Re: How do I recognize postscript from a file Message-ID: <BxEy6H.KCs@chinet.chi.il.us> Date: 8 Nov 92 19:59:05 GMT References: <EWEINGAR.92Nov3111448@loanshark.cs.indiana.edu> <AV.92Nov4095431@kielo.uta.fi> <3944@ecicrl.ocunix.on.ca> Organization: Chinet - Public Access UNIX Lines: 40