A2PS(1)
๐ NAME ๐
a2ps โ bestie, it formats your files for printing on a PostScript printer โจ
๐ธ SYNOPSIS ๐ธ
a2ps [OPTION]... [FILE]...
๐ฆ DESCRIPTION ๐ฆ
Okay so here's the vibe: a2ps converts FILE(s) โ or standard input if you're feeling mysterious โ into PostScript, no cap. By default the output just goes straight to the default printer like it's sliding into the DMs. Wanna aim it somewhere specific? Pass an output file with -o. ๐
Real talk though, and this part is important so listen up: mandatory arguments to long options are mandatory for short options too. And long options marked with * are the ones that need a yes/no argument โ the matching short options stand for yes, periodt.
๐ Tasks ๐
--versionโ displays the version, obviously ๐--helpโ displays this help--guessโ reports the guessed types of FILES--whichโ reports the full path of library files named FILES--globโ reports the full path of library files matching FILES--list=defaultsโ displays default settings and parameters--list=TOPICโ gives you a detailed list on TOPIC, and the topics are:delegations,encodings,features,variables,media,ppd,printers,prologues,style-sheets,user-options
So after it's done with the task, it exits successfully, slay. And lowkey the detailed lists can give you extra help on specific features โ iykyk.
๐ฅ Global ๐ฅ
-q,--quiet,--silentโ be really quiet ๐คซ-v,--verbose[=LEVEL]โ turn verbosity on, or crank it to LEVEL-=,--user-option=OPTIONโ use the user defined shortcut OPTION--debugโ enables debugging features (for when you gotta see everything ๐)-D,--define=KEY[:VALUE]โ unset variable KEY, or set it to VALUE
๐ Sheets ๐
-M,--medium=NAMEโ use output medium NAME-r,--landscapeโ print in landscape mode-R,--portraitโ print in portrait mode--columns=NUMโ number of columns per sheet--rows=NUMโ number of rows per sheet--major=DIRECTIONโ first fill (DIRECTION=) rows, or columns-1,-2, ...,-9โ predefined font sizes and layouts for 1..9 virtuals-A,--file-align=MODEโ align separate files according to MODE (fill, rank page, sheet, or a number)-j,--borders*โ print borders around columns--margin[=NUM]โ define an interior margin of size NUM
Heads up bestie, this one's a little sneaky: the options-1..-9affect several primitive parameters to set up predefined layouts with 80 columns. So the order matters:-R -f40 -2is equivalent to-2. If you actually wanna modify the layout, use-2Rf40, or compose primitive options (--columns,--font-sizeetc.). Don't get caught lacking on the ordering ๐ญ
๐ง Virtual pages ๐ง
--line-numbers=NUMโ precede each NUM lines with its line number-Cโ alias for--line-numbers=5-f,--font-size=SIZEโ use font SIZE (float) for the body text-L,--lines-per-page=NUMโ scale the font to print NUM lines per virtual-l,--chars-per-line=NUMโ scale the font to print NUM columns per virtual-m,--catmanโ process FILE as a man page (same as-L66)-T,--tabsize=NUMโ set tabulator size to NUM--non-printable-format=FMTโ specify how non-printable chars are printed
๐ Headings ๐
-B,--no-headerโ no page headers at all ๐-b,--header[=TEXT]โ set page header-u,--underlay[=TEXT]โ print TEXT under every page--center-title[=TEXT]โ set page title to TITLE--left-title[=TEXT]โ set left and right page title to TEXT--right-title[=TEXT]โ (same deal as above, it's the pair ๐ซถ)--left-footer[=TEXT]โ set sheet footers to TEXT--footer[=TEXT]โ (also part of the footer trio)--right-footer[=TEXT]โ (and the last of the trio)
Oh and FYI, the *TEXT*s may use special escapes โจ
๐ Input ๐
-a,--pages[=RANGE]โ select the pages to print-c,--truncate-lines*โ cut long lines-i,--interpret*โ interpret tab, bs and ff chars--end-of-line=TYPEโ specify the eol char (TYPE:r,n,nr,rn,any)-X,--encoding=NAMEโ use input encoding NAME-t,--title=NAMEโ set the name of the job--stdin=NAMEโ set the name of the input file stdin--print-anyway*โ force binary printing (living dangerously, love that)-Z,--delegate*โ delegate files to another application--toc[=TEXT]โ generate a table of content
So when delegations are enabled, a2ps may use other applications to handle the processing of files that should not be printed as raw information โ think HTML PostScript, PDF etc. Iconic teamwork honestly ๐
๐ Pretty-printing ๐
-E,--pretty-print[=LANG]โ enable pretty-printing (set style to LANG)--highlight-level=LEVELโ set pretty printing highlight LEVEL; LEVEL can benone,normalorheavy-gโ alias for--highlight-level=heavy--strip-level=NUMโ level of comments stripping
โญ Output โญ
-o,--output=FILEโ leave output to file FILE. And if FILE is-, leave output to stdout. Cute, right?--version-control=WORDโ override the usual version control--suffix=SUFFIXโ override the usual backup suffix-P,--printer=NAMEโ send output to printer NAME-dโ send output to the default printer (this is the default behavior, bestie, it's giving main character energy)
๐ง PostScript ๐ง
--prologue=FILEโ includeFILE.proas PostScript prologue--ppd[=KEY]โ automatic PPD selection, or set to KEY-n,--copies=NUMโ print NUM copies of each page-s,--sides=MODEโ set the duplex MODE (1orsimplex,2orduplex,tumble)-S,--setpagedevice=K[:V]โ pass a page device definition to output--statusdict=K[:[:]V]โ pass a statusdict definition to the output-k,--page-prefeedโ enable page prefeed-K,--no-page-prefeedโ disable page prefeed
Okay and here's the thing โ by default a2ps is tuned to do what you want to, so trust it. ๐ฏ But here are the examples anyway, because they're lowkey iconic:
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 ๐
So a2ps reads several files before the command line options. In order, they are:
- The system configuration file (usually
/usr/local/etc/a2ps.cfg) โ unless you've defined the environment variableA2PS_CONFIG, in which casea2psreads the file it points to; - the user's home configuration file (
$HOME/.a2ps/a2psrc); - the file
.a2psrcin the current directory.
See the info manual for more information, including a description of the configuration file format. Go read it, it's good for you ๐
๐ AUTHOR ๐
Written by Akim Demaille, Miguel Santana, and Reuben Thomas. Kings, honestly.
๐ฆ 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 ยฉ 2025 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. (Seriously, none, don't come for them ๐ญ)
๐ธ 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. Slay ๐ซถ
And that's the whole thing, bestie โ this was GNU a2ps 4.15.7, dated December 2025. Go print something pretty โจ๐๐
๐ฆ where this page comes from
- arch rolling: a2ps 4.15.8-1 ยท GPL-3.0-or-later
- nixpkgs unstable: a2ps 4.15.8
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms