Korean Solaris User's Guide

Chapter 7 Korean Printing Facilities

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


Note -

Before you can print Korean text, a system administrator must set up your Korean printing support as described in Korean Solaris System Administrator's Guide.


You can use the xetops, xutops and mp utilities to print files containing Korean text on a PostScript printer.

These printing facilities can be used directly from a command line or from within Korean Solaris applications as discussed in the following sections.

Printing Korean Output from a Command Line

From a command line, you can print using any of the following ways:

Printing with a Line Printer

    To print an EUC file, use the following command:


system% lp euc-filename 

    To print a Packed format file on a printer that supports this format, you can use the following command:


system% lp -T PACK PACK-filename 

    To print a Johap format file on a printer that supports this format, you can use the following command:


system% lp -T JOHAP JOHAP-filename 

For more information on setting up the Packed or Johap filters, see Korean Solaris System Administrator's Guide.

    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 print out 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 

Printing with the xetops and xutops Utilities

The xetops and xutops utilities convert Korean text into a bitmapped graphics printed image. They allow you to print Korean characters using a PostScript-based printer.


Note -

Starting with the next release of the Solaris environment, xetops and xutops may no longer be supported in future releases.


A typical command line for printing a file named filename containing Korean characters, with or without ASCII/English characters, would be as follows:


system%  pr filename | xetops | lp 
or
system%  pr filename | xutops | lp 

Make filename the name of the file to print. This file may contain ASCII/English characters as well as Korean. Refer to the xetops(1) and xutops(1) man pages for more detailed information.

Printing with the mp Utility

The enhanced mp(1)print filter is available in the Solaris 9 environment. It can be used to print eitherko files in ko locale or UTF-8 files in ko.UTF-8 locales.

The output from the utility is standard PostScript, and can be sent to any PostScript printer.

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.