Subject: Ps2term on tsx11
From: [email-masked] (Bengt Andersson)
Date: 5 May 1993 12:14:27 +0300
Newsgroups: comp.os.linux.announce

I've just uploaded ps2term.tpz at tsx11, it's a kind of filter
that strips a PostScript file to a plain ASCII dito.

Here is some parts of the README file.

This program is totally free to use, modify and copy as you wish,
but also no warranty of any kind.

I wrote it just to read some manuals which ps2ascii and ps2txt
just didn't managed to filter in a nice way.

Anyhow both ps2txt and ps2ascii is included so you can try them out.
Included is also a binary version of ps2term, it is compiled with
the command "gcc -static -Wall -ansi -O2 -m486 -o ps2term ps2term.c",
using gcc 2.3.3 and libc 4.3.3.

General:
  ps2term.c is a utility that strips a PostScript (.PS) file from all
  graphic stuff and prints the result (ASCII) on stdout.

  I began with hacking in the ps2txt-2.1.c file, but when just the
  original main() function was left, i decided to make it as a whole
  new program.

  This program is NOT a regular interpreter of PostScript, it's just
  extract textstrings from an PostScriptfile and at the same time it
  try's to figure out how to format the text, this is done by looking
  for certain information in the input file, the program has a number
  of switches that selects what to search for and what todo when thats
  is the case.

Usage:
  ps2term [-1p] [-2 | -2- | -2s] [-b- | -bp] [-sSTRING] [-?] [infile.ps]

  The first time you want to filter an PS file just try ps2term without
  any switches, if this works fine then theres nothing to it.

  Else if there is a lot of parantheses in the output, try the -1p
  switch, or if the outtext has strange linefeeds or miss some spaces
  between words, use -2, -2s or -2-.

  If not this fix your problem with line feeds try the -b- or -bp, in
  worst case use the -xn where n is the the maximal number of character
  allowed in a line in the outtext.

  If not even this fix a nice ASCII text from your PS-file, then you just
  have to write a new program that does, havn't you ??? :)

  If there is some strange text showing up reapeatedly in the outtext try
  to set -s<STRING> where STRING is the beginnig of the "strange" text,
  enclose the STRING with qoutes

 If no filename is given when ps2term is started ps2term will use stdin,
 stdout is always the outfile.

 4-May-1993

 [email-masked]

 Bengt Andersson
 Cardellgatan 4
 112 36 Stockholm, Sweden