Simplified Chinese Solaris User's Guide

Chapter 10 Simplified Chinese Printing Facilities

This chapter describes how to print Simplified Chinese text 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 Chinese Output From a Command Line

This section provides information that you can use to print from a command line with the lp command and the mp program.

Printing With a Line Printer

You can use the commands in this section to print files of different formats to a line printer.

    Use this command to print an EUC file.


system% lp EUC_filename 

    Use this command to print a GB format file to a printer that supports GB format.


    system% lp -T GB GB_filename 
    

Printing With the mp Utility

The enhanced mp print utility is available in the current Simplified Chinese Solaris release. You can use mp to print zh files in zh locale or UTF-8 files in zh.UTF-8 locales.

The output from the utility is standard PostScript that you can send to any PostScript printer.

Use the following command to print a file with the mp utility.


system% mp filename | lp

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


system% cat filename | mp | lp

You can set the utility as a print filter for a line printer. For example, the following command sequence signals the print service that the printer lp1 accepts only mp format files. The 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 use the following command to add a filter for an LP print service.


system% lpfilter -f filtername \
-F pathname

The filter converts the default input type to PostScript output with the /usr/bin/mp command.

To print a UTF-8 text file, use a command line such as the following.


system% lp -T MP UTF-8-file

For more details on the mp(1), see the man page.

Using mp as an Xprt (X Print Server) Client

Using mp as an Xprt client enables mp to 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: