About Us Documentation

Contact Site Map



Man Pages for A2PS


       a2ps  - formats an ascii file for printing on a postscript


       a2ps [ global options ] [ positional options ] [ file1 [ [
       positional options ] ] file2 ...  ]


       a2ps  formats each named file for printing in a postscript
       printer; if no file is given, a2ps reads from the standard
       input. The output is sent to lpr or to stdout.  The format
       used is nice and compact: normally two pages on each phys-
       ical  page, borders surrounding pages, headers with useful
       information (page number, printing date, file name or sup-
       plied  header),  line numbering, etc.  This is very useful
       for making archive listings of programs.

       Global options offered by a2ps are the following:

       -?    Print usage information.

       -b    Force printing  binary  files.  By  default,  binary
             files  printing  is  stopped before second page (see
             -nb option).

       -c    Compact mode for a sequence of  files.  This  option
             allows  the printing of two files in the same physi-
             cal page: last page of the first file  in  the  left
             (or  up)  side  and first page of the second file in
             the right (or down) side. This option is valid  only
             for twinpage mode (two pages per physical page).

       -f    Fold  lines  too large to be printed inside the bor-
             ders (default option).  Max  line  size  depends  on
             format and font size used and whether line numbering
             has been suppressed.

       -h    Print usage information.

             Use the specified file as  the  postscript  prologue
             for a2ps.

       -i    Interpret   TAB,   BS  and  FF  characters  (default
             option). TAB is replaced by enough spaces  to  reach
             next tab stop while BS and FF have their meanings.

       -nb   Don't print binary files (default option). To detect
             such a file we make use of a very simple  heuristic:
             if  the  first page of the file contains at less 75%
             of non-printing  characters,  it's  a  binary  file.
             First page is always printed.

       -nc   Don't  use compact mode for a sequence of files. The
             beginning of each file will  be  printed  in  a  new
             physical page.

       -nf   Truncate lines too large (don't fold).

       -nH   Don't print page headers.

       -ni   Don't interpret TAB, BS and FF characters. They will
             be printed according to -v option.

       -nP   Send output to stdout. Default  is  to  send  output
             directly to the printer

       -nr   Sheet numbering (see -r option) must be continue for
             all files (don't reset on new file). Default option.

       -nv   Replace non-printing characters by a space.

       -n8   Don't  print  non  ascii  characters  as ISO Latin 1
             characters (see -8 option).

             Send output to the named printer. The default option
             is send to the default printer.

       -q    Print files in quiet mode (no summary).

       -r    Reset sheet numbering for each new file.  Sheet num-
             bering is used to number physical pages (sheets)  as
             they  are printed.  Page numbering numbers the logi-
             cal pages, of which there are usually two per physi-
             cal page (i.e. unless -p or -w is specified).

       -s1   Print  output  in  one-sided  mode (only one side of
             each sheet).  The  default  option  depends  on  the

       -s2   Print  output  in two-sided mode (front and backside
             of  each  sheet).  Default  option  depends  on  the

       -tnum Set  TAB  size  to  num (default 8).  This option is
             ignored if -ni is specified (see below).

       -v    Replace non-printing characters  so  that  they  are
             visible  and easy to identify (default option). Con-
             trol characters (ascii codes lower  than  0x20)  are
             printed  like  ^X  for  ctrl-x; the delete character
             (hex 0x3f) is printed as ^?.  Non  ascii  characters
             (with the high bit set) are printed as M- (for meta)
             followed by the character of the low 7 bits. TAB, BS
             and  FF  are handled like non-printing characters if
             -ni option was taken.

       -8    Print non ascii characters (with the high  bit  set)
             as  ISO Latin 1 characters.  By default, these char-
             acters are printed as M- (for meta) followed by  the
             character of the low 7 bits.

       Positional  options  are applied to all files that will be
       found in the rest of the command line. The  -H  option  is
       the  only  exception: it is applied only to the next file.
       Positional options offered by a2ps are the following:

       -1    Print only one page per physical page  (single  page

       -2    Print  two  pages per physical page (twinpage mode),
             side by side or up-down, depending on  the  printing
             mode (landscape or portrait).

       -#num To  get  multiple copies of output, where num is the
             number of copies desired  of  each  file  named.  By
             default, you get only one copy.

       -d    Print the current date and time at the bottom of the
             page. This option is affected by the no  surrounding
             border and the no header options.

       -Fnum Changes  font size to this value. Default values for
             font size are 6.8 in landscape mode, 6.4 in twinpage
             portrait  mode and 9.0 in single page portrait mode.
             Try other sizes if you think that these  values  are
             too small (or big).

       -B    Print using bold font.

             Use  this  text instead of the file name in the page
             headers for printing  next  (and  only  next)  file.
             Additional  -H  directives  can be mixed in with the

       -l    Print files in landscape mode (default option). This
             option may not be used with the -p option.

       -lnum Set  the  lines per page for printing. The font size
             is automatically scaled up  to  fill  in  the  whole
             page. This is useful for printing preformatted docu-
             ments which have a fixed number of lines  per  page.
             The  scaling  of the font size will be suppressed if
             this option is used with option -fnum.  The  minimum
             number of lines per page is set at 40 and maximum is
             at 160. If a number less than 40 is supplied,  scal-
             ing  will  be  turned  off  and a warning message is
             printed on the terminal.

       -m    Understand UNIX manual output ie: 66 lines per page,
             no line numbering and possible bolding and underlin-
             ing sequences.  The  understanding  of  bolding  and
             underlining  is  there  by default even if -m is not

       -n    Output lines are preceded by line numbers,  numbered
             sequentially from 1.

       -nd   Don't  print the current date and time in the footer
             (default option).

       -nn   Don't number output lines (default option).

       -ns   Don't print page surrounding borders.

       -nB   Don't print using bold font.

       -nu   Don't print filename at bottom of page.  Default  is
             to  print  the  filename, centered, at the bottom of
             the page.

       -nL   Don't print user login ID at top of page. Default is
             to print the user's login ID in the upper right cor-
             ner of the page.  (available for Unix systems only)

       -p    Print files in  portrait  mode  (horizontal  pages).
             The default option is to use landscape mode.

       -s    Print page surrounding borders (default option).


       a2ps  generates postcript to its standard output. The user
       could redirect this output to a file, pipe it directly  to
       a  print command (like lpr), or to another filter for fur-
       ther processing. By default, a2ps pipes directly the  out-
       put to the print command (see -P option).

            a2ps -nP file1 > file2

            a2ps -nP -p file1 | psnup -n4 | lpr -l -Pps

       Don't  forget  -l  option  in  lpr  , if you want that lpr
       interprets your  postscript  program  rather  than  merely
       printing it as ascii text.

       This  filter must be used only with text files. Avoid spe-
       cially output from TeX, troff or any other such text  for-




       Evan Kirshenbaum (evan@csli) for the initial version.
       Miguel  Santana (M.) for versions 1.0,
       2.0, 3.0, 4.0, 4.1, 4.2 and 4.3.


       Oscar Nierstrasz ()
       Tim Clark (T.)
       Henk Tullemans ()
       Johan Vromans ()
       Craig Stevenson (craig.r.)
       John Macdonald ()
       Huub van de Wetering ()
       Johan Garpendahl ()
       John Interrante ()
       Larry Barbieri ()
       Chris Adamo ()



Email addresses listed on this site may  NOT be used for unsolicited commercial email.

Ready-to-Run Software, Inc Privacy Statement

Portions (c)Copyright, 1996-2005 by Ready-to-Run Software, Inc
(All rights reserved.)
212 Cedar Cove
Lansing, NY 14882
Phone: 607 533 UNIX (8649)
Fax: 607 533 4002