next up previous contents
Next: ImageMagick: convert/edit images Up: Utilities Previous: xv: image viewer, editor.   Contents

a2ps: ASCII $\rightarrow $ PostScript translator.

This package translates an ASCII text file to PostScript and prints the document two pages per physical page. By default, output goes to the printer, but many NRC installations have been modified so that it goes to standard output. To redirect output to the printer, a pipe is necessary:
a2ps options filename $\vert$ lpr
Where some common options are:
-i or -ni   Interpret (Do Not interpret) tab, bs, ff characters.
-? or -h    Print help information.
-m          Process this file as a man page.
-n or -nn   Number (Do Not number) the lines in the files.
-p or -np   Print in portrait (landscape) mode.

The default setting is to display two pages across one sheet in landscape format, as shown in Figure 1.2.

Figure 1.2: a2ps landscape output

Two examples of a2ps are:

  1. a2ps -n filename $\vert$ lp
  2. man manpage $\vert$ a2ps -m $\vert$ lp
In the first example, a listing of filename with line numbers added would be sent to the printer. The second example converts a man page to PostScript format and prints it.



Claude Cantin 2010-10-24