From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,a3e03d992d1023fc,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1993-05-05 02:32:25 PST Path: gmd.de!Germany.EU.net!mcsun!news.funet.fi!hydra!hydra!not-for-mail From: su92-ban@nada.kth.se (Bengt Andersson) Newsgroups: comp.os.linux.announce Subject: Ps2term on tsx11 Followup-To: comp.os.linux Date: 5 May 1993 12:14:27 +0300 Organization: Royal Institute of Technology, Stockholm, Sweden Sender: wirzeniu@cs.Helsinki.FI Message-ID: <1s80hjINN10b@hydra.Helsinki.FI> NNTP-Posting-Host: hydra.helsinki.fi Keywords: ps2term, ps2ascii, ps2txt, postscript, ascii, text 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 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 su92ban@nada.kth.se Bengt Andersson Cardellgatan 4 112 36 Stockholm, Sweden