enscript(1) enscript(1)NAME enscript - convert text files to POSTSCRIPT format for printing SYNOPSIS enscript [-12BGghKklmoqRr] [-Llines] [-ffont] [-Fhfont] [- bheader] [-pout] [spoolopts] [files] DESCRIPTION enscript reads plain text files, converts them to POSTSCRIPT format, and spools them for printing on a POSTSCRIPT printer. Fonts, headings, and limited formatting options may be specified. For example: enscript -paleph boring.txt processes the file called boring.txt for POSTSCRIPT print- ing, writing the output to the file aleph. enscript -2r boring.c prints a two-up landscape listing of the file called boring.c on the default printer (see below). Font specifications have two parts: A font name as known to POSTSCRIPT (for example, Times-Roman, Times-Roman BoldItalic , Helvetica, Courier), and a point size (1 point=1/72 inch). So, Courier-Bold8 is 8 point Courier Bold, Helvetica12 is 12 point Helvetica. The environment variable ENSCRIPT may be used to specify de- faults. The value of ENSCRIPT is parsed as a string of ar- guments before the arguments that appear on the command line. For example ENSCRIPT='-fTimes-Roman8' sets your default body font to 8 point Times Roman. The possible options are: -2 set in two columns. -1 set in one column (the default). -r rotate the output 90 degrees (landscape mode). This is good for output that requires a wide page or for pro- gram listings when used in conjunction with -2. enscript -2r files April, 1990 1
enscript(1) enscript(1)is a nice way to get program listings. -R don't rotate, also known as portrait mode (the de- fault). -G print in gaudy mode: causes page headings, dates, page numbers to be printed in a flashy style, at some slight performance expense. -l simulate a line printer: make pages 66 lines long and omit headers. -B omit page headings. -bheader sets the string to be used for page headings to header. The default header is constructed from the file name, its last modification date, and a page number. -Llines set the maximum number of lines to output on a page. enscript usually computes how many to put on a page based on point size, and may put fewer per page than requested by lines. -ffont sets the font to be used for the body of each page. Defaults to Courier10, unless two column rotated mode is used, in which case it defaults to Courier7. -Fhfont sets the font to be used for page headings. Defaults to Courier-Bold10. -pout causes the POSTSCRIPT file to be written to the named file rather than being spooled for printing. As a spe- cial case, -p - will send the POSTSCRIPT to the stan- dard output. -g enables the printing of files containing non-printing characters. Any file with more than a small number of non-printing characters is suspected of being garbage and is not printed unless this option is used. -m sends mail via mail(1) after the files have been print- ed. By default, no mail is sent upon normal completion of the print request. -o If enscript cannot find characters in a font, the miss- ing characters are listed. 2 April, 1990
enscript(1) enscript(1)-q causes enscript to be quiet about what it is doing. enscript won't report about pages, destination, omitted characters, and so forth. Fatal errors are still re- ported to the standard error output. -k enables page prefeed (if the printer supports it). This allows simple documents (e.g., program listings in one font) to print somewhat faster by keeping the printer running between pages. -K disable page prefeed (the default). -h suppress printing of job burst page. ENVIRONMENT ENSCRIPT string of options to be used by enscript. PSLIBDIR path name of a directory to use instead of /usr/lib/ps for enscript prologue and font metric files. PSTEMPDIR path name of temporary directory to use in- stead of XPSTEMDIRX of spooled temporary files. LPDEST the name of a printer for lp to use. If LPDEST is not set, enscript will spool to a printer class named PostScript. FILES /usr/bin/enscript /usr/lib/ps/*.afm font metrics files. /usr/lib/ps/enscript.pro prologue for enscript files. SEE ALSO cancel(1), lp(1), lpr(1), lprm(1), lpstat(1), pr(1), ps630(1), getopt(3). FEATURES Options and the ENSCRIPT environment string are parsed in getopt(3) fashion. BUGS Long lines are truncated. Line truncation may be off by a little bit as printer margins vary. There should be a ``wrap'' option and multiple (truncated or wrapped) columns. April, 1990 3