PSPRINT: Copyright (C) )by Peter Below 1993

Legalese first:

This software is released to the public domain and may be freely used,
copied and distributed by anyone, as long as no fee beyond the cost of
duplication is charged. The program source code and header file may be
used in other applications as long as due credit is given to the autor.

THIS SOFTWARE IS SUPPLIED AS-IS AND CARRIES NO WARRANTIES OF ANY KIND.
THE AUTOR CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGES TO HARD- OR SOFT-
WARE CAUSED BY THE USE OF THE PROGRAM.

Care and a lot of mental energy has gone into this program, but nobody
is perfect and any program has at least one bug (Murphy's law #118).

For any questions and comments, the autor can be reached via

  Compuserve [100113,1101]

Of course, MONEY is always wellcome, so if your conscience pushes you
to pay for what you use, donate a few $$, DM, FF etc. to a charity of
your choice.


Program installation:

Copy the files PSPRINT.EXE and PSHEADER.PS to a directory on your hard
disk. No other files are needed to use this program. A directory on the
PATH is best suited for this utility. Both files should be in the same
directory but psprint will be able to locate its header file as long as
this is either in the current directory, the programs directory or any
directory on the PATH.

Program use:

Typing psprint /? brings up the following usage info:

-----------------------------------------------------------------------
PSPRINT: Converts ASCII- or ANSI-textfiles to Postscript files.

Syntax: psprint [{/|-}{?|h|n|p|a|t|l|f|s|z|c}] [filename [filename]...]

Parameters are not case-sensitive. Both / or - can be used for switches.
Parameters and switches can be entered in any order.
No spaces are allowed between switches and their arguments, = and : are
allowed but not required.

Switches:
  /?  displays this help info
  /h  like /?
  /n  supresses output of the Postscript headerfiles
  /p  sends output to PRN instead of CON
  /a  assumes Windows-ANSI coding instead of IBM-ASCII (codepage 437)

  In the following lines ## represent a unsigned integer number.
  /t=## set top margin to ## points (1/72 inch). Default= 30
  /l=## set left margin to ## points (1/72 inch). Default= 36
  /f=## set character size to ## points (1/72 inch). Default= 10
  /s=## set linespacing to ## points (1/72 inch). Default= 11
  /z=## set number of printed lines per page. Default= 62
  /c=## set number of printed chars per line. Default= 80

PSPRINT is a DOS filter, it reads text from standard input or a file 
and writes the postscript output to standard output (CON) or PRN.
Input and output can be redirected from the DOS command line.
E. g. "dir | psprint > prn" will print a directory listing on the postscipt
printer on device PRN). It is also possible to pass one or more filenames
to PRPRINT. The header file will only be send once in this case.
Take care if you change the defaults for margins etc.! The current version
of PSPRINT will not check if the values make sense.
If you change the character size and linespacing, you also have to change
the number of chars per line and lines per page to prevent loss of characters
during printing. Sorry for any inconvenience caused by this.
-----------------------------------------------------------------------

A few examples:

   dir /S | psprint /p

will print the directory for the current directory and all of its
subdirectories. The /p parameter redirects the postscript output to the
DOS standard printer device PRN normally assigned to LPT1.

   psprint read.me usage.doc order.doc > psfile.ps

Will read the three files in the order listed on the command line, convert
them to postscript output and put the output in file psfile.ps.
The first thing that goes into this file is the headerfile psheader.ps!

   psprint /a win.ini system.ini /p

Sends win.ini and system.ini as postscript output to PRN using the ANSI
character encoding.

Operation:

Psprint uses a fixed width font (standard postscript Courier) for printing.
The default uses 10 pts characters, so a 80 character wide listing
(textmode screenshots for example) will print to a standard A4 page without
losing chars or wrapping lines.

To replicate all the characters encoded in the IBM codepage 437 or Windows
ANSI, part of the Courier font is reencoded to use the national language
characters already present in the Adope font definition but not encoded.
A number of characters are translated to the Symbol font (greek letters,
math symbols). Symbol is a proportional font but the output is forced to
fixed spacing to preserve the character alignments with the rest of the
text.

A custom character set is defined in the header file and used to print the
graphics characters of the IBM codepage 437 charset. A few of the characters
a not provided yet and will print as blanks. These are some of the symbols
in the control character range (CHR(11) to CHR(15), CHR(18), CHR(19),
CHR(23)) plus CHR(248). Templates for these are provided in the header file
PSHEADER.PS, anyone with artistic inclinations and a working knowledge of
postscript is invited to define this characters. No changes to PSPRINT.EXE
are required. The source code (in TopSpeed Modula-2) is provided, however,
so extensions to other codepages can be made by anyone having the TopSpeed
compiler.

PSPRINT does not support tabs or intelligent wordwrap (wrapping will not
be done wordwise). While the header defines postscript procedures for
bold, underline, italic, subscript and superscript printing, PSPRINT makes
no use of them. It is NOT a text formatting program!



PS. A small but critical error crept into the header file on the first
    uploaded version. I forgot to increase the size of the CharacterDefs
    dictionary after i added a number of new character definitions to
    the IBM_Chars font. No idea why GoScript let this pass during my test
    runs. The error has been corrected in this version.







