Scroll to navigation

A2PS(1) User Commands A2PS(1)

NAME

a2ps - format files for printing on a PostScript printer

SYNOPSIS

a2ps [OPTION]... [FILE]...

DESCRIPTION

Convert FILE(s) or standard input to PostScript. By default, the output is sent to the default printer. An output file may be specified with -o.

Mandatory arguments to long options are mandatory for short options too. Long options marked with `*' require a yes/no argument, corresponding short options stand for `yes'.

Tasks:

display version
display this help
report guessed types of FILES
report the full path of library files named FILES
report the full path of library files matching FILES
display default settings and parameters
detailed list on TOPIC (delegations, encodings, features, variables, media, ppd, printers, prologues, style-sheets, user-options)

After having performed the task, exit successfully. Detailed lists may provide additional help on specific features.

Global:

be really quiet
set verbosity on, or to LEVEL
-=, --user-option=OPTION
use the user defined shortcut OPTION
enable debugging features
unset variable KEY or set to VALUE

Sheets:

use output medium NAME
print in landscape mode
print in portrait mode
number of columns per sheet
number of rows per sheet
first fill (DIRECTION=) rows, or columns
-1, -2, ..., -9
predefined font sizes and layouts for 1..9 virtuals
align separate files according to MODE (fill, rank page, sheet, or a number)
print borders around columns
define an interior margin of size NUM

The options -1.. -9 affect several primitive parameters to set up predefined layouts with 80 columns. Therefore the order matters: `-R -f40 -2' is equivalent to `-2'. To modify the layout, use `-2Rf40', or compose primitive options (`--columns', `--font-size' etc.).

Virtual pages:

precede each NUM lines with its line number
alias for --line-numbers=5
use font SIZE (float) for the body text
scale the font to print NUM lines per virtual
scale the font to print NUM columns per virtual
process FILE as a man page (same as -L66)
set tabulator size to NUM

--non-printable-format=FMT specify how non-printable chars are printed

Headings:

no page headers at all
set page header
print TEXT under every page
set page title to TITLE
set left and right page title to TEXT

--right-title[=TEXT]

set sheet footers to TEXT

--footer[=TEXT]

--right-footer[=TEXT]

The TEXTs may use special escapes.

Input:

select the pages to print
cut long lines
interpret tab, bs and ff chars
specify the eol char (TYPE: r, n, nr, rn, any)
use input encoding NAME
set the name of the job
set the name of the input file stdin
force binary printing
delegate files to another application
generate a table of content

When delegations are enabled, a2ps may use other applications to handle the processing of files that should not be printed as raw information, e.g., HTML PostScript, PDF etc.

Pretty-printing:

enable pretty-printing (set style to LANG)
set pretty printing highlight LEVEL LEVEL can be none, normal or heavy
alias for --highlight-level=heavy
level of comments stripping

Output:

leave output to file FILE. If FILE is `-', leave output to stdout.
override the usual version control
override the usual backup suffix
send output to printer NAME
send output to the default printer (this is the default behavior)

PostScript:

include FILE.pro as PostScript prologue
automatic PPD selection or set to KEY
print NUM copies of each page
set the duplex MODE (`1' or `simplex', `2' or `duplex', `tumble')
pass a page device definition to output
pass a statusdict definition to the output
enable page prefeed
disable page prefeed

By default a2ps is tuned to do what you want to, so trust it. To pretty print the content of the `src' directory and a table of content, and send the result to the printer `lw',

$ a2ps -P lw --toc src/*

To process the files `sample.ps' and `sample.html' and display the result,

$ a2ps -P display sample.ps sample.html

To process a mailbox in 4 up,

$ a2ps -=mail -4 mailbox

To print as a booklet on the default printer, which is duplex capable,

$ a2ps -=book paper.dvi.gz -d

FILES

a2ps reads several files before the command line options. In order, they are:

1.
The system configuration file (usually /usr/local/etc/a2ps.cfg) unless you have defined the environment variable A2PS_CONFIG, in which case a2ps reads the file it points to;

2.
the user's home configuration file ($HOME/.a2ps/a2psrc)

3.
the file .a2psrc in the current directory.

See the info manual for more information, including a description of the configuration file format.

AUTHOR

Written by Akim Demaille, Miguel Santana, and Reuben Thomas.

REPORTING BUGS

Report bugs to: bug-a2ps@gnu.org
GNU a2ps home page: <https://www.gnu.org/software/a2ps/>
General help using GNU software: <https://www.gnu.org/gethelp/>

COPYRIGHT

Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

a2ps(1), card(1), fixps(1), pdiff(1).

The full documentation for a2ps is maintained as a Texinfo manual. If the info and a2ps programs are properly installed at your site, the command

info a2ps

should give you access to the complete manual.

June 2023 GNU a2ps 4.15.4