Converts text files to PostScript format for printing.
enscript [ -1 -2 -c -g -k -l -m -o -q -r -B -G -K -R ] [ -b Header ] [ -f Font ] [ -f0 CodeSet:Font ] [ -f1 CodeSet:Font ] [ -p Out ] [ -F Hfont ] [ -F0 CodeSet:Font ] [ -F1 CodeSet:Font ] [ -L Lines ] [ -M MediaName ] [ -X CodesetName ] [ SpoolerOptions ] [ File ... ]
The enscript command reads a text file, converts it to PostScript format, and spools the file for printing on a PostScript printer. You can use this command to specify fonts, headings, limited formatting options, and spooling options.
For example:
enscript -daleph bubble.txt
prints a copy of the bubble.txt file on the printer called aleph, and
enscript -2r finder.c
prints a two-up landscape listing of the finder.c file on the default printer.
The ENSCRIPT environment variable can be used to specify defaults. The value of ENSCRIPT is parsed as a string of arguments before the arguments that are displayed on the command line. For example:
ENSCRIPT='-fTimes-Roman8'
sets your default body type size and font to 8-point Times Roman.
Information containing various media sizes for the psdit command and the enscript command are contained in the file /usr/lib/ps/MediaSizes.
The information required for each entry in the MediaSizes file can be obtained from the PostScript Printer Description, or PPD, file that matches the PostScript printer used with TranScript. The PPD files are available from Adobe Systems, Incorporated. The measurements extracted from the PPD files are expressed in a printer's measure called points. A printer's point is 1/72 of an inch.
Any line in the MediaSizes file beginning with an ASCII * (asterisk) is ignored when matching media-size names provided on the command line to the enscript command and the psdit command.
Each entry in the MediaSizes file contains either 8 or 9 fields. The first 8 fields are required for all entries. The 9th field is optional. Fields are separated by white space. The fields for each entry are as follows:
The following table shows examples of field entries in the MediaSizes file:
Name | Width | Depth | llx | lly | urx | ury | Page- Region- Name | Paper- Tray- Name |
---|---|---|---|---|---|---|---|---|
Letter | 612 | 792 | 18 | 17 | 597 | 776 | Letter |
|
Legal | 612 | 1008 | 18 | 17 | 597 | 992 | Legal |
|
The PostScript Fonts for Transcript table shows the fonts available for the enscript command. The Font Name is specified with the -F and -f encscipt command flags. The alphabetic characters are case-sensitive:
Font Name | Font Family |
---|---|
AvantGarde-Book | AvantGarde |
AvantGarde-Demi | AvantGarde |
AvantGarde-DemiOblique | AvantGarde |
AvantGarde-BookOblique | AvantGarde |
Bookman-Demi | Bookman |
Bookman-DemiItalic | Bookman |
Bookman-Light | Bookman |
Bookman-LightItalic | Bookman |
Courier | Courier |
Courier-Bold | Courier |
Courier-BoldOblique | Courier |
Courier-Oblique | Courier |
Garamond-Bold | Garamond |
Garamond-BoldItalic | Garamond |
Garamond-Light | Garamond |
Garamond-LightItalic | Garamond |
Helvetica | Helvetica |
Helvetica-Bold | Helvetica |
Helvetica-Oblique | Helvetica |
Helvetica-BoldOblique | Helvetica |
Helvetica-Narrow | Helvetica |
Helvetica-Narrow-Bold | Helvetica |
Helvetica-Narrow-BoldOblique | Helvetica |
Helvetica-Narrow-Oblique | Helvetica |
LubalinGraph-Book | Lubalin |
LubalinGraph-BookOblique | Lubalin |
LubalinGraph-Demi | Lubalin |
LubalinGraph-DemiOblique | Lubalin |
Miryam-Iso | Miryam Iso |
Miryam-IsoBold | Miryam Iso |
Miryam-IsoBoldItalic | Miryam Iso |
Miryam-IsoItalic | Miryam Iso |
NarkissimIso | Narkissim Iso |
NarkissimIso-Bold | Narkissim Iso |
NarkissimIso-BoldItalic | Narkissim Iso |
NarkissimIso-Italic | Narkissim Iso |
NarkissTamIso | Narkiss Tam Iso |
NarkissTamIso-Bold | Narkiss Tam Iso |
NarkissTamIso-BoldItalic | Narkiss Tam Iso |
NarkissTamIso-Italic | Narkiss Tam Iso |
NewCenturySchlbk | NewCentury |
NewCenturySchlbk-Bold | NewCentury |
NewCenturySchlbk-Italic | NewCentury |
NewCenturySchlbk-Roman | NewCentury |
Optima | Optima |
Optima-Bold | Optima |
Optima-BoldOblique | Optima |
Optima-Oblique | Optima |
Palatino-Bold | Palatino |
Palatino-BoldItalic | Palatino |
Palatino-Italic | Palatino |
Palatino-Roman | Palatino |
Rokaa | Rokaa |
Rokaa-Bold | Rokaa |
Rokaa-BoldItalic | Rokaa |
Rokaa-Italic | Rokaa |
Setting | Setting |
Setting-Bold | Setting |
Setting-BoldItalic | Setting |
Setting-Italic | Setting |
ShalomIso | ShalomIso Iso |
ShalomIso-Bold | ShalomIso Iso |
ShalomIso-BoldItalic | ShalomIso Iso |
ShalomIso-Italic | ShalomIso Iso |
Souvenir-Demi | Souvenir |
Souvenir-DemiItalic | Souvenir |
Souvenir-Light | Souvenir |
Souvenir-LightItalic | Souvenir |
Times-Bold | Times |
Times-BoldItalic | Times |
Times-Italic | Times |
Times-Roman | Times |
Typing | Typing |
Typing-Bold | Typing |
Typing-BoldItalic | Typing |
Typing-Italic | Typing |
Symbol | (none) |
ZapfChancery-MediumItalic | Zapf |
ZapfDingbats | (none) |
-1 | Sets in 1 column (the default). |
-2 | Sets in 2 columns. |
-c | Truncates (cuts) lines that are longer than the page width. Normally, long lines are wrapped around to the following line on the page. |
-g | Performs no function, but the -g flag is still accepted for backwards compatibility. |
-k | Enables page prefeed (if the printer supports it). This allows simple documents (such as program listings in a single font) to print somewhat faster by keeping the printer running between pages. |
-l | Simulates a line printer printing pages 66 lines long and omitting headers. |
-m | Sends mail after the files are printed. |
-o | Lists the missing characters if the enscript command cannot find characters in a font. |
-q | Causes the enscript command to not report about what it is doing. The enscript command cannot report on pages, destination, omitted characters, and so on. Fatal errors are still reported to the standard error output. |
-r | Rotates the output 90 degrees (landscape mode). Use this flag for
output that requires a wide page or for program listings when used in conjunction
with the -2 flag. The following example shows one way
to get program listings:
enscript -2r File . . . |
-B | Omits page headings. |
-G | Prints in gaudy mode, causing page headings, dates, and page numbers to be printed in a flashy style, at some slight performance expense. |
-K | Disables page prefeed (the default). |
-R | Prints in portrait mode (unrotated), which is the default. |
-bHeader | Sets the string to be used for page headings to the value of the Header variable. The default header is constructed from the file name, its last modification date, and a page number. |
-fFont | Sets the font to be used for the body of each page. The default is
Courier10, unless the two-column rotated mode is used, in which case it defaults
to Courier7.
Notes:
|
-f0 Codeset:Font | Sets the character codeset name, which is written into the PostScript file, and the SBCS font to use for the body of each page. The default is determined by the /usr/lib/ps/transcript.conf configuration file for each locale. |
-f1 Codeset:Font | Sets the character codeset name, which is written into the PostScript file, and the MBCS font to use for the body of each page. The default is determined by the /usr/lib/ps/transcript.conf configuration file for each locale. |
-pOut | Causes the PostScript file to be written to the named file rather
than being spooled for printing. As a special case, entering the following
will send the PostScript file to standard output:
-p - |
-FHfont | Sets the font to be used for page headings. The default is Courier
Bold10.
Note
|
-F0 Codeset:Font | Sets the character codeset name, which is written into the PostScript file, and the SBCS font to use for the header of each page. The default is determined by the /usr/lib/ps/transcript.conf configuration file for each locale. |
-F1 Codeset:Font | Sets the character codeset name, which is written into the PostScript file, and the MBCS font to use for the header of each page. The default is determined by the /usr/lib/ps/transcript.conf configuration file for each locale. |
-LLines | Sets the maximum number of lines to print on a page. The enscript command usually computes how many lines to put on a page based on point size. (It might put fewer per page than requested by the -L flag.) |
-MMediaName | Specifies a media name to use to determine the amount of imageable area on the paper. The name provided is matched against entries in the MediaSizes file. For instance, -M legal would request a legal size of paper as the imageable area. If this flag is not used, the default size is letter size, which is 8.5 inches wide by 11.0 inches deep (21.6 cent. wide by 27.9 cent. deep). |
-XCodesetName | Specifies the code set for the input data. By default, the input code set is determined by the nl_langinfo subroutine. If this flag is used, the codeset is determined by the CodesetName. |
All characters not found in a font will be replaced with the character ? (question mark). For a complete list of characters that were not found, use the -o flag. The NLSvec file provides information about character translation.
The col command, eqn command, lp command, managefonts command, nroff command, pic command, pr command, ps630 command, psdit command, refer command, tbl command, troff command.
The nl_langinfo subroutine.
NLSvec File provides information about character translation.