Created 1999
Converting ASCII text to Postcript can be done with a number of apps, such as a2ps(1), encript(1) and others. The basic usage of a2ps requires no arguments and will direct the converted output, in 2 column landscape form to the default printer. Techically, the output is directed to lpr(1), which directs it's output to the printer as specified by $PRINTER or to the printer called lp if not defined.
The default operating mode for a2ps is to format stdin as Postcript markup with the text in 2-column format. The generated postscript includes a title area, which is the name of the ascii input file (or the text stdin if a2ps is reading from stdin). A thick border around the edge of the columns is added and the page numbers are included at the bottom of each column. The a2ps conversion process directs the resulting postscript to the default PRINTER.
bash $ a2ps some.txt
The default operational mode for a2ps is 2-columns in landscape orientation. There are a raft of options that all the user to control how the postscript generated by a2ps should appear. The number of columns in the postscript markup is controlled with the --columns option and the orientation with either --landscape or --portait (with --landscape being the default). For example, to print a file in single-column 8pt portait orientation, sending the result to the default printer:
bash $ a2ps --columns=1 --portrait --font-size=8 some.txt
For landscape orientation, simply replace --portrait with --landscape
bash $ a2ps --columns=1 --landscape --font-size=8 some.txt
Todo: Consider subsumeing into either gnu or bash
Stuart Moorfoot © 1999 foo@bund.com.au