The mp utility supports all asian locales. As a printing filter, mp generates a pretitified version of contents in PostScript format. The Postscript output file contains glyph images from Solaris system-resident scalable or bitmap fonts, depending on each locale's system font configuration for mp. As a print filter, mp(1) is enhanced in the Solaris 9 environment to print either zh file in zh locale or UTF-8 files in zh.UTF-8 locales.
A typical command line for printing a file named filename containing Simplified Chinese characters with or without ASCII/English characters, would be as follows:
system% mp filename | lp -d printer |
Make filename the name of the file to print. This file can contain ASCII/English characters as well as Simplified Chinese.
To print with the mp utility, type the following:
system% mp filename | lp |
You can also use the utility as a filter, as the utility accepts 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 line 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 pathname. 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(1) command, refer to the mp(1) man page.