🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #164

Re: Need an intelligent Ascii - PS Filter

#164
From: Bruno Hall
Date: Sat, 01 Aug 1992 04:54
43 lines
2387 bytes
gry84@psi.sci.sdl.usu.edu (Martin H. Jones) writes:
>Hi;

Hello :-)

>	I have been looking for a filter (the printcap type) that will convert
>ascii to postscript and leave postscript alone.  The object being to have a
>single queue that will accept both ascii and postscript data and handle them
>correctly.  This arises principally from our pc's which sometimes output ascii
>(from screen dumps, etc.) and sometimes postscript (from word
>processors, etc. and procede to queue the job to our workstation 
>that "owns" the postscript printer.

Strictly speaking, you've got a contradition going here, since ps
is ascii (well, mostly ascii anyhow), and therefore you'll always 
trigger the ascii-->ps part of the filter.  

So what's needed is some manner of differentiation between the two.
IF (note big if) your word processor is outputting ps which abides by
the Adobe document structuring conventions, then you could check out
the first 11 characters of the file (which will be "%!PS-Adobe-").  On the
other hand, if your word processor doesn't abide by the conventions, I
think you're pretty much SOL, unless you can prepend something to your
ascii files.

Assuming you've figured out some way to to differentiate between ps
and ascii inputs, converting the ascii to ps is something which has
been beaten to death (several times).  CHeck out things like ps2ascii,
psnup, pstext, psutils, textps, etc.

>	Any suggestions would be appreciated.  I would not be above writing a
>filter, if I could get hold of the necessary details of what a printcap type
>filter needs to do.
>
>					Thanks,
>						Martin

Bruno
-- 
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Bruno Hall  |  VE2HUM  |  bruno@mcrcim.mcgill.edu         
McGill Research Centre for Intelligent Machines - Controls Group
New systems generate new problems -- Join the Flat Earth Society.
Technical Details
Message-ID: <1992Aug1.045437.1616@thunder.mcrcim.mcgill.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!bruno
References: <1992Jul31.121222.57722@cc.usu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!bruno
From: bruno@thunder.mcrcim.mcgill.edu (Bruno Hall)
Subject: Re: Need an intelligent Ascii - PS Filter
Message-ID: <1992Aug1.045437.1616@thunder.mcrcim.mcgill.edu>
Keywords: Filter
Organization: McGill Research Centre for Intelligent Machines
References: <1992Jul31.121222.57722@cc.usu.edu>
Date: Sat, 1 Aug 92 04:54:37 GMT
Lines: 39