Version 2 (modified by 16 years ago) ( diff ) | ,
---|
A2PS
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 make_fonts_map.sh script from i18n-fonts uses obsolete syntax for the "sort" program and thus fails with Coreutils-5.93. Modify this script before installation in order to avoid this problem:
sed -i 's/+0 -1/-k 1,2/' make_fonts_map.sh
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 output.ps -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 http://cgi.di.uoa.gr/~rouvas/a2ps-greek/. Another option is to use a different program (e.g. PAPS) for printing.