6. Print in Arabic

Printing Arabic documents can be a tricky thing. To print plain text documents you can use textbdf2ps.pl. Currently, the latest test version of the script includes the Arabic patch. It can be downloaded here: http://oldrus-ispell.sourceforge.net/txtbdf2ps.html

$ txtbdf2ps.pl -UTF-8 \
               -bidi \
               -bdf=/PATH/PATH/PATH/10x21.bdf \
               -text=arabic_file > output.ps [5]
$ lpr output.ps 
  

You can also use TrueType fonts, by replacing the '-bdf' option with '-font' followed by the path to the TrueType font.

$ txtbdf2ps.pl -UTF-8 \
               -bidi \
               -font=/PATH/PATH/PATH/font.ttf \
               -text=arabic_file > output.ps
$ lpr output.ps
   


[5] The '\'s are there to tell the shell prompt that we will continue our command in the next line (essentially to ignore the newline). You can simply omit them and continue typing the command in one line. It is only here for readability.