[comp.lang.postscript] PostScript to ASCII utility

mdefelic@digi.lonestar.org (Mitch DeFelice) (10/16/90)

Help!!!!  I'am looking for a PostScript to ASCII utility. If 
one doesn't exist, could someone point me to the proper
documentation that would allow me to write one myself.

Any response would be appreciated.

  Thanks Much,


  Mitch De Felice



-----------------------------------------------------------------------
Mitch De Felice                   Phone:  hm: 214-519-4028
DSC Communications Plano, Tx.
EMAIL:                            mdefelic@digi.lonestar.org
                                  or ...!uunet!digi!mdefelic
-----------------------------------------------------------------------

geof@aurora.com (Geoffrey H. Cooper) (10/17/90)

In article <1151@digi.lonestar.org> mdefelic@digi.lonestar.org (Mitch DeFelice) writes:
>Help!!!!  I'am looking for a PostScript to ASCII utility. If 
>one doesn't exist, could someone point me to the proper
>documentation that would allow me to write one myself.
>
>Any response would be appreciated.

ANY response.... **ANY** response....?  OK....

Hmm... this is a tough one.  I suggest that you get GhostScript 2.0 and
hack the driver.  Maybe:

	...
	bp = bitmap;
	for ( height = 0; height < 3300; height++ ) {
	    for ( width = 0; width < (2550+7)/8; width++ ) {
		b = *bp++;
		for ( mask = 0x80; mask != 0; mask >>= 1 ) {
		    putchar((mask & b) ? '@' : ' ');
		}
	    }
	    putchar('\n');
	}
	...

That should give you postscript output that you can print on an ASCII
printer.  It may be hard to find one that prints 2550 columns on a
line, though.

Now, if you were looking for an ASCII to Postscript filter...

- Geof
-- 
geof@aurora.com / aurora!geof@decwrl.dec.com / geof%aurora.com@decwrl.dec.com