PSTEXT

Section: User Commands (1)
Updated: November 22, 1991
Index Return to Main Contents
 

NAME

pstext - convert plain text to PostScript  

SYNOPSIS

pstext [ -l ] [ -ld ] [ -p ] [ -d ] [ -cy ] [ -cn ] [ -s pointsize ] [ -f fontname ] [ -n numberoflines ] [ -T printertype ] [ -t tabstring ] [ -i pointoffset ] [ -x[lrp] pointdist ] [ -y[tbp] pointdist ] [ -v ] [ - ] [ file ... ]
 

DESCRIPTION

Pstext reads each file in sequence converts it from plain text to PostScript and writes it to the standard output, if no files are specified it reads from the standard input. Backspaces move the current point back the width of the underscore (_) in the current font and pointsize. Form feeds cause text to begin printing on a new page, in the case of dual page mode the next page may actually be on the same piece of paper. Separate files always begin on a new page. Tabs are set every width of the current tabstring (see -t option below).

A reasonable amount of care has been taken to keep the PostScript generated as generic as possible.

The Apple LaserWriter, one of the more common PostScript printers, has the following fonts available: (note: the fonts must be specified exactly as shown.)

AvantGarde-Book               AvantGarde-BookOblique
AvantGarde-Demi               AvantGarde-DemiOblique
Bookman-Demi                  Bookman-DemiItalic
Bookman-Light                 Bookman-LightItalic
Courier                       Courier-Bold
Courier-BoldOblique           Courier-Oblique
Helvetica                     Helvetica-Bold
Helvetica-BoldOblique         Helvetica-Narrow
Helvetica-Narrow-Bold         Helvetica-Narrow-BoldOblique
Helvetica-Narrow-Oblique      Helvetica-Oblique
NewCenturySchlbk-Bold         NewCenturySchlbk-BoldItalic
NewCenturySchlbk-Italic       NewCenturySchlbk-Roman
Palatino-Bold                 Palatino-BoldItalic
Palatino-Italic               Palatino-Roman
Symbol                        Times-Bold
Times-BoldItalic              Times-Italic
Times-Roman                   ZapfChancery-MediumItalic
ZapfDingbats

The options are:

-l
Text will be displayed in landscape mode.
-ld
Text will be displayed in landscape and dual page mode.
-d
Text will be displayed in portrait and dual page mode.
-p
Text will be displayed in portrait mode (default).
-cy
Font checking is turned on. If a font can't be found Courier is used (default).
-cn
Font checking is turned off. No attempt is made to check validity of font.
-s pointsize
Text will be displayed in the given pointsize (12 default). Fractional pointsizes are acceptable.
-f fontname
Text will be displayed in the give font if available (Courier default). Any font may be specified, if the printer (or whatever is displaying the PostScript) can not find the font Courier will be used anyway. Fonts commonly available are Courier-Bold, Helvetica, Helvetica-Bold, Times-Roman Times-Bold, Times-Italic and Symbol. There are obviously more depending on your output device.
-i pointoffset
Text will be offset pointoffset points from where text normally starts. Note: this does not mean from the edge of the page, there is an offset from there already.
-n numberoflines
Text will be displayed with numberoflines per page. This takes precedence over -s flag.
-t tabstring
Tabs will be the width of tabstring in the current pointsize and font. The default tabstring is 00000000, meaning that tabstops are placed every width of 8 0's. Tabs will go to the nearest forward tab stop. 0000000 is used so columns of numbers will line up nicely.
-T printertype
Sets up default margins, page size and font checking information for printertype subsequent flags (-x[lrp], -y[tbp], etc) will modify these. The printertype is not case sensitive, currently the printer types supported are:
alwnt        Apple LaserWriter NT
alwntx       Apple LaserWriter NTX (same as alwnt)
next         Next's 400 dpi laser printer
hpiii        HP LaserJet III with PostScript Cartridge

-x[lrp] pointdist
The x margins can be changed from their default settings to pointdist The flags are xl xr and xp standing for x left margin, x right margin, x page size respectively. The defaults are 18, 14, and 612 respectively.
-y[tbp] pointdist
The x margins can be changed from their default settings to pointdist The flags are yt yb and yp standing for y top margin, y bottom margin, y page size respectively. The defaults are 8, 13, and 792 respectively.

 

SEE ALSO

PostScript Language Reference Manual by Adobe Systems Inc.  

BUGS

In some systems (Next for example) findfont will look for fonts in more places than just those that FontDirectory gives. In these cases pstext output may not print in the desired font and will print in Courier instead. There are a couple of options in dealing with this. Specifying the -cn option is simplest. You could also modify the C code so the line containing the FontDirectory is not sent, or some other command is used (SharedFontDirectory in the case of a Next). Or you can comment out the line in the PostScript output before you send it to the printer. Be warned that omitting the line all together will mean that if you specify a font that can't be found the may not print at all in any font.

The default margins have been set to work for an Apple LaserWriter NTX these may need to be reset for devices whose margins differ. No checking is done of user specified margins, pstext assumes you know more about your printer than pstext does.

If the file printed is an exact multiple of the number of lines per page a trailing blank page is produced. This is due the first line on the new page being set up before any text is on the page when the end of file is reached there could be something on the page so it is printed. To get around this problem would take more overhead than I would like a simple filter to have. In general only nroffed documents seem to have this problem often, deleting the last blank line is generally an easy option in this case.

 

AUTHOR

Dan Judd, Michigan State University

This program is freely redistributable, and is not to be sold.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 06:56:24 GMT, December 12, 2024