PSTEXT(1) MachTen Reference Manual PSTEXT(1)

NAME
pstext - generate formatted PostScript for text files

SYNOPSIS
pstext [-H [hfile]] [-h string] [-2Lbv] [-f font] [-s size] [-l spacing]
[-w clip] [-W wrap] [-M [left], [right], [top], [bottom]] [-P
[width], [height]] [file ...]

DESCRIPTION
Pstext generates PostScript for the specified file(s), or standard input,
to the standard output. The default output format is single column in
portrait orientation. Available options include: double column, land-
scape orientation, a page header, and a box outlining each text column.

The following options can be applied:

-H hfile
Place a header at the "top" of each page, as defined by the
PostScript specification in the file hfile. If hfile is not de-
clared, /usr/share/ps/generic.hdr is used; it defines a generic
header consisting of the file’s name, write date and time, and a
page count.

-h string
Use string in place of the file name in the page header.

-2 Output in double column format.

-L Output in landscape orientation.

-b Draw a box around each text column.

-f font
Use the font named font instead of Courier.

-s size
Use size as the font size; the default is 10 if single column, 7
if double.

-l spacing
Use spacing as the line spacing; the default is the font size
plus one.

-w clip
Truncate each text line in excess of clip characters.

-W -wrap
Fold each text line in excess of wrap characters onto the suc-
ceeding output line(s).

-M left,right,top,bottom
Defines the margin indentations, applied in the declared orienta-
tion, in units of a point. The default is ’36,36,36,36’ for a
0.5 inch margin all around. Margins not specified will assume
the corresponding default.

-P width,height
Defines the physical dimensions of the output page in units of a
point. The default is ’612,792’ for a normal 8.5 by 11 (inch)
sheet. Dimensions not specified will assume the corresponding

default.

-v Report the name of each file as it is processed.

A point is defined to be 1/72 inch; point measurements should be entered
as integers unless otherwise noted.

NOTES
The PostScript description for a customized page header must include the
definition of needed variables and a procedure named pageHeader, which
takes four string arguments on the stack: (filename) (date) (time)
(pagenumber). Unused arguments must be popped from the stack. pageHeader
should take advantage of the following six variables which define the
boundary and size (in points) of the visible image. They are calculated
in terms of the page (P) dimensions and margins (M):

ImageB Image bottom = Mbottom

ImageH Image height = ( Portrait ? Pheight : Pwidth ) - ( Mbottom
+ Mtop)

ImageL Image left = Mleft

ImageR Image right = ImageL + ImageW

ImageT Image top = ImageB + ImageH

ImageW Image width =
( Portrait ? Pwidth : Pheight ) - ( Mleft + Mright)

The following support procedures are also available:

box Sets the current path to a rectangle, sized and located
per the arguments. The five stack arguments are: width
height thickness left bottom. Box should be followed by
stroke to draw the outline, or shade to fill the rectan-
gle.

centerText Prints a string centered within a specified region. The
four stack arguments are: x y width (string).

shade Fills in the area bounded by the current path. It expects
one stack argument, gray_level, a floating-point number
between 0 and 1.

An example custom header may be found in /usr/share/ps/Tenon.hdr.

FILES
/usr/bin/pstext
/usr/share/ps/generic.hdr

MachTen May 18, 1992 2