Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > P

psfontpf(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

psfontpf — internationalized PostScript print filter

SYNOPSIS

/usr/lbin/psfontpf [-c] [-C config-file] [-D keyword=option] [-I keyword=option] [-K keyword=aliases] [-l logfile] [-L locale=aliases] [-n number] [-N keyword] [-o option-lists] [-O [keyword:]option=aliases] [-p] [-P ppd-file] [-q interface-script] [-S macro[/desc]=option-lists] [-t title] [-T tray=paper] [-u user] [-v]

Remarks

The psfontpf command should only be called from the PS.font printer model script or its derivatives. Only the -n, -o, and -t options are user-accessible through the corresponding options in the lp command. Only the sub-options available under the user-accessible -o option are explained in more detail. See the User Specified -o Option Lists section in this manpage. The other options are not directly user-accessible and are only briefly described. See psmsgen(1M) on how to create a customized version of the PS.font printer model script by adjusting the various options supported by the psfontpf print filter.

DESCRIPTION

The psfontpf 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 file. The filter embeds all required PostScript font data within the PostScript program, if necessary. Therefore, print jobs that include local language characters can be printed on printers where local language fonts are not present.

There are two ways to notify psfontpf on what character set encoding (codeset) is used in the input file: by specifying the locale or the codeset name. For codesets that are supported by locales, the specification of locale names are preferred over the direct specification of codeset names because the locale names are also associated with fonts and proper character display width information. Because psfontpf converts all characters internally to Unicode, codesets or locales whose codesets cannot be converted to Unicode directly are not supported.

To use the psfontpf filter with a printer, the printer has to support PostScript Level 2 or higher. Some features are supported only on printers that support PostScript Level 3.

The psfontpf filter also supports embedding font data to PostScript files generated by the Mozilla web browser. For example, by making the Mozilla web browser print to an LP destination that uses the psfontpf print filter, web pages containing non-Latin 1 characters can be printed correctly on a PostScript printer.

The psfontpf filter supports the parsing of Adobe PostScript printer description file (PPD) to retrieve information on using diverse features of various PostScript printers. Without specifying a PPD file, many of the advanced printing features, like duplex printing, will not be available for use.

Options

The psfontpf filter recognizes the following options:

-c

Print control characters and suppress page break.

-C config-file

Specify additional configuration file to override entries from the default configuration files.

-D keyword=option

Set the specified option key as the default value for the given PPD main keyword.

-i req-id

Specify the request id to be printed on the banner page.

-I keyword=option

Set the specified option key as the value of the given PPD installable option keyword.

-K keyword=aliases

Specify a set of comma-separated aliases for the given PPD main keyword.

-l logfile

Specify a log file to log error and informational message. By default, the log file is /var/adm/lp/psfontpf.log.

-L locale=aliases

Specify a set of comma-separated aliases for the given locale name, such as, japanese for ja_JP.eucJP.

-n number

Print the specified number of copies.

-N keyword

Disable the given non-PPD keyword from the configuration file.

-o option-lists

Specify options related to page orientation, formatting and other PPD file enabled device control operations. The option-lists value can include one option or multiple options separated by spaces. See the User Specified -o Option Lists section in this manpage.

-O [keyword:]option=aliases

Specify a set of comma-separated aliases for the given PPD option key of the given keyword, if specified. If a keyword is not specified, the aliases will apply to all available options of that name.

-p

Make PPD processing and keyword matching case sensitive. By default, PPD processing and keyword matching is case insensitive.

-P ppd-file

Specify the PostScript printer description (PPD) file to be used. By default, psfontpf looks for the PPD file in the /usr/lib/lp/psfontpf/ppd directory unless a full path is specified.

-q interface-script

Specify the name of the current interface script to be printed in the banner page.

-S macro [/desc]=option-lists

Define the macro name macro as shorthand for specifying the set of comma-separated list of options in option-lists. The macro name can be of the form name# where the character # indicates an arbitrary string that can be used at the right side of the = in the option-lists. The option desc description string provides an informational message of what the macro name does. White spaces in the description string should be replaced by _ or \x20 to avoid problem with command line parsing.

-t title

Print the specified title in the banner page.

-T tray=paper

Specify the paper size used in each input tray. This mapping enables the print filter to select a tray with the proper paper size automatically when only the paper size is specified. The print filter will also know the paper size to use if only an input tray is specified. This default mapping can be overridden by specifying both the paper size and input tray.

-u user

Print the specified user name in the banner page.

-v

Enable the printing of warning and information messages to the log file in additional to error messages. By default, only error messages will be printed to the log file. One -v option enables warning messages to be printed to the log file. Two -v options enable both warning messages and informational messages to be printed to the log file.

User Specified -o Option Lists

An end user can pass options to the psfontpf filter via the -o option of the lp command. For passing more than one option, enclose those user options within quotation marks. Some of the supported options are for text file printing only (mostly formatting options) and such options do not have effect on PostScript file printing. Other options apply to both text and PostScript file printing.

The list of supported options are:

banner|yb

Enable the printing of the banner page.

bidi=on|off|rtol

Specify that Unicode bidirectional algorithm should be explicitly turned on or off irrespective of the current setting (text printing only). Another possible value is rtol, which forces right-to-left rendering of all input lines even if they do not contain any right-to-left character.

bm=bottom-margin

Specify the bottom margin of the page for text printing. The unit can be in for inch (default), pt for point, cm or mm.

btray=input-tray

Select the input paper tray to be used for printing the banner page. The input-tray name is dependent on what is specified in the PPD file. By default, the banner tray is the same as the input tray for printing the content of the file.

cpi=char-per-inch

Specify the number of characters per inch in width for text printing.

even

Print only the even pages (text printing only) and override a previous odd option.

font=fontname

Specify that the font or fonts associated with the given fontname name should be selected for printing, if available. The fontname can be an actual printer font name, an XLFD name for bitmap font, path to an external TrueType or PCF bitmap font, or a predefined typeface name specified in the configuration files.

format=input-format

Specify the data format of the input file. Valid values are text or ascii (for a text file) or post or ps (for a PostScript file). By default, the print filter will detect automatically the input file format if this option is not specified.

hmi=hmotion-index

Specify the horizontal motion index of a character for text printing. The unit of the index is 1/120 inch. The value can be wider or narrower than the value indicated by the cpi parameter. In that case, the character will be printed further apart or closer together than the default case. Its default value is the same as the cpi value in 1/120 inch unit.

indent=indent

Specify the amount of indentation in columns for text printing. The default value is 0 (no indentation).

italic

Print underlined characters with italic fonts, if available (for text printing). If no italic font is available, the characters will remained underlined.

itray=input-tray

Select the input tray that supplies paper for the print job.

jcl

Specify that the printer requires the use of HP's Job Control Language. This option is ony needed when using the generic model script with no PPD file specified.

land|landscape

Print in landscape mode.

level=ps-level

Current PostScript level to be used (default is the PostScript level specified in the PPD file).

lines|length=lines

Specify the number of lines per page (text printing only).

lm=left-margin

specify the left margin of the page for text printing.

locale=locale-name

Specify the locale for processing input file.

lpi=lines-per-inch

Specify the number of lines per inch for text printing.

nform=NF

Specify the Unicode normalization form to be used for processing Unicode input text file. The valid values are NFC (default), NFD, NFKC, NFKD, or None.

nobanner|nb

Do not print a banner page. The printing of banner page is on by default unless a null "banner utility" entry is specified in a configuration file.

nofixwh|nf

Specify that width-to-height aspect ratio of the printed characters is allowed to change according to the specified cpi|lpi and related options. By default, the aspect ration will be kept the same and extra padding spaces will be added between characters or lines, if necessary.

nojcl

Specify that escape sequences associated with HP's Job Control Language should not be sent out even if they are defined in the PPD file.

nopfont|np

Specify that non Latin-1 printer resident fonts should not be used for printing. This option may be useful if the printer resident fonts cover less characters than that are supported by the operating system fonts and there is a need to print those extra characters with consistent fonts.

nowc

Specify that padding spaces should be added around narrow TrueType glyph that should be displayed as a wide character (default).

obin=output-bin

Select the output bin where the printed pages will be deposited. The output-bin name is printer dependent on what is specified in the PPD file, if supplied.

odd

Print only the odd pages (for text printing only).

opt=keyword:option

Select the given PPD option key as the value of the PPD main keyword.

pages=m-n

Specify the range of pages to be printed, starting with page number m and ending with page number n inclusively (text printing only).

paper=paper-size

Specify the paper size. Valid values are: Letter (the default if no PPD file is specified), Executive, Legal, Tabloid, A0, A1, A2, A3, A4, A5, A6, B0, B1, B2, B3, B4, B5, and B6. Not all paper sizes are supported by a printer. The printer can also support paper sizes not listed above. Invalid paper size setting may cause the output to be truncated. If a PPD file is specified, invalid values will be ignored.

pm=page-margin

Specify the page margin of the page for text printing; in other words, tm, bm, lm and rm will be set to the same given value.

pn

Print page number in the lower left corner of the page (text printing only).

port|portrait

Print in portrait mode.

prtctrl

Print control characters and suppress page break. This is the same as the -c option.

remap

Specify that non-BMP characters in Mozilla PostScript file will be mapped to private use characters in the BMP so that the characters can be printable. This option may interfere with fonts that have characters in the private use character range of BMP. Also, if the PostScript file has a lot of non-BMP characters, the BMP private use area may not be large enough to print them all. This feature is off by default.

roman

Cause the use of local Roman character set (JIS Roman for Japanese and ISO646-KR for Korean) when printing ASCII characters in a Japanese or Korean locale except the UTF-8 ones (text printing only).

rm=right-margin

Specify the right margin of the page for text printing.

setup=macro

Specify the use of option lists associated with the given macro name. The setup= prefix is not really needed.

side=sides

Print the job in a way specified by the sides variable. You can specify sides as follows:

1|one_sided|one_sided_simplex

Print only on one side of the sheet (default).

2|two_sided|two_sided_duplex

Print on both sides of the sheet; the second side is reached by flipping the sheet about its left edge, as in the binding of a book.

tumble|two_sided_tumble

Print on both sides of the sheet, but print the opposite way up on each side, so that the second side can be read by flipping the sheet along its top axis.

This option is supported only if duplexing support is available in the PPD file.

tm=top-margin

Specify the top margin of the page for text printing.

udc=udc-file

Specify the user-defined character raster font as specified in the udc(4) manpage should be used. The print filter will look for UDC file in the /usr/lib/asx/UDC directory if an absolute path is not specified.

umap=UDC-mapfile

Specify the UDC mapping file to be used for mapping user defined characters to code points in TrueType fonts.

uwidth2=Unicode-range

Specify the list of Unicode ranges (separated by commas without space) that should be regarded as full width character (width 2) irrespective of the value returned by the wcwidth() function when printing Unicode characters.

vmi=vmotion-index

Specify the vertical motion index value which determines the height of a row. The unit of the index is 1/48 inch. This is equivalent to 48/line-per-inch.

vprint

Specify vertical printing mode for Chinese, Japanese, and Korean multibyte characters. When this option is included, multibyte characters are printed vertically in a rotated orientation; however, any single byte characters in the text are still printed horizontally (text printing only). If the TrueType fonts used support vertical variants of some of full width characters, those characters will be used in vertical printing mode.

widenchar|wc

Specify that narrow TrueType glyphs should be widened (doubled in width) when they are displayed as a wide character (opposite of nowc).

width=width

Specify the width of page in columns for text printing.

[no]wrap

Wrap or do not wrap long lines when printing a text file (default is nowrap).

keyword=option

If the given keyword does not match any of the predefined keyword-option pairs above, it is treated as the selection of the given PPD option key as the value of the PPD main keyword (equivalent to opt=keyword:option).

option

If the option name does not match any of the predefined option names above, it is treated as follows (in descending order):

1.

A setup macro name

2.

A locale name or locale alias

3.

A page size name, for example A4.

4.

An input tray name

5.

A codeset or Unicode transformation format name

6.

A font or typeface name

If it matches none of the above, the option will be ignored.

Additional PPD dependent keyword/option pairs and predefined setup macros and aliases may be available for use. Please run the configured model script directly without any option to see what additional options are available.

Options Interdependency

Many of the supported -o options are inter-dependent. In other words, specifying one option will affect the setting of the others. For example, the following option values are inter-related by the formulas:

  • lines-per-inch= lines/(page-height - top-margin - bottom-margin)

  • char-per-inch= width/(page-width - left-margin - right-margin)

A latter option may invalidate a former related option. For example, a letter size page (11in x 8.5in) with a page margin of 0.5in and a lines-per-inch of 6 will print 60 lines per page. Specifying 66 as the number of lines per page (lines) will then force the lines-per-inch to 6.6.

The following three groups of character spacing options are inter-related in descending priority order:

1.

hmi, vmi

2.

cpi, lpi

3.

width, lines

When conflicting hmi and cpi options are specified, there are two possibilities:

1.

If the hmi option specifies character spacing wider than the cpi option, extra space is padded between characters to satisfy both options.

2.

If the hmi option specifies character spacing narrower than the cpi option, the print filter will try to accommodate or adjust if the difference is only minor. In this situation, the individual characters will be printed closer together (more packed) than their natural character-to-character separation. Otherwise, the hmi option overrides the cpi option and the character width will be reduced accordingly.

Similar results occur for conflicting vmi and lpi options.

Configuration Files

The psfontpf configuration file is mainly used to specify the name and the locations of the fonts to be used as well as other miscellaneous configuration parameters. This configuration file is a plain text file with a number of key-option-value triplets of the form:

key: opt=value

The opt= part is optional.

  • The # character indicates that the rest of the line is a comment. The \ character at the end of a line acts as a line continuation character.

The print filter reads in configuration files from the /usr/lib/lp/psfontpf/pscf directory. The following configuration files will be read in the order specified:

1.

common.pscf

2.

A user configuration file specified in the command line, if specified. The configuration will be assumed to be relative to the /usr/lib/lp/psfontpf/pscf directory unless a full path is given.

3.

locale.pscf, if available, where locale is the locale the print filter is running in. Assuming a locale name of the form language_territory.codeset, the print filter will look for the first matching pscf file of the following names:

a.

language_territory.codeset.pscf

b.

language_territory.pscf

c.

language.pscf

An entry in the user configuration file will override the same entry in the system common configuration file. Even though the locale specific system configuration file is read last, the entries in the user configuration file have a higher priority and so will not be overridden by the same entry in the locale specific file. Only font specific entries are valid in the locale specific configuration file, the other entries will be ignored.

The supported key-option-value triplets are as follows:

banner utility: utility-path

Specify the location of a utility command to generate the banner page instead of the default one created by psfontpf. The same -i, -t, -q, and -u banner related options will be passed to the banner utility. If no utility is specified or the specified utility is not accessible, banner page printing will be disabled by default unless explicitly enabled in the command line.

bidi: {rtol|on|off|auto}

Specify the state of the Unicode bidirectional algorithm for text printing. The only valid values are rtol, on, off, or auto (default). In auto mode, bidirectional algorithm will be turned on only for Unicode text. In rtol mode, right-to-left rendering will be enforced even for input lines that do not contain any right-to-left character.

codeset alias: codeset=aliases

Specify a list of comma-separated alias names for the given codeset. The codeset alias: configuration entry is mainly used to map Mozilla codeset names to native HP-UX codeset names.

galley char: codeset=galley-char

Specify the galley character used in the Unicode to codeset iconv converter.

include: config-path

Include another configuration file specified by the pathname config-path. The pathname will be relative to /usr/lib/lp/psfontpf/pscf unless an absolute path is specified. Only a single level of file inclusion is supported.

lang alias: lang=aliases

Specify a list of comma-separated language names (example, fr_FR) which can be handle in the same way as the primary language name (lang) from a font selection perspective.

lang codeset mapping: lang=codesets

Specify a list of comma-separated codeset names that should be associated with the given language name from a font selection perspective.

latin1 font type: {1|12}

Specify whether the default Latin 1 printer font should be used (font type = 1), or the combination font with both Latin 1 and double width characters (font type = 12) should be used for printing those Latin 1 characters.

locale alias: locale=aliases

Specify a list of comma-separated alias names for the given locale.

path: var=path

Assign the pathname path to the variable var. This variable can only be used in the *font* entries. At most one variable can be used in each font path name. The definition is local to each configuration file and cannot be reused in a different one.

ppd keyword alias: keyword=aliases

Specify a list of comma-separated aliases for the given PPD keyword. This ppd keyword alias: configuration entry is only valid if the current PPD file has a keyword of that name.

ppd option alias: [keyword/]option=aliases

Specify a list of comma-separated aliases for the given PPD option of the specified keyword, if specified. If a keyword is not specified, all the available options of the given name will take the aliases. This ppd option alias: configuration entry is valid only if the current PPD file has an option of that name.

ps keyword: keyword=desc

Specify a description string desc about the keyword to be defined.

ps option: keyword/option[/desc]=ps-invocation

Specify the PostScript code to be sent to the printer if the specified option is selected for the given keyword. Like the PPD file, the ps-invocation code has to be doubled-quoted. New lines are specified by the \n escape sequence and \ by \\. An optional description string desc about the specified option can be added to describe what this option is doing.

resident font: lang ftype width=resident-font-names[attributes...]

Specify the printer internal fonts to be used for the given language lang (example, ja_JP) and display width. Additional attributes can also be associated with each specified font.

resident typeface: typeface-name[/desc]=resident-font-names

Associate the given typeface name to the list of printer internal fonts specified after :. An optional description string can be specified which will show up in the help message.

rgb color: color-name=rgb-values

Associate a color name with the corresponding RGB (red-green-blue) values in the PostScript RGB color space, such as, "1 0 0" for red color.

setup: setup-macro[/desc]=option-list

Specify the given setup name as a macro for the corresponding option list. The optional desc description string provides an informational message of what the setup macro does.

truetype font: lang ftype width=tt-font-paths[attributes...]

Specify the names of the TrueType fonts for the given language lang and display width. Additional attributes can be associated with each specified font.

truetype typeface: typeface-name[/desc]=tt-font-paths

Associate the given typeface name to the list of TrueType fonts specified after :.

xlfd font: lang ftype width=xlfd-names[attributes...]

Specify the names of the XLFD bitmap fonts for the given language lang and display width. Additional attributes can be associated with each specified font.

xlfd typeface: typeface-name[/desc]=xlfd-names

Associate the given typeface name to the list of XLFD bitmap fonts specified after :.

xlfd font path: mode=font-paths

Specify the comma-separated font paths for searching the XLFD bitmap fonts. The allowable modes are:

fp

Set font path to the given list, overwriting previous list.

fp+

Add the new font paths at the end of the current list.

+fp

Add the new font paths to the beginning of the current list.

unicode conv: codeset=[codepoint=>unicode]+

Specify custom Unicode conversion mappings from the given codeset to Unicode. These mappings will override those from the iconv conversion tables.

unicode map seq: unicode-mapping-sequence

Specify the list of languages, which are associated with different fonts, which should be mapped when printing Unicode characters.

unicode width: width=unicode-ranges

Specify the display width of the Unicode characters specified in the given Unicode ranges.

Model Script

The psfontpf print filter is supported by the /usr/lib/lp/model/PS.font model script. This model script is a PostScript only model script and will not support other printing languages like PCL5. Unlike other HP-UX model scripts, this model script can be configured to support any PostScript printer as long as a PPD file for that printer is available. See psmsgen(1M) for information on how to use the psmsgen configuration tool to configure the model script, and on how to configure the LP spooling system to use the psfontpf print filter.

EXTERNAL INFLUENCES

Environment Variables

LANG determines the locale to use when neither LC_ALL or the other category variables specify a locale.

LC_ALL determines locale to be used. It overrides any values specified by LANG or any other LC_* variables.

AUTHOR

The psfontpf print filter was developed by HP.

FILES

/usr/lib/lp/model/PS.font

Model script that uses the psfontpf print filter.

/usr/lib/lp/psfontpf/ppd

Directory for holding Adobe PPD files.

/usr/lib/lp/psfontpf/pscf

Directory for holding various configuration files.

SEE ALSO

lp(1), psmsgen(1M).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.