🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #4981

Re: How can I tell if a file is "postscript"

#4981
From: Joseph Jackson
Date: Tue, 12 Mar 1991 01:07
45 lines
2653 bytes
Excerpts from netnews.comp.lang.postscript: 7-Mar-91 Re: How can I tell
if a fil.. Vidiot@vidiot.UUCP (1572)

> Two of us looked at the TranScript spooler and neither of us saw anything that
> the filters did that made it run enscript (or whatever) to turn text into
> PostScript.  So, that left the printer doing the work.  But, if the printer
> doesn't do the work, then what piece of TranScript is doing the work.

Yeah, it's a rather hidden feature.  The lpd sends the print job through
all the necessary filters and as a last step calls "pscomm" to pipe the
output over the serial line to the printer.  "pscomm" has some
intelligence built in to it which isn't obvious.

"pscomm" looks at the first few bytes of the input stream looking for
the "%!" PostScript magic.  If it doesn't find it, it will call
"enscript" to convert the (assumedly text) file to PostScript.  You can
change what program is called by setting the PSTEXT variable in the
.options file which is located in the spool directory for the given
queue.

Here's one way of looking at it:  this feature provides some degree of
compatibility with the old days of simple line printers.  Think of how
many things would break if you suddenly needed to specify an lpr switch
when queuing straight text.  Things like "ls |  lpr" wouldn't work any
more.

Another feature allows TranScript to handle both face-up and face-down
printers.  "pscomm" can be configured to call a page reversal filter for
selected printers.  It uses the same "psrev" command which is normally
made available to users.  At my site, reversal is the default.  For
newer page-up printers, I add the line "REVERSE=" to the associated
.options file to avoid unnecessary page reversal.

Check out the file psint.sh for more details on .options file.  In
normal TranScript installations, all of the filters listed in the
printcap are actually hard-links to psint.sh.  That script invokes the
.options file.

Joe Jackson
Distributed Workstation Services
Carnegie Mellon University

Internet:	jj1h+@andrew.cmu.edu
Bitnet:	jj1h+@ANDREW
AT&Tnet:	(412) 268-8799
Technical Details
Message-ID: <Qbr2bdK00VQs40k49S@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!jj1h+
References: <1448@vidiot.UUCP> <449@heaven.woodside.ca.us>, <1460@vidiot.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!jj1h+
From: jj1h+@andrew.cmu.edu (Joseph Jackson)
Newsgroups: comp.lang.postscript
Subject: Re: How can I tell if a file is "postscript"
Message-ID: <Qbr2bdK00VQs40k49S@andrew.cmu.edu>
Date: 12 Mar 91 01:07:53 GMT
References: <1448@vidiot.UUCP> <449@heaven.woodside.ca.us>,
 <1460@vidiot.UUCP>
Organization: Academic Computing, Carnegie Mellon, Pittsburgh, PA
Lines: 45
In-Reply-To: <1460@vidiot.UUCP>