TEXTFMT(1)

NAME
textfmt - convert text to POSTSCRIPT® for facsimile transmission

SYNOPSIS
/usr/local/sbin/textfmt [ -O config ] [ options ] [ files... ]

DESCRIPTION
textfmt takes ASCII text and generates formatted POSTSCRIPT® suitable for facsimile transmission. It is usually invoked as a filter program by the sendfax(1) program. Input files may be specified on the command line. If none are given, then textfmt will read from standard input.

By default, textfmt will generate an output document that is formatted with a single vertical column of text, set in a 10 point fixed width font, and with a simple page header that consists of the file name, last modification date, and the page number. Pages are generated according to the default page dimensions (see pagesizes(5F)). When multi-column output is requested, text is set by default with a 7 point fixed width font.

OPTIONS
Many of the options to textfmt have been chosen for compatibility with the Adobe Systems' enscript program; other options are for features that are not provided by enscript.

-1  Set text in one column.

-2  Set text two columns.

-B  Suppress page headers.

-c  Clip long text lines instead of wrapping them at word boundaries near page margins.

-D  Do not use ISO 8859-1 encoding in the generated POSTSCRIPT.

-f font
    Set text using the POSTSCRIPT font named font.

-F fontdir(s)
    Path(s) to afm font files.

-G  Use a gaudy-style page header.

-m cols
    Set text in cols columns.

-Ml=#,r=#,t=#,b=#
    Set the page margins; the default margins are: left and right .25 inch, top .85 inch, bottom .5 inch.

-o  Draw an outline around each column of text; the specified number defines the width of the line that is drawn.

-O config
    Treat config as a configuration parameter specification that is interpreted after reading the configuration file. For example, ``-O Host:fax.example.com'' would set the Host configuration parameter to ``fax.example.com'', overriding any setting in the configuration file.

-p pts
    Set text using fonts with pts point size (integer only).

-r  Set pages rotated by 90 degrees (in ``Landscape mode'').

-R  Set pages unrotated (in ``Portrait mode'').

-s size
    Set the output size according to the named page size. Images are normally created with a system-default page size (usually letter-size pages, 8.5" by 11", for sites in North America). Alternate page sizes are specified symbolically using either the name or abbreviation of an entry in the pagesizes(5F) database; e.g. a3 (ISO A3), a4 (ISO A4), a5 (ISO A5), a6 (ISO A6), b4 (ISO B4), na-let (North American Letter), us-leg (American Legal), us-led (American Ledger), us-exe (American Executive), jp-let (Japanese Letter), and jp-leg (Japanese Legal). Comparisons are case-insensitive and any match of a substring of the full page-size name is sufficient; e.g. ``legal'' would match ``American Legal''.

-U  Reverse collate pages; that is the last page will appear first in the resultant POSTSCRIPT, then the next-to-last page, etc.

-V spacing
    Set the line height; the default height is 1.2 x point size.

CONFIGURATION PARAMETERS
textfmt reads configuration information from the files /usr/local/libdata/hylafax/etc/hyla.conf, and ~/.hylarc; in that order. Configuration files follow the conventions described in hylafax-client(1). The following configuration parameters are recognized:

Tag	Type	Default	Description
Columns	integer		number of columns in formatted output
GaudyHeaders	boolean	No	enable/disable guady page headers
FontMap       string  see below location of ghostscript Fontmap file
FontPath      string  see below directory for font metric files
ISO8859	boolean	Yes	use ISO 8859-1 character encoding
LineWrap	boolean	Yes	wrap/truncate text lines
Orientation	string	portrait	orientation of text on page
OutlineMargin	inches		width of outline line
PageCollation	string	forward	collate pages in forward or reverse direction
PageHeaders	boolean	Yes	enable/disable page headers
PageHeight	float	-	output page height
PageMargins	string	see below	margins for formatted page
PageSize	string	default	output page size from database
PageWidth	float	-	output page width
TabStop	integer		inter-stop setting in characters
TextFont	string	Courier	name of font for setting text
TextLineHeight	inches	-	text formatting line height control
TextPointSize	inches	see below	size to use in setting text
UTF8	boolean	No	input is encoded with UTF-8

