This chapter Traditional Chinese Solaris Operating System supports the printing of Traditional Chinese output to the following types of printers:
Line printer with built-in Traditional Chinese fonts
PostScript-based printer with built-in scalable fonts
Any PostScript-based printer for bitmap printing
Review the manufacturer's documentation on installing the printer before you use the information in this chapter in this chapter.
For the Traditional Chinese Solaris Operating System to run a line printer, the printer must recognize one or both of the supported code sets, EUC and UTF-8.
A printer that does not support EUC needs filters that convert EUC files for printing. Use the commands in this section to print EUC files to non-EUC printers.
The following commands install the printer lp1 on port ttya. The commands signal the print service that lp1 accepts only BIG5 format files. See the lpadmin(1M) man page for more information.
# lpadmin -p lp1 -v /dev/ttya -I Big5 # accept lp1 # enable lp1 |
You can use an lpfilter command as shown in the following example to print files with formats that are not supported by the printer. The command signals the print service that a converter called filter-name is available through the filter description file named in pathname.
# lpfilter -f filter-name -F pathname |
The following example shows the output of pathname for a converter called euctobig5. The pathname filter converts the default input type to BIG5 with the euctobig5 converter.
Input types: simple Output types: BIG5 Command: euctobig5 |
To print an EUC format file, use a command line such as the following.
system% lp -d lp1 EUC-filename |
To print a BIG5 format file, use a command line such as the following.
system% lp -d lp1 -T BIG5 Big5-filename |
Traditional Chinese Solaris software provides configurable files that allow users to configure the available built-in font ranges according to their own equipment. Traditional Chinese Solaris software provides a configuration file that defines the built-in fonts in the Epson dot matrix printers.
Modify the configuration file according to your printing equipment before using it:
Modify /usr/lib/lp/files/cns.epson.conf if you are working with a zh_TW file.
Modify /usr/lib/lp/files/big5.epson.conf if you are working with a zh_TW.BIG5 file.
For instance, the following configuration file, /usr/lib/lp/files/cns.epson.conf, is used for setting up an Epson LQ-1070C+ Chinese dot matrix printer. In the example, the Epson LQ-1070C+ is composed of built-in Traditional Chinese fonts for CNS 11643 plane 1 and plane 2. You can specify available fonts in different planes and in different directories.
# @(#)cns.epson.conf 1.5 96/04/10 SMI; ALE # CNS Print Filter Configuration File for Epson Dot Matrix Printers # ACCEPT CODE RANGE: PLANE 1: 0x2121 - 0x234e 0x2421 - 0x2570 0x4421 - 0x7d4b PLANE 2: 0x2121 - 0x7244 FONT FILES: PLANE 1: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/mingL1-24.pcf.Z PLANE 2: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/mingL2-24.pcf.Z PLANE 3: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/mingL3-24.pcf.Z PLANE 4: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/mingL4-24.pcf.Z PLANE 5: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/mingL5-24.pcf.Z PLANE 6: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/mingL6-24.pcf.Z PLANE 7: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/mingL7-24.pcf.Z PLANE 8: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z PLANE 9: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z PLANE 10: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z PLANE 11: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z PLANE 12: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z PLANE 13: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z PLANE 14: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z PLANE 15: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z PLANE 16: /usr/openwin/lib/locale/zh_TW/X11/fonts/75dpi/sungNotdef-24.pcf.Z |
An lpfilter command line such as the following can be used to print files whose format is not supported by the printer:
# lpfilter -f filter-name -F filename |
The above command tells LP that a converter called filter-name (for example cns.epson.filter) is available through the filter description file named filename.
If you are installing an Epson dot matrix printer, the content of the filter description file, cns.epson.fd, should be as follows:
Input types: simple Output types: EUC Command: cns.epson.filter |
This filter takes the default input and converts it to a dot matrix data stream by with the cns.epson.filter.
For example, the following command line tells the printer service that printer lp2 accepts only files of EUC format. The command line also installs printer lp2 on the bidirectional parallel port /dev/bpp0. See the lpadmin(1M) man page for more information.
# lpadmin -p lp2 -v /dev/bpp0 -I EUC # accept lp2 # enable lp2 |
To print a file that contains Chinese characters in EUC format to an Epson dot-matrix printer, use the following command.
system% lp -d lp2 EUC-filename |
Traditional Chinese Solaris software provides a configuration file that defines for zh_TW.BIG5 files the built-in fonts in the Epson dot matrix printers. Modify the configuration file according to your printing equipment before using it. The contents of the /usr/lib/lp/files/big5.epson.conf configuration file can be as follows:
# @(#)big5.epson.conf 1.6 96/05/06 SMI; ALE # # Big5 Print Filter Configuration File for Epson Dot Matrix Printers # ACCEPT CODE RANGE: PLANE 1: 0xA140 - 0xA3E0 0xA440 - 0xC6A1 0xC940 - 0xF9D5 FONT FILES: PLANE 1: /usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/75dpi/mingL1B5-24.pcf.Z |
You can use an lpfilter command line such as the following to print files of a format that is not supported by the printer.
# lpfilter -f filter-name -F filename |
The above command tells LP that a converter called filter-name is available through the filter description file named filename.
The following is an example of a filter description file called big5.epson.fd for a an Epson dot matrix printer that references a converted called big5.epson.filter.
Input types: simple Output types: BIG5 Command: big5.epson.filter |
This filter takes the default type file input and converts it to a dot matrix data stream by using the big5.epson.filter.
For example, the following command sequence installs the printer lp2 on the bidirectional parallel port /dev/bpp0. The commands also tell the LP printer service that printer lp2 accepts only zh_TW.BIG5 format files. See the lpadmin(1M) man page for more information.
# lpadmin -p lp2 -v /dev/bpp0 -I BIG5 # accept lp2 # enable lp2 |
To print a file that contains Chinese characters in zh_TW.BIG5 format to an Epson dot-matrix printer, use the following command:
system% lp -d lp2 BIG5-filename |
An application must have the mp utility to print EUC, BIG5, BIG5HK or UTF-8 files to a PostScript-based printer.
The mputility supports all Asian locales. As a printing filter, mp generates a properly formatted version of the file content in PostScript format. Depending on the locale's system font configuration for mp, the Postscript output file contains glyph images from a scalable or a bitmap system font. The mp print filter is enhanced in the current Solaris release to print files of a certain type for each locale. See the mp(1) man page for more information.
Table 6–1 Files Printed With mp in Each Locale
File Printed |
Locale |
---|---|
EUC |
zh_TW |
BIG5 |
zh_TW.BIG5 |
BIG5HK |
zh_HK.BIG5HK |
UTF-8 |
zh_TW.UTF-8 zh_HK.UTF-8 |
You can use a command line such as the following to print a file with Traditional Chinese characters. The file might also include ASCII/English characters.
system% mp filename | ld -d printer |
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:
When the -D printer_name@machine[:dispNum] or -P printer_name@machine[:dispNum] options are used with the mp command, mp attempts to connect to an Xprt print service on machine[:dispNum] with printer_name.
If the above attempted connection to machine[:dispNum] fails or if the argument given to -D or -P is just printer_name, then the mp command checks the XPSERVERLIST for Xprt servers that support the printer_name argument. For example:
system% setenv XPSERVERLIST "machine1[:dispNum1] machine2[:dispNum2] \ machine3[:dispNum3]" |
If no server is found using above rules, mp checks for an XPDISPLAY environment variable set to machine[:dispNum]. For example:
system% setenv XPDISPLAY "machine[:dispNum]" |
If the XPDISPLAY variable is not set or if the variable is invalid, mp tries to connect to the default display :2100. If the default display value is also invalid, mp exits with an error message.
The /usr/lib/lp/locale/C/mp directory contains .xpr print page sample layout files for Xprt client. The sample files are for 300 dpi printers. If the target printer has a different dpi value, the dpi value of the sample files is automatically converted to the resolution of the target printer.