Korean Solaris System Administrator's Guide

Chapter 3 Setting Up Korean Solaris Printing Facilities

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

The system administrator installs printer(s) as described in the printer product documentation. Users can then print Korean text using procedures described in this chapter.

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

Line Printer Support

For the Korean Solaris operating environment to run a line printer, the printer must recognize at least one of the appropriate code sets:

Korean Solaris Code Filters

Printing an EUC (Wansung) File on a Printer that Does Not Support EUC
  1. To print a EUC file to a non-EUC printer, follow these different commands:

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 Packed (the KS C 5601-1987 version of Combination code) format files.


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

The following command sequence tells LP that printer lp1 accepts only Johap (the KS C 5601-1992 version of Combination code) format files.


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

The above command lines also install printer lp1 on port ttya. See the lpadmin(1) man page for more information.

An lpfilter command line such as the following can be used to print files whose formats are not supported by the printer:


# lpfilter -f filter-name -F pathname

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


Input types: simple
Output types: PACK
Command: comptopack 

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


Input types: simple
Output types: JOHAP
Command: wansungtojohap 

The above filter takes the default type file input and converts it to Johap format using wansungtojohap.

To print an EUC file, use the following command:


system% lp euc-filename 

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


system% lp -T PACK PACK-filename 

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


system% lp -T JOHAP JOHAP-filename 
Printing a ko.UTF-8 File to Printers that Do Not Support It

    To print a ko.UTF-8 file to an EUC printer, type the following commands:

The first line converts the file to an EUC file. The output will be missing any characters that are not defined in EUC.


system% iconv -f ko_KR-UTF-8 -t ko_KR-euc 
ko.UTF-8_filename 
>euc-filename
system% lp euc-filename 

    To print a ko.UTF-8 file to a Johap (KS C 5601-1992) printer, type the following commands:

The first line converts the file to a Johap file.


system% iconv -f ko_KR-UTF-8 -t ko_KR-johap92 
ko.UTF-8_filename >
johap92-filename 
system% lp johap92-filename 

Laser Printer Support

To print Korean characters using a PostScript-based printer, a Korean Solaris software application must have the Korean Solaris xetops utility to print EUC files, xutops to print UTF--8 files, or the mp utility.

Using xetops and xutops Utilities

The xetops and xutops utilities produce bitmapped graphics as printed images. Korean Solaris software includes the xetops and xutops utilities so any system can print Korean text on a PostScript printer. The xetops utility in EUC locale and xutops Utility in UTF--8 locale may no longer be supported in the future.

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

A typical command line for printing a file named filename containing Korean characters with xetops, 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 Korean.

Using the mp Utility

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 ko file in ko locale or UTF-8 files in ko.UTF-8 locales.

A typical command line for printing a file named filename containing Korean 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 Korean.