The configuration parameters are explained below. Most parameters correspond to a command line option. Parameter values identified above as inches are converted according to the following conventions (where ``#.##'' is a decimal number):

    #.##bp	big point (1in = 72bp)
    #.##cc	cicero (1cc = 12dd)
    #.##cm	centimeter
    #.##dd	didot point (1157dd = 1238pt)
    #.##in	inch
    #.##mm	millimeter (10mm = 1cm)
    #.##pc	pica (1pc = 12pt)
    #.##pt	point (72.27pt = 1in)
    #.##sp	scaled point (65536sp = 1pt)

Unit names can be upper or lower case but no white space is permitted between the number and the unit. Values specified with no unit are interpreted as big points.

Columns
    The number of columns to set text in. (Equivalent to the -m option.)

FontMap
    The directory or directories where the ghostscript Fontmap file(s) are located; multiple paths are separated by a colon (":"). The Fontmap table allows the translation of the descriptive name of the font (as used by the TextFont parameter) to the ghostscript font filenames. Setting the value to "" (zero length string) disables this translation and provides functionality with RIPs other than ghostscript.

FontPath
    The path where Adobe Font Metric (AFM) files are located; by default %rom%Resource/Init/:%rom%lib/:/usr/local/share/ghostscript/10.07.1/Resource/Init:/usr/local/share/ghostscript/10.07.1/lib:/usr/local/share/ghostscript/10.07.1/Resource/Font:/usr/local/share/ghostscript/fonts:/usr/local/share/fonts. (Equivalent to the -F option.)

GaudyHeaders
    Control whether or not to use a gaudy-style page header. (Equivalent to the -G option.)

ISO8859
    Control the use of ISO 8859-1 encoding in the generated POSTSCRIPT (Equivalent to the -D option.)

LineWrap
    Control whether long text lines are wrapped or truncated at word boundaries near the right hand margin. (Equivalent to the -c option.)

Orientation
    Control whether pages are oriented horizontally (``landscape'') or vertically (``portrait''). (Equivalent to the -r and -R options.)

OutlineMargin
    Control whether columns of text have a line drawn around them and the width of the line. Setting this parameter to 0 disables outlines. (Equivalent to the -o option.)

PageCollation
    Control whether the output file has pages collated in the same order as the input file (``forward'') or in reverse order (``reverse). (Equivalent to the -U option.)

PageHeaders
    Control whether page headers are generated. (Equivalent to the -B option.)

PageHeight
    Set the output page height in inches (in inches).

PageMargins
    Set the output page dimensions. Dimensions are specified as string of the form: ``l=#,r=#,t=#,b=#'' where l indicates the left margin, r indicates the right margin, t indicates the top margin, b indicates the bottom margin, and numbers are interpreted as inches. (Equivalent to the -M option.)

PageSize
    Set the output page dimensions by name. (Equivalent to the -s option.)

PageWidth
    Set the output page width in inches (in inches).

TabStop
    Set the tab stop distance; in characters.

TextFont
    Set the descriptive name of font to use for setting text. (Equivalent to the -f option.)

TextLineHeight
    Set the vertical text line height and spacing. (Equivalent to the -V option.)

TextPointSize
    Set the point size to use in setting text. (Equivalent to the -p option.)

UTF8
    Interpret the input according to Unicode (UTF-8).

NOTES
If textfmt is unable to locate font metric information for a font, then it will use a fixed-width metric that is 60% of the text point size; this metric will almost certainly result in incorrectly formatted POSTSCRIPT.

textfmt is distantly related to the lptops program written by Don Beebe.

FILES
/usr/local/libdata/hylafax/etc/hyla.conf	system-wide configuration file
~/.hylarc	per-user configuration file
/usr/local/libdata/hylafax/etc/pagesizes	page size database
%rom%Resource/Init/:%rom%lib/:/usr/local/share/ghostscript/10.07.1/Resource/Init:/usr/local/share/ghostscript/10.07.1/lib:/usr/local/share/ghostscript/10.07.1/Resource/Font:/usr/local/share/ghostscript/fonts:/usr/local/share/fonts   font metric files

SEE ALSO
hylafax-client(1), sendfax(1), pagesizes(5F)