This chapter includes the following sections:
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 Packed format file to a printer that supports Packed format.
system% lp -T PACK PACK-filename |
Use this command to print a Johap format file to a printer that supports Johap format.
system% lp -T JOHAP JOHAP-filename |
Use commands such as the following to print a ko.UTF-8 file to an EUC printer.
The first command line converts the file to an EUC format. The second line prints the file.
system% iconv -f ko_KR-UTF-8 -t ko_KR-euc ko.UTF-8_filename > euc-filename system% lp euc-filename |
The printed output includes only the characters that are defined in the EUC code set.
Use commands such as the following to print a ko.UTF-8 file to a Johap (KS C 5601-1992) printer.
The first command line converts the file to a Johap format. The second line prints the file.
system% iconv -f ko_KR-UTF-8 -t ko_KR-johap92ko.UTF-8_filename >\ johap92-filename system% lp johap92-filename |
The printed output includes only the characters that are defined in the Johap code set.
The enhanced mp print utility is available in the current Korean Solaris release. You can use mp to print ko files in ko locale or UTF-8 files in ko.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 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.