TEXTPS.EXE  -  Convert a plain-text file to PostScript.


Author: Frank da Cruz, Columbia University

  Copyright (C) 1991, 1997, Trustees of Columbia University in the City
  of New York, all rights reserved.

Acknowledgements to Bur Davis of Adobe Systems, Darryl Hankerson of
Auburn University, and Jeffrey Altman of Columbia University.


DESCRIPTION

TEXTPS converts an ordinary plain-text file to PostScript, suitable for
printing on a PostScript printer such as the Apple Laserwriter, or viewing
with a PostScript previewer such as ghostscript, or NeXTSTEP Preview.

TEXTPS reads the plain text file from standard input and writes the
PostScript file to standard output.  Thus TEXTPS would normally be used with
standard input/output file redirection, for example:

  textps < oofa.txt > lpt1

TEXTPS converts text files to Courier-11, 66 lines to the page, 80
characters to the line, with options to select different page sizes.

It handles pagination, tabs, line wrap, overstruck characters (via
backspace) and overstruck lines (via carriage return).  TEXTPS absorbs
ANSI escape sequences without printing them.  If the input file is
already PostScript, it is simply copied to the output without alteration.
TEXTPS produces no special effects such as page headings, 2-up or 4-up
printing, or rotation.

Unlike most other "enscriptors", TEXTPS handles 8-bit character sets
correctly.  The default file character set in Microsoft Windows is CP437; in
DOS or OS/2 it is the current code page; in NeXTSTEP it is the NeXT character
set, and it is ISO 8859-1 Latin Alphabet 1 elsewhere.  You can override the
default character set with a command-line option.  Shift-In/Shift-Out codes
(Ctrl-N and Ctrl-O) within the text are also handled correctly, allowing for
representation of 8-bit characters in the 7-bit environment, for example in
e-mail.


OPTIONS

 -h  Displays a help message.

 -v  Produces a page showing the textps program version number and the
     printer's PostScript version number.

 -l number
     Specifies the number of lines on a page.  The default is 66.  Use
     70 for A4 paper.

 -w number
     Specifies the number of characters on line.  The default is 80.

 -c  Specifies the file's character set.  The choices are apple (Apple
     QuickDraw), cp437 (IBM code page 437), cp850 (IBM code page 850),
     decmcs (DEC multinational character set), latin1 (ISO Latin Alphabet 1),
     and next (the NeXT character set).  The character set name can be
     abbreviated as long as you have given enough characters to distinguish
     it from the others.


EXAMPLES

textps < infile > outfile                (file conversion)

textps < infile | lpr                    (UNIX)

textps -c cp850 < infile > prn           (DOS or Windows)

textps -v -c apple < infile | lpr        (UNIX with character-set override)

To use TEXTPS with Kermit 95, give its pathname and the device name of your
PostScript printer in a SET PRINTER command; for example:

  set printer |d:\k95\textps.exe>lpt1

in which:

  |                   is the "pipe" sign
  d:\k95\textps.exe   is the pathname of the TEXTPS program
  >                   is the output redirection sign
  lpt1                is the name of the printer 

Then all material that is routed to your printer by host-generated escape
sequence (transparent print or autoprint) or by other events in the terminal
Window (such as Kverbs like \kDump or \kPrintFF) will go through TEXTPS first
for conversion to PostScript.

Note: Spaces are not allowed in the Kermit 95 SET PRINTER "filename" field.


ERRORS

TEXTPS returns an exit status code of 0 on success, 1 on failure.  TEXTPS
fails only if it is invoked with invalid command line options, in which case
an error message is printed, along with usage instructions.


BUGS

TEXTPS constructs its own internal font, which contains all of the
characters of Latin Alphabet 1, plus 32 additional.  File characters that
don't have equivalents in this font, such as PC line- and box- drawing
characters, are approximated with ASCII characters like '+', '-', '|' and
'X'.  Characters that cannot be translated are shown as '?'.

PC code pages 857, 860, 861, 863, and 865 are treated like code page 437.

Printers with PostScript versions prior to 47.0 might display certain
characters as spaces: broken bar, copyright, trade mark, not sign,
fractions, superscripts, Y/y-acute, Icelandic Thorn/thorn and Eth/eth.  Use
the -v option to have the printer display its PostScript version number.

When textps is installed as a print filter (e.g. in UNIX, to be used
automatically by lpr), there is no way way to pass options to it.  So, for
example, you can't tell it to use a different character set.  In that case,
run textps "manually" and then print its output; for example:

  textps -c decmcs < decmcs.txt | lpr


(End of TEXTPS.TXT)
