ARCHIVED: What is enscript, and how can I use it to print text files in PostScript?
In Unix, the enscript command changes a text
file to PostScript format and then sends it to the printer.
The general format for enscript is:
Replace textfilename with the name of the file you want
to convert and print. The [switches] are optional
settings, as follows:
-h |
Suppress printing banner pages |
-P (uppercase P) |
Specify a printer (BSD-compatible systems) |
-d |
Specify a printer (System V systems) |
-2 |
Print two columns per page |
-r |
Rotate the output 90 degrees |
-G |
Print "gaudy" headers, with large page numbers and filenames |
-l (the letter l) |
Simulate a 66-line-per-page line printer |
-p (lowercase p) |
Direct output to standard output or to a file |
Note: You can combine the -2 and
-r options to produce 2up style documents,
with two pages per sheet in landscape orientation.
Examples
On a BSD-compatible system, to convert and print the text file
myfile.txt to printer ps99 without a
banner page, you would enter at the Unix prompt:
To make a PostScript file of the text file myfile.txt and
save it as myfile.ps, you would enter:
To redirect the output of enscript as input for another
command, append another dash to the -p option, for
example:
This will convert myfile.txt into a two-column, rotated
PostScript file with a large header, send it through the
psduplex filter to print on both sides of the paper, and
finally print the result without a banner page to the printer named
ps99.
For more information about enscript, read its
man page by entering the following:
At Indiana University, enscript is installed on
Steel and Libra.
Note: On June 23, 2008, Steel will become read-only; you will be able to access your files there but not change them or add new files. Steel is replaced by IU's newest supercomputer, Quarry. For more, see ARCHIVED: About the Steel retirement.
Last modified on November 01, 2008.







