Solaris Internationalization Guide For Developers

Printing

The en_US.UTF-8 locale provides a printing utility, xutops(1). This utility can print flat text files written in UTF-8 using X11 bitmap fonts available on the system. Because the output from the utility is standard PostScript, the output can be sent to any PostScript printer.

To use the utility, type the following:


system% xutops filename | lp

You can also use the utility as a filter since the utility accepts stdin stream:


system% lpr filename | xutops | 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 xutops 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 XUTOPS 
system# accept lp1
system# enable lp1

Using lpfilter(1M), you can add the utility as a filter as follows:


system# lpfilter -f filtername -F pathname

The command tells the printer that a converter (in this case, xutops) is available through the filter description file named pathname. Pathname can be as follows:


Input types: simple
Output types: XUTOPS
Command: /usr/openwin/bin/xutops

The filter converts the default type file input to PostScript output using /usr/openwin/bin/xutops.

To print a UTF-8 text file, use the following command:


system% lp -T XUTOPS UTF-8-file