wwpsof - Generic I18N (internationalized) print filter for PostScript
/usr/lbin/wwpsof [-c] [-D data] [-h host-name] [+I input-tray] [-i indent]
[-K sides] [-l page-length] [-N number-up] [-n login-name] [-O option-list]
[+o output-bin] [-S paper-size] [-v] [-w page-width] [+C pcf-file]...
Most of the options supported by wwpsof should be specified by the user on
the lpr command line rather than on the wwpsof command line that you enter
as the if or of value in the /etc/printcap file. When the wwpsof command is
specified in the /etc/printcap file, you can include options either to
establish defaults (which a user can override) or to hard code a particular
setting (which the user cannot override). To establish a default setting,
precede an option with a plus sign (+). To establish a setting that the
user cannot override, precede an option with a hyphen (-). Options shown
with a hyphen (-) in this section and the SYNOPSIS are typically not
included on a wwpsof command line, and are left to user discretion.
Some print characteristics, such as vertical printing, can be specified to
the filter by using one of several options. In these cases, the options
that correspond to those on the lpr command line are preferred. The alter-
native options are supported only so that the wwpsof command line has back-
ward compatibility with the command lines of older print filters.
Support for the listed options can vary from printer to printer and the
code required to communicate these options can vary as well. Therefore,
several wwpsof options will work only if enabled by code entries in the
printer customization file specified by the +C option. See the Printer Cus-
tomization File section for detailed information.
-c Prints control characters.
Tells the print filter how to interpret the text. Valid values are:
post Interpret as PostScript
ascii Interpret as plain ASCII text
This option is supported for backward compatibility. The recommended
alternative is -O format=input-format
Specifies the name of the job owner's host system. This name can con-
tain non-ASCII characters.
Selects default the paper input tray of the printer. Valid values are
printer specific and should be specified in the printer customization
file (PCF). This option corresponds to -I on the lpr command line.
Specifies the amount of indentation in columns. The default value is 0
(no indentation). This option corresponds to -i on the lpr command
Specifies one- or two-sided printing. Valid values are 1 or 2. You can
use this option only if the printer supports it and there is appropri-
ate encoding in the printer's PCF. This option corresponds to -K on the
lpr command line.
Specifies page length as the number of lines. The default value is 66.
Specifies the number of pages to be printed per side on a sheet of
paper. This option requires support in the PCF and corresponds to -N on
the lpr command line.
Specifies the login name of the print job's owner. This name can con-
tain non-ASCII characters.
Specifies options related to page orientation and printing of a file.
The option-list value can include one option or multiple options that
are separated by commas (no embedded spaces).
The wwpsof filter supports the following options for option-list:
Prints the specified number of copies.
Specifies the data format of the input file. Valid values are text
or ascii (for a text input file) or post (for a PostScript input
landscape or land
Prints so that the printed output is parallel to the long side of
Specifies the locale setting in which the filter processes the
portrait or port
Prints so that the printed output is parallel to the short side of
Specifies the range of pages to be printed, starting with page
number m and ending with page number n. This option requires sup-
port in the PCF if the input file is in PostScript format.
Specifies vertical writing mode for Chinese, Japanese, and Korean
multibyte characters. When this option is included, multibyte char-
acters are printed vertically in a rotated orientation; however,
any single-byte characters in the text are still printed horizon-
This option corresponds to the -O "vprint" option on an lpr command
This option corresponds to the -O option on an lpr command line.
Specifies the default output bin on the printer. Valid values are
printer specific and must be specified in the printer's PCF. This
option corresponds to the -o option on an lpr command line.
Specifies the paper-size. Valid values are: Letter (the default), Exe-
cutive, Legal, Tabloid, A0, A1, A2, A3, A4, A5, A6, B0, B1, B2, B3, B4,
B5, and B6.
-v Performs the same function as -O vprint.
Specifies the width of the page in columns. The default values are 80
(for portrait orientation) and 132 (for landscape orientation).
Specifies the printer customization file (PCF) to be used. See the
Printer Customization File section for more information.
Specifies the file that logs accounting information for print jobs.
The wwpsof filter is a generic text-to-PostScript converter that converts
the various single-byte and multibyte characters used in an international
environment to printable PostScript input. The filter embeds all required
PostScript font data within the PostScript program. Therefore, print jobs
that include local language characters can be printed on printers where
local language fonts are not resident. To use this filter with a printer,
the printer has to support PostScript Level 2 (or higher) or PostScript
Level 1 with the composite font extension.
The wwpsof filter uses PostScript outline fonts, if available. Otherwise,
the filter attempts to use lower quality bitmap fonts. The bitmap fonts
are available to the filter only if it has access to an X font server. See
the Printer Customization File section for specifying the location of an X
font server to the filter.
The wwpsof filter handles device-specific printer options provided that an
appropriate printer configuration file (PCF) is supplied. The filter also
performs accounting functions. At the completion of each print job,
accounting records are written to the file specified by the af field of the
entry for the printer in /etc/printcap.
The filter can handle plain text files, files preprocessed by nroff, and
PostScript files generated by CDE applications. All of these files can con-
tain non-ASCII characters.
The filter is sensitive to the locale setting. When processing a character,
the filter determines if the character is printable in the current locale.
The filter also uses the locale setting (more specifically, the codeset
part of the locale setting) to find an appropriate font. Except for files
in 16-bit Unicode or 32-bit ISO 10646 (UCS-4) format, users must set locale
appropriately before printing files that contain characters in languages
other than English. If the locale setting for the process is not appropri-
ate for the input file, locale can be set specifically for the print job
through the -O locale=locale-name option.
The filter recognizes files in 16-bit Unicode and 32-bit ISO 10646 (UCS-4)
data formats by using encoding patterns in the file. These files are
printed by using appropriate and, if necessary, different kinds of fonts.
You can specify wwpsof for both the of and if fields of an /etc/printcap
file entry. If the user's login name and host system name contain non-ASCII
characters, you must specify wwpsof in the of field. Otherwise, you can
omit the value for of. See printcap(4) for more information about defining
Printer Customization File
The printer customization file (PCF) provides printer-specific and wwpsof-
specific information for controlling the operation of a printer. The
wwpsof filter uses /usr/i18n/share/options/wwpsof.pcf as the PCF file. This
file has a generic set of font-handling tags that will work with all sup-
ported PostScript printers but does not contain any device-specific set-
The operating system also provides a set of PCF files customized for
specific printers in the /usr/lbin/pcf directory. These files have device-
specific settings but no font-handling information. The printer-specific
PCFs are supported by the pcfof filter, and the following ones, which apply
to PostScript printers, can also be used with the wwpsof filter.
If one of these PCFs has settings appropriate for your printer and you sim-
ply want to apply these printer-specific values in addition to the font-
handling definitions in the wwpsof.pcf file, you can use the +C option to
specify the printer-specific PCF and do not need to specify wwpsof.pcf at
all. The wwpsof filter always applies the settings in wwpsof.pcf unless
they are redefined in a PCF specified on the command line.
You can also create a customized PCF. The main reasons for creating your
own PCF are to:
+ Change the font server location
The default PCF specifies the local system as the font server. You
might want to specify another system for importation of soft bitmap
+ Add information about printer-resident fonts
The default PCF does not include tags for these fonts because they are
printer specific. This information also does not reside in the
printer-specific PCFs because the fonts available on a particular
printer may be site-specific. When it is possible to use printer-
resident fonts for characters, the PostScript file produced by wwpsof
can be substantially smaller than when font glyphs must be embedded in
the file. So, it is worthwhile to create a PCF that allows printer-
resident PostScript fonts to be used when these are available.
+ Add or override settings for printer-specific capabilities
None of these settings are included in the default PCF and you may not
find a printer-specific PCF that meets all requirements for your
The remainder of the information in this section explains the contents of a
PCF file so you can create or adapt one to meet your printer and system
If you do create a customized version of an existing PCF, make sure
your version has a file name different from any system-supplied PCF
name. Otherwise, an update installation procedure will not recognize
your PCF as being user supplied and will replace it with an unmodified
version of the file you customized.
If you want to add only one or two entries to a printer-specific PCF
that already exists, the recommended practice is to specify only the
additional entries in your customized PCF. Then you specify the exist-
ing PCF, followed by your supplemental PCF, on the wwpsof command
line. When multiple PCFs are specified on the command line, entries as
supplied by the combination of PCFs apply. One PCF overrides another
only when there are multiple occurrences of the same kind of entry. In
this case, the entry as defined in the file you specify last in the
command line is the one that wwpsof uses.
Each entry in the PCF adheres to the following format:
In this format, tag specifies the capability to be customized and value is
the setting or code for this capability.
A tag can be one or more keywords or a mix of keywords and user-supplied
values. There are two types of tags: those that correspond to printer-
specific capabilities and those that are wwpsof-specific. The value for a
tag that is printer specific is frequently the code sequence that needs to
be sent to the printer to enable or exercise a printer capability. The
value for a tag that is wwpsof specific controls font handling or codeset
conversion. All tags are named and described following the list of PCF for-
Format rules for PCF entries include the following:
+ To continue a PCF entry to the next line, use the backslash character
(\) at the end of the line to be continued.
+ To include the backslash character in a value, enter two backslashes
+ To begin a comment, use an exclamation mark (!).
+ To specify a character by its octal value, use a backslash (\) fol-
lowed by three octal digits. For example, \033 represents the escape
+ A field that begins with a slash (/) is interpreted as a file specifi-
Printer-specific tags supported by wwpsof include the following ones. These
tags are a subset of the tags supported by the pcfof filter.
The reset sequence that is sent to the printer
The number of seconds to wait after sending out a reset sequence
The initialization sequence that is sent to the printer at the begin-
ning of a print job
The number of seconds to wait after sending out an initialization
The termination sequence that is sent to the printer at the end of a
The number of seconds to wait after sending out a termination sequence
Code that enables the PostScript interpreter.
ps enable delay
The number of seconds to wait after sending the code to enable the
Code that disables the PostScript interpreter
ps disable delay
The number of seconds to wait after sending the code to disable the
PostScript prolog included in every print job
Code that enables portrait page orientation
This tag is optional; that is, the tag can be omitted and the -O por-
trait option will still work as long as the printer supports varying
Code that enables landscape page orientation. This tag is optional;
that is, the tag can be omitted and the -O landscape option will still
work as long as the printer supports varying page orientation.
ps input tray prolog
Prolog code for input tray selection
ps input tray input-tray
Code for selecting the specified input tray
ps output tray prolog
Prolog code for output bin selection
ps input tray out-bin
Code for selecting the specified output bin
Code for printing on only one side of a sheet of paper
Code for printing on both sides of a sheet of paper
ps number up
Code for printing multiple pages per sheet of paper. This code is
required for the -N number-up option to work. The number-up value is
related to the number of an operand stack.
Code for printing multiple copies of a print job
This tag is optional; that is, the -O copies=number option does not
ps from to
Code for printing a specified range of pages. (The m and n page numbers
of the -O range=m:n option correspond to positions on an operand
This tag is required only for PostScript input files; that is, the -O
range=m:n option does not require it for text input files.
The supported PostScript version
Font-handling tags include the following:
Printer resolution in the x direction
Printer resolution in the y direction
Location of the font server. The default value is localhost:7100. This
value means that the font server is the local system and has been set
up to listen for client connections at port 7100. For basic informa-
tion about setting up a font server, refer to X Window System Environ-
ment. For information about using the /sbin/init.d/xfs script to
create a configuration file for autostarting the font server, see the
xfs(1X) reference page. The /sbin/init.d/xfs script is provided to help
set up the font server so that it can be used with wwpsof.
ps resident font type codeset
The printer-resident font to be used for a particular font type and
codeset. See the discussion of font specification tags that immediately
follows this list.
ps soft outline font type codeset
The soft outline font to be used for a particular font type and
codeset. See the discussion of font specification tags that immediately
follows this list.
ps soft bitmap font type codeset
The soft bitmap font to be used for a particular font type and codeset.
See the discussion of font specification tags that immediately follows
unicode conversion preference
The codeset look-up sequence that the filter follows for Unicode char-
acter conversion. This value is a comma-separated list of codeset
names. If a Unicode character can be converted to a character in the
first codeset listed, the font supporting that codeset is used for the
character in the PostScript file. If the character cannot be converted
to that codeset, the filter tries conversion by using the next codeset
in the list. If a Unicode character cannot be converted to a character
in any of the codesets listed, the character is ignored.
A PCF file can include multiple entries containing tags that begin with
font specification key words (ps resident font, ps soft outline font, or ps
soft bitmap font). In addition to the key words, these tags include the
The font type, which can be normal, bold, italic, or bold-italic
The name of any codeset supported on a Tru64 UNIX system
The Japanese, Korean, Simplified Chinese, and Traditional Chinese
languages are supported by multiple codesets, but only one codeset per
language has associated fonts. Therefore, when including entries to
support characters in one of the following languages, specify only the
For Japanese, sdeckanji
For Korean, deckorean
For Simplified Chinese, dechanzi
For Traditional Chinese, eucTW
The value part of a font-specification entry has the following format:
font-name [fprop] [plane:pmask]... [, ...]
In this format, font-name is the name of the font, such as Courier-
ISOLatin2 (example of an outline font name) or jdecw-mincho-medium-r-
normal--34-240-100-100-m-340-jisx0208.1983-1 (example of a soft bitmap font
The fprop value can be Mono (for monospace) or Prop (for proportional).
The plane and pmask values are used only for fonts supporting multiple
codesets. In these cases, the filter finds specific font data by using a
logical OR operation to combine a code point with the plane and pmask
A font-specification entry can contain multiple font listings, separated by
a comma and space. If there are multiple plane:pmask pairs following a par-
ticular font name, they are separated only by spaces. Following are three
examples of font-specification entries from the PCF file that wwpsof uses
ps soft outline font normal ISO8859-9: Courier-ISOLatin5
ps soft outline font bold eucTW : Hei-Light-CNS11643-1 1:8080, \
ps soft bitmap font normal deckorean: \
-dyna-munjo-medium-r-normal--0-0-0-0-m-0-KSC5601.1987-1 1:8080, \
The value of the ps resident font tag must be a font that is resident in
the printer. If you are sure that non-Latin-1 fonts are printer resident
and specify them in the PCF, the wwpsof does not embed in the PostScript
file any glyphs for characters supported by those fonts. This reduces the
size of the PostScript print job and, if soft bitmap fonts are the only
alternative, improves the clarity of the printed file. However, for Asian
and many Eastern European languages, printer-resident fonts are usually
available only on printers manufactured to support specific local
The value of the ps soft outline font tag must be one or more PostScript
outline fonts that are installed on the local system. Outline fonts for
characters included in the Latin-1 character set are installed by default
on a Tru64 UNIX system. Outline fonts for characters not included in the
Latin-1 character set can be installed from optional subsets that are
included in the Tru64 UNIX product kit. For example, PostScript outline
fonts for Chinese characters are included in one of the software subsets
that support Chinese.
The value of the ps soft bitmap font tag must be one or more soft bitmap
fonts made available through a font server. Like outline fonts, bitmap
fonts are installed on the font server from optional subsets that are
included in the Tru64 UNIX product kit. The font server, which can be
either the local system or a remote system, sends fonts to the client
application, in this case, the wwpsof filter.
Because soft bitmap fonts are primarily used for screen displays, their
resolution is not as crisp on the printed page when compared to printer-
resident or outline fonts. However, setting up bitmap fonts in the PCF for
a printer controlled by the wwpsof filter allows CDE application users to
use that printer to print screen text that contains local language charac-
ters. Furthermore, certain languages, such as Japanese, are supported on a
Tru64 UNIX system only through printer-resident or soft bitmap fonts. The
wwpsof filter therefore enables hard copy printing of Japanese text files
for users who do not have a Japanese printer.
Embedding font data in PostScript files may increase the size of the file
beyond what printer memory can support. If this happens, the wwpsof filter
appends an error page to the end of printed output to notify the user that
the file size exceeded printer capacity.
Commands: fsinfo(1X), fslsfonts(1X), lpr(1), lpd(8), pcfof(8), xfs(1X)
X Window System Environment