Traditional Chinese Solaris User's Guide

Chapter 10 Traditional Chinese Printing Facilities

This chapter describes how to print to a line printer. The chapter also provides information on how to use the mp utilities to print to a PostScript printer or to a line printer.

Printing From th Command Line

From the command line, you can print one of two ways:

Printing With a Line Printer

The Traditional Chinese Solaris operating environment uses EUC code sets. Its printing applications (such as desktop tools) generate PostScript code that uses EUC. If you use different PostScript printing, make sure it has the same capabilities.

Printing With the mp Utility

As a print filter, mp generates a properly formatted version of contents in PostScript format. The PostScript output file contains glyph images from Solaris-resident scalable or bitmap fonts, depending on each locale's system font configuration for mp. The mp filter is enhanced in the current Solaris release to print files with different encoding text in the corresponding Asian locales.

The following command line will print a file containing Traditional Chinese characters, with or without ASCII/English characters:


system% mp -L $LANG filename | lp -d printer

The file may contain ASCII/English characters as well as Traditional Chinese. Refer to the mp(1) man page for more detailed information.

You can use the mp utility as a filter because mp accepts the stdin stream.


system% cat filename | mp | lp

You can set the utility as a printing filter for a line printer. For example, the following command sequence tells the printer service LP that the printer lp1 accepts only mp format files. This command also installs the printer lp1 on port /dev/ttya. See the lpadmin(1M) man page for more details.


system% lpadmin -p lp1 -v /dev/ttya -I MP
system% accept lp1
system% enable lp1 

You can add the lpfilter utility for a filter by using the lpfilter(1M) command as follows:


system% lpfilter -f filtername -F pathname

The lpfilter command tells lp that a converter (in this case, xutops) is available through the filter description file named path name. The pathname can be determined as follows:


Input types: simple
Output types: MP
Command: /usr/bin/mp 

The filter converts the default type file input to PostScript output using/usr/bin/mp.

To print a UTF-8 text file, use the following command:


system% lp -T MP UTF-8-file

For more details on the mp command, refer to the mp(1) man page.

Using mp as an Xprt (X Print Server) Client

When used as an Xprt client, mp can print the output of any printer connected to a network supported by an Xprt print service. As an Xprt client, mp supports PostScript and many versions of PCL.

The Xprt client attempts a connection to an Xprt server based on the following rules: