home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / PS2ASCII < prev    next >
Text File  |  1994-07-27  |  576b  |  14 lines

  1. #!/bin/sh -f
  2. # Extract ASCII text from a PostScript file.  Usage:
  3. #    ps2ascii [infile.ps [outfile.txt]]
  4. # If outfile is omitted, output goes to stdout.
  5. # If both infile and outfile are omitted, ps2ascii acts as a filter,
  6. # reading from stdin and writing on stdout.
  7. if ( test $# -eq 0 ) then
  8.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps - -c quit
  9. elif ( test $# -eq 1 ) then
  10.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 -c quit
  11. else
  12.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 -c quit >$2
  13. fi
  14.