Simplified Chinese Solaris System Administrator's Guide

Chapter 3 Setting Up Simplified Chinese Solaris Printing Facilities

The Simplified Chinese Solaris operating environment supports printing Simplified Chinese output through the following types of printing facilities:

The system administrator installs printer(s) as described in the printer product documentation. Then users can print Simplified Chinese text using procedures described in this chapter.

Follow the printer documentation for physically connecting the printer. Then use the following instructions.

Line Printer Support

For the Simplified Chinese Solaris operating environment to run a line printer, the printer must recognize EUC.

Simplified Chinese Solaris Code Filters

A printer that does not support EUC needs filters that convert EUC files for printing. For example, the following command sequence tells LP, the print service, that printer lp1 accepts only GB format files. This command line also installs printer lp1 on port ttya. The lpadmin(1) man page explains this command more fully.


# lpadmin -p lp1 -v /dev/ttya -I GB
# accept lp1
# enable lp1

An lpfilter command line like the following can be used in the process of printing files whose format is not supported by the printer:


# lpfilter -f filter-name -F pathname

The above command tells LP that a converter called filter-name (for example euctogb) is available through the filter description file named pathname. The content of pathname can be as follows:


Input types: simple
Output types: GB
Command: euctocgb

The above filter takes default type file input and converts it to GB format by using euctogb.

To print an EUC file, use the command in the following example:


system% lp EUC-filename 

To print a GB format file, use the following command:


system% lp -T GB GB-filename 

Laser Printer Support

To print Simplified Chinese characters using a PostScript-based printer, a Simplified Chinese Solaris software application must have either the Simplified Chinese Solaris xetops, xutops or mp utilities.

Using the xetops and xutops Utility

The xetops and xutops utilities produce bitmapped graphics as printable images. Simplified Chinese software includes the xetops and xutops utilities so any system can print Simplified Chinese text on a PostScript printer. The xetops utility in both EUC and GBK locales and xutops utility in UTF-8 locale may no longer be supported in the future.

Using xetops and xutops is described in Simplified Chinese Solaris User's Guide, in the chapter "Simplified Chinese Printing Facilities," and in the xetops(1) and xutops(1)man pages.

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% pr filename | xetops | lp 

The syntax for xutops is similar:


system% pr filename | xutops | lp 

Make filename the name of the file to print. This file can contain ASCII/English characters as well as Simplified Chinese.

Using the mp Utility

The mp utility supports all Asian locales including UTF-8 locales. As a print filter, mp generates a pretified 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.

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.