Version 8 (modified by trac, 17 years ago) ( diff )



The optional "LPRng or CUPS" build-time dependency is not mentioned in the book. Without the "lpr" program, A2PS will think that the proper way to send files to printers is "cat JOB > PRINTER".

The i18n-fonts tarball contains the following font families:

  • College
  • PT Courier Bold (aka CourierISOC)
  • Textbook

They are used only for printing Cyrillic texts. You can omit the related instructions if you don't need this functionality. All other supported and working encodings use either the standard PostScript fonts built into any PostScript printer, or Ogonki fonts that come in the a2ps-4.13b.tar.gz tarball.

The encoding of the input text can be specified using the -X parameter. To get the list of available input encodings, type:

a2ps --list=encodings

Problem 1: UTF-8 is not in the list. This makes A2PS unusable for printing UTF-8 encoded text files. One workaround is to convert the text file from UTF-8 to some supported encoding that still contains all needed characters (koi8-r in the example below), as illustrated below:

iconv -f UTF-8 -t koi8-r utf8-encoded-file.txt | \
    LC_ALL=C a2ps -o -X koi8-r

The LC_ALL=C environment variable is needed because if the document encoding and the locale encoding are incompatible, a2ps misprints the date and the "Page 1/1" header. LC_TIME=C LC_MESSAGES=C are the minimum subset of locale categories to override.

The workaround above does not work if there is no supported 8-bit encoding that contains all needed characters.

Using PAPS instead of A2PS for printing UTF-8 encoded text files is a better solution.

Problem 2: ISO-8859-7 is listed as supported but actually does not work (produces "M-a" instead of the greek letter "alpha", and so on). A solution is described at Another option is to use a different program (e.g. PAPS) for printing.


Note: See TracWiki for help on using the wiki.