Name

enscript

Synopsis

enscript [options] [files]

Converts text files to PostScript for output to a printer or file. This conversion is necessary when printing text files from the command line to most laser printers, for example, because most laser printers are PostScript devices. enscript is a feature-rich application that allows you to modify the printed output in many ways. The following descriptions and examples cover enscript’s basic operation; for a complete description, refer to enscript’s manpage.

Used with no arguments, enscript receives text from standard input and sends it to the default printer. Otherwise, enscript converts the text files specified in files, and directs output to a named printer, file, or standard output as specified by options (or the default printer, if no options are specified).

Common options

-# n, -n n, --copies= n

Print n copies of every page.

-a pages, --pages= pages

Print selected pages, as specified in the following format:

begin - end

Print from page number begin to page number end.

- end

Print until page number end.

begin -

Print from page number begin to the last page.

page

Print only page number page.

odd

Print only the odd numbered pages.

even

Print only the even numbered pages.

-B, --no-header

Don’t print page headers.

-b header, --header= header

Print header at the top of each page. This header can contain formatting directives. See the manpage for details.

-c, --truncate-lines

Cut off long lines instead of wrapping.

-d printer, -P printer ...

Get Mac OS X Tiger in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.