Next Previous Contents

5. Printing

Since Postscript itself does not support Unicode fonts, the burden of Unicode support in printing is on the program creating the Postscript document, not on the Postscript renderer.

The existing Postscript fonts I've seen - .pfa/.pfb/.afm/.pfm/.gsf - support only a small range of glyphs and are not Unicode fonts.

5.1 Printing using TrueType fonts

Both the uniprint and wprint programs produce good printed output for Unicode plain text. They require a TrueType font; see section "TrueType fonts" above. The Bitstream Cyberbit gives good results.

uniprint

The "uniprint" program contained in the yudit package can convert a text file to Postscript. For uniprint to find the Cyberbit font, symlink it to /usr/local/share/yudit/data/cyberbit.ttf.

wprint

The "wprint" (WorldPrint) program by Eduardo Trapani http://ttt.esperanto.org.uy/programoj/angle/wprint.html postprocesses Postscript output produced by Netscape Communicator or Mozilla from HTML pages or plain text files.

The output is nearly perfect; only in Cyrillic paragraphs the line breaking is incorrect: the lines are only about half as wide as they should be.

Comparison

For plain text, uniprint has a better overall layout. On the other hand, only wprint gets Thai output correct.

5.2 The classical approach

Another way to print with TrueType fonts is to convert the TrueType font to a Postscript font using the ttf2pt1 utility ( http://www.netspace.net.au/~mheath/ttf2pt1/, http://quadrant.netspace.net.au/ttf2pt1/). Details can be found in Julius Chroboczek's "Printing with TrueType fonts in Unix" writeup, http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/printing.html.

TeX, Omega

TODO: CJK, metafont, omega, dvips, odvips, utf8-tex-0.1

DocBook

TODO: db2ps, jadetex

groff -Tps

"groff -Tps" produces Postscript output. Its Postscript output driver supports only a very limited number of Unicode characters (only what Postscript supports by itself).

5.3 No luck with...

Netscape's "Print..."

As of version 4.72, Netscape Communicator cannot correctly print HTML pages in UTF-8 encoding. You really have to use wprint.

Mozilla's "Print..."

As of version M16, printing of HTML pages is apparently not implemented.

html2ps

As of version 1.0b1, the html2ps HTML to Postscript converter does not support UTF-8 encoded HTML pages and has no special treatment of fonts: the generated Postscript uses the standard Postscript fonts.

a2ps

As of version 4.12, a2ps doesn't support printing UTF-8 encoded text.

enscript

As of version 1.6.1, enscript doesn't support printing UTF-8 encoded text. By default, it uses only the standard Postscript fonts, but it can also include a custom Postscript font in the output.


Next Previous Contents