Notice! This document is currently in Archived status.
The content of this document may be incorrect or out dated.

Command Line Printing: Printing Text Files as PostScript With Enscript

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:

enscript -Pps99 -h myfile.txt

To make a PostScript file of the text file myfile.txt and save it as myfile.ps, you would enter:

enscript -pmyfile.ps myfile.txt

To redirect the output of enscript as input for another command, append another dash to the -p option, for example:

enscript -2rG -p- myfile.txt | psduplex | lpr -Pps99 -h

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:

man enscript
 

Last modified: 2015/04/21 10:57:37.512512 GMT-4 by curtis.f.smith.1
Created: 2007/10/08 09:36:11.950000 GMT-4 by brian.r.brinegar.1.

Categories

Search

Type in a few keywords describing what information you are looking for in the text box below.

Admin Options: Edit this Document