[comp.lang.postscript] want postscript to text filter

dean@pdx.csd.mot.com (Dean Hall) (02/19/91)

Application output is only available as postscript, but I need ascii text.
Don't have access to application source.  Output will be relatively simple;
similiar to letters and memos.

-- 
Dean Hall (dean@pdx.csd.mot.com) Voice: (503) 643 6247     
Motorola Inc., Commercial Systems Division, Systems Integration

brown@vidiot.UUCP (Vidiot) (02/19/91)

In article <715@pdxvme.pdx.csd.mot.com> dean@pdx.csd.mot.com (Dean Hall) writes:
<Application output is only available as postscript, but I need ascii text.
<Don't have access to application source.  Output will be relatively simple;
<similiar to letters and memos.

This question gets asked all the time.  The basic that keeps getting posted
is that it can't be done.

PostScript can be a very complicated beast.  If the output is from a word
processing package of any sort, there is always a PostScript prolog that
describes many user defined procedures that determine how the output will
be formatted.  To even get any kind of text output requires a full PostScript
interpreter.  You just can't strip away the PostScript code and leave the
actual characters behind.  Why?  Because then you have no idea where on the
page they go.

If you need ASCII text, get the application to give you ASCII text output.
Many applications will give you pure text, unformatted.

Talk to the author of GhostScript and see if he will add text output to what
he has now (if he hasn't done it already).  This is the only possibility
that I can think of that is even close to doing something like what you want.
-- 
      harvard\     att!nicmad\          spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/  decvax!nicmad/ INTERNET:vidiot!brown%astroatc@spool.cs.wisc.edu

kent@Xerox.com (Chris Kent) (02/23/91)

An alternative is to use Glenn Reid's Distillery to put the output PS into a canonical form, which you can then parse fairly well into the ASCII that you want.
-- 
Chris Kent		Xerox PARC CSL			Palo Alto, CA USA
kent@arisia.xerox.com	xerox!kent			+1.415.494.4821