<?Pub UDT _bookmark _target?><?Pub UDT __target_1 _target?><?Pub UDT registeredtm trademark?><?Pub EntList bull rArr sect?><chapter id="forms-1"><?Pub Tag atict:info tracking="off" ref="1"?><?Pub Tag atict:user
user="jonj" fullname="Juanita Heieck"?><?Pub Tag atict:user user="jh118764"
fullname="Juanita Heieck"?><?Pub Tag atict:user user="wsm" fullname=""?><title>Administering Character Sets, Filters, Forms, and Fonts (Tasks)</title><highlights><para>This chapter provides overview information and procedures for administering
character sets, filters, forms, and fonts on a system.</para><itemizedlist><para>This is a list of the information that is included in this chapter:</para><listitem><para><olink targetptr="embzi" remap="internal">Administering Character Sets (Task
Map)</olink></para>
</listitem><listitem><para><olink targetptr="eojcq" remap="internal">Administering Print Filters (Task
Map)</olink></para>
</listitem><listitem><para><olink targetptr="eojco" remap="internal">Administering Forms (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="eojct" remap="internal">Administering Fonts (Task Map)</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="embzi"><title>Administering Character Sets (Task Map)</title><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Define a print wheel or font cartridge.</para>
</entry><entry><para>Define a print wheel or font cartridge that can be used with a printer.</para>
</entry><entry><para><olink targetptr="printforms-83223" remap="internal">How to Set an Alert to Mount a Print
Wheel or Font Cartridge</olink></para>
</entry>
</row><row><entry><para>Unmount and mount a print wheel or font cartridge.</para>
</entry><entry><para>Delete a current print wheel or font cartridge from the print server's
configuration file. Adds a new print wheel or font cartridge to the print
server's configuration file.</para>
</entry><entry><para><olink targetptr="printforms-29773" remap="internal">How to Unmount and Mount a Print
Wheel or Font Cartridge</olink></para>
</entry>
</row><row><entry><para>Set up alerts to mount a print wheel or font cartridge.</para>
</entry><entry><para>Set up email alerts for print requests.</para>
</entry><entry><para><olink targetptr="printforms-83223" remap="internal">How to Set an Alert to Mount a Print
Wheel or Font Cartridge</olink></para>
</entry>
</row><row><entry><para>Set up an alias for a selectable character set.</para>
</entry><entry><para>Set up aliases when <literal>terminfo</literal> names for the selectable
character sets are inadequate.</para>
</entry><entry><para><olink targetptr="printforms-36731" remap="internal">How to Set Up an Alias for a Selectable
Character Set</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="printforms-1"><title>Administering Character Sets</title><indexterm id="printforms-ix491"><primary>managing</primary><secondary>character sets</secondary>
</indexterm><para><indexterm id="printforms-ix492"><primary>fonts</primary><secondary>styles</secondary></indexterm><indexterm id="printforms-ix493"><primary>printers</primary><secondary>PostScript</secondary><tertiary>treatment of text</tertiary></indexterm><indexterm id="printforms-ix494"><primary>PostScript printers</primary></indexterm>Printers differ in the method that they use to print text in various
font styles. For example, PostScript printers treat text as graphics. These
printers can generate text in different fonts. They can also place the text
in any position, size, or orientation on the page. Other types of printers
support a more limited number of font styles and sizes. These printers use
either print wheels, font cartridges, or preprogrammed selectable character
sets. Usually, only one printing method applies to a given printer type.</para><para><indexterm id="printforms-ix495"><primary>printers</primary><secondary>print wheels</secondary></indexterm><indexterm id="printforms-ix496"><primary>printers</primary><secondary>font cartridges</secondary></indexterm><indexterm id="printforms-ix498"><primary>character set</primary><secondary>hardware</secondary></indexterm><indexterm id="printforms-ix499"><primary>character set</primary><secondary>software</secondary></indexterm>From the perspective of the LP
print service, print wheels and font cartridges are similar. In both cases,
someone must intervene and mount the hardware on the printer, when needed.
Character sets that require you to physically mount a print wheel or font
cartridge are referred to as <emphasis>hardware character sets</emphasis>.
Character sets that do not require hardware mounting, come preprogrammed with
the printer. These character sets can be selected by a print request. They
are referred to as <emphasis>software character sets</emphasis>.</para><para><indexterm id="printforms-ix500"><primary>printers</primary><secondary>non-PostScript</secondary></indexterm><indexterm id="printforms-ix501"><primary>non-PostScript printers</primary></indexterm>When you set up a non-PostScript printer, you
need to tell the LP print service which print wheels or selectable character
sets are available to users. When users submit print requests, the <command>lp
-S</command> command enables them to specify a print wheel or selectable character
set to use for the print job. Users do not have to know which type of character
set applies. They just refer to the font style by the name you have defined.
For example, you can define a print wheel as <literal>gothic</literal>. To
request the <literal>gothic</literal> print wheel, the user would use the
following command: </para><screen>% <userinput>lp -S gothic</userinput> <replaceable>filename</replaceable></screen><sect2 id="printforms-15091"><title>Selectable Character Sets</title><indexterm id="printforms-ix502"><primary>selectable character sets</primary>
</indexterm><para><indexterm id="printforms-ix503"><primary><filename>terminfo</filename> entry</primary><secondary>selectable character sets in</secondary></indexterm><indexterm id="printforms-ix504"><primary>character sets</primary><secondary>selectable</secondary></indexterm>The selectable character sets supported by a printer are listed
in the <filename>terminfo</filename> entry for that printer. For example,
the entry for the <literal>ln03</literal> printer is <filename>/usr/share/lib/terminfo/l/ln03</filename>. You can find the names of selectable character sets for any printer
type in the <filename>terminfo</filename> database by using the <command>tput</command> command.
The syntax for the <command>tput</command> command is as follows:</para><screen>tput -T <replaceable>printer-type</replaceable> cs<replaceable>n</replaceable></screen><para><indexterm id="printforms-ix505"><primary>character sets</primary><secondary>number</secondary></indexterm>The <command>cs</command><replaceable>n</replaceable> option
is an abbreviation for character set number. The number starts with 0, which
is always the default character set number after the printer is initialized.
To display the names of the other character sets, you can repeat the command
by using <option>1</option>, <option>2</option>, <option>3</option>, and so
on, in place of the <option>0</option>. For each selectable character set,
a <command>terminfo</command> name, for example, <literal>usascii</literal>, <literal>english</literal>, <literal>finnish</literal>, and so forth, is returned.</para><para><indexterm id="printforms-ix506"><primary><filename>terminfo</filename> database</primary><secondary>character set names</secondary></indexterm>In general,
the <filename>terminfo</filename> character set names should closely match
the character set names that are used in the manufacturer's documentation
for the printer. Because all manufacturers do not use the same character set
names, the <filename>terminfo</filename> character set names can differ from
one printer type to the next printer type. </para><para><indexterm id="printforms-ix507"><primary>alias for selectable character set</primary></indexterm>You do not have to register the selectable character
set names with the LP print service. However, you can give them more meaningful
names or aliases.</para><note><para>If you do not specify the selectable character sets that can be
used with a printer, the LP print service assumes that the printer can accept
any character set name, such as <literal>cs0</literal>, <literal>cs1</literal>,
or <literal>cs2</literal>, or the <filename>terminfo</filename> name known
for the printer.</para><para><indexterm id="printforms-ix509"><primary>PostScript printers</primary><secondary>character sets for</secondary></indexterm><indexterm id="printforms-ix510"><primary>character sets</primary><secondary>selectable</secondary></indexterm><indexterm id="printforms-ix511"><primary>selectable character sets</primary></indexterm>Character sets for PostScript printers are not listed
when you use the <command>lpstat -p -l</command> command. The PostScript fonts
are controlled by PostScript filters, not by entries in the <filename>terminfo</filename> database.
For information about how to administer PostScript fonts, see <olink targetptr="printforms-26075" remap="internal">Administering Fonts</olink>.</para>
</note><para>Users can use the <command>lpstat -p -l</command> command to display
the names of the selectable character sets that you have defined for each
printer on a print server.</para>
</sect2><sect2 id="printforms-42551"><title>Hardware Character Sets</title><para><indexterm id="printforms-ix512"><primary>character sets</primary><secondary>hardware</secondary></indexterm><indexterm id="printforms-ix513"><primary>print wheels</primary></indexterm><indexterm id="printforms-ix514"><primary>font cartridges</primary></indexterm>Another method to obtain alternative
character sets is to use removable print wheels or font cartridges that you
physically attach, or mount, in a printer. </para><itemizedlist><para>To administer hardware-mounted character sets, you inform the LP print
service of the following:</para><listitem><para>The names you want to use for the available print wheels</para>
</listitem><listitem><para>How you want to be alerted when a printer needs a different
print wheel</para>
</listitem>
</itemizedlist><para>Then, when a user requests a particular character set by using the <command>lp -S</command> command, the print scheduler sends an alert to mount the print
wheel. In addition, the print request is placed in the print queue. When you
mount the correct print wheel and tell the LP print service that the print
wheel is mounted, the job is printed. For more information, see <olink targetptr="printforms-29773" remap="internal">How to Unmount and Mount a Print Wheel or Font
Cartridge</olink>.</para><para>If you do not specify multiple print wheels or font cartridges for a
printer, the LP print service assumes that the printer has a single, fixed
print wheel or font cartridge. As such, users cannot specify a special print
wheel or font cartridge when using that printer.</para><para>Unlike selectable character sets, the names you use for print wheels
or font cartridges are not tied to entries in the <filename>terminfo</filename> database.
Print wheel names or font cartridge names are used only for the purpose of
communicating with the LP print service and its users. <indexterm id="printforms-ix515"><primary>print wheels</primary><secondary>naming</secondary></indexterm><indexterm id="printforms-ix516"><primary>font cartridges</primary><secondary>naming</secondary></indexterm></para><para>However, the names you choose for print wheels or font cartridges should
have meaning to the users. The names should refer to font styles. In addition,
the names should be the same across printers that have similar print wheels,
font cartridges, or selectable character sets. That way, users can specify
a font style (character set), without regard to which printer will be used,
or whether a print wheel, font cartridges, or a selectable character set will
be used.</para><para><indexterm id="printforms-ix517"><primary>character sets</primary><secondary>hardware</secondary></indexterm><indexterm id="printforms-ix518"><primary>non-PostScript printers</primary></indexterm>You and the printer
users should agree on the meanings of print wheel names or font cartridge
names. Otherwise, what a user asks for and what you mount might not be the
same character set.</para>
</sect2><sect2 id="printforms-44"><title>Tracking Print Wheels</title><para><indexterm id="printref-ix214"><primary>print wheels</primary><secondary>tracking</secondary></indexterm><indexterm id="printref-ix215"><primary>LP print service</primary><secondary>tracking print wheels</secondary></indexterm>The procedure for
tracking print wheels is similar to the procedure for tracking forms. Some
printers, usually letter-quality printers, have removable print heads that
provide a particular font or character set. Removable print heads include
print wheels and print cartridges. A user can request a named character set.
If that character set is not available, the LP print service notifies <literal>root</literal> of the request. The job is stored in the print queue until the
print wheel is changed.</para>
</sect2><sect2 id="printforms-37412"><title>Alerts for Mounting Print Wheels or Font
Cartridges</title><para>You request alerts for mounting print wheels or font cartridges in the
same way that you request other alerts from the LP print service. For general
information about alerts, see <olink targetptr="gfjhf" remap="internal">Setting Up Printer
Fault Recovery by Using LP Print Commands</olink>.</para>
</sect2><task id="printforms-65132"><title>How to Define a Print Wheel or Font Cartridge</title><indexterm><primary>print wheels</primary>
</indexterm><indexterm><primary>font cartridges</primary>
</indexterm><tasksummary><para>These procedure shows how to define a print wheel or font cartridge
that can be used with the printer.</para>
</tasksummary><procedure><step id="printforms-step-3"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-4"><para><indexterm id="printforms-ix527"><primary><command>lpadmin</command> command</primary><secondary>defining print wheels with</secondary></indexterm><indexterm id="printforms-ix528"><primary><command>lpadmin</command> command</primary><secondary>defining font cartridges with</secondary></indexterm>Define
a print wheel or font cartridge.</para><screen># <replaceable>print-server</replaceable> <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-S</userinput> <replaceable>hard-charset1</replaceable>[<userinput>,</userinput><replaceable>hard-charset2</replaceable>...]</screen><variablelist><varlistentry><term><option>p</option> <replaceable>printer-name</replaceable></term><listitem><para>Specifies the name of the printer for which you are defining
a print wheel or font cartridge.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option> <replaceable>hard-charset</replaceable></term><listitem><para>Specifies the hardware character set name of the print wheel
or font cartridge.</para><para>You can specify multiple hardware character sets with this command.
Use commas or spaces to separate character set names. If you use spaces, enclose
the list of character set names in quotation marks.</para><para>Define names that are meaningful to users. Inform the users of these
names.</para>
</listitem>
</varlistentry>
</variablelist><para>The print wheel or font cartridge definition is specified in the print
server's <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/configuration</filename> file. </para>
</step><step id="printforms-step-5"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on a print client of the print server.</para>
</step><step id="printforms-step-6"><para>Define the same print wheel or font cartridge
for the print client.</para><screen># <replaceable>print-client</replaceable> <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-S</userinput> <replaceable>hard-charset1, hard-charset2...</replaceable></screen><para>In this command, the variables are the same as the variables in <olink targetptr="printforms-step-4" remap="internal">Step&nbsp;2</olink>.</para><para>The print wheel or font cartridge definition is added to the print client's <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/configuration</filename> file.</para>
</step><step id="printforms-step-7"><para>Repeat <olink targetptr="printforms-step-5" remap="internal">Step&nbsp;3</olink> and <olink targetptr="printforms-step-6" remap="internal">Step&nbsp;4</olink> for
each print client that might need to use the print wheel or font cartridge.</para>
</step><step id="printforms-step-111"><para>Verify that the print wheel or font cartridge
is defined.</para><para>You should see the name of the character set and the
notation <literal>(mounted)</literal>.</para><screen># <userinput>lpstat -p</userinput> <replaceable>printer-name</replaceable> <userinput>-l</userinput></screen>
</step>
</procedure><example id="emjgj"><title>Defining a Print Wheel</title><para>The following example shows how to define the <literal>pica</literal> print
wheel on the printer <literal>luna</literal>. The print client is named <literal>asteroid</literal>.</para><screen>asteroid# <userinput>lpadmin -p luna -S pica</userinput></screen>
</example>
</task><task id="printforms-29773"><title>How to Unmount and Mount a Print Wheel
or Font Cartridge</title><indexterm><primary>unmounting and mounting</primary><secondary>print wheel or font cartridge</secondary>
</indexterm><indexterm><primary>mounting and unmounting</primary><secondary>print wheel or font cartridge</secondary>
</indexterm><indexterm><primary>print wheels</primary><secondary>unmounting and mounting</secondary>
</indexterm><indexterm><primary>font cartridges</primary><secondary>unmounting and mounting</secondary>
</indexterm><procedure><step id="printforms-step-11"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-12"><para>Unmount the print wheel or font cartridge
that is mounted in the printer.</para><screen># <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-M -S none</userinput></screen><variablelist><varlistentry><term><option>p</option> <replaceable>printer-name</replaceable></term><listitem><para>Specifies the printer on which you are unmounting a print
wheel or font cartridge.</para>
</listitem>
</varlistentry><varlistentry><term><command><option>M</option> <option>S</option> none</command></term><listitem><para>Indicates that you want to unmount the current print wheel
or font cartridge.</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, see the <olink targetdoc="refman" targetptr="lpadmin-1m" remap="external"><citerefentry><refentrytitle>lpadmin</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para>The current print wheel or font cartridge is deleted from the print
server's <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/configuration</filename> file. </para>
</step><step id="printforms-step-13"><para>Remove the print wheel or font cartridge
from the printer.</para>
</step><step id="printforms-step-14"><para>Put the new print wheel or font cartridge
in the printer.</para>
</step><step id="printforms-step-15"><para><indexterm id="printforms-ix541"><primary><command>lpadmin</command> command</primary><secondary>mounting print wheel with (how to)</secondary></indexterm><indexterm id="printforms-ix542"><primary><command>lpadmin</command> command</primary><secondary>mounting font cartridge with (how to)</secondary></indexterm>Mount the new print wheel or font cartridge.  </para><screen># <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-M -S</userinput> <replaceable>hard-charset...</replaceable></screen><variablelist><varlistentry><term><option>p</option> <replaceable>printer-name</replaceable></term><listitem><para>Specifies the printer on which you are mounting a print wheel
or font cartridge.</para>
</listitem>
</varlistentry><varlistentry><term><option>M</option> <option>S</option> <replaceable>hard-charset</replaceable></term><listitem><para>Specifies the hardware character set name of the print wheel
or font cartridge you want to mount.</para>
</listitem>
</varlistentry>
</variablelist><para>The print wheel or font cartridge is added to the print server's <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/configuration</filename> file. The mounted print wheel or font cartridge remains active
until it is unmounted or until a new print wheel or font cartridge is mounted. </para>
</step><step id="printforms-step-118"><para>Check the information under the <literal>Print
wheels</literal> or <literal>Character set</literal> heading in the output
of the following command. </para><para>You should see the name of the print
wheel or character set and the notation <literal>(mounted)</literal>.</para><screen># <userinput>lpstat -p</userinput> <replaceable>printer-name</replaceable> <userinput>-l</userinput></screen>
</step>
</procedure><example id="emjgm"><title>Unmounting and Mounting a Print Wheel</title><para>The following example shows how to unmount the current print wheel on
the printer <literal>luna</literal> and mount the <literal>pica</literal> print
wheel.</para><screen># <userinput>lpadmin -p luna -M -S none</userinput>
# <userinput>lpadmin -p luna -M -S pica</userinput></screen>
</example>
</task><task id="printforms-83223"><title>How to Set an Alert to Mount a Print Wheel
or Font Cartridge</title><indexterm><primary>setting</primary><secondary>printer alerts</secondary>
</indexterm><indexterm><primary>alerts</primary><secondary>setting for printers</secondary>
</indexterm><procedure><step id="printforms-step-19"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-20"><para>Set an alert to mount a print wheel or
font cartridge.<indexterm id="printforms-ix553"><primary><command>lpadmin</command> command</primary><secondary>setting alerts to mount print wheels with (how to)</secondary></indexterm></para><screen># <userinput>lpadmin -S</userinput> <replaceable>hard-charset</replaceable> -A <replaceable>alert</replaceable> [<userinput>-Q</userinput> <replaceable>requests</replaceable>] [<userinput>-W</userinput> <replaceable>minutes</replaceable>]</screen><variablelist><varlistentry><term><option>S</option> <replaceable>hard-charset</replaceable></term><listitem><para>Specifies the hardware character set name of the print wheel
or font cartridge for which you want to set an alert. </para>
</listitem>
</varlistentry><varlistentry><term><option>A</option> <replaceable>alert</replaceable></term><listitem><para>Specifies what kind of alert will occur when a print wheel
or font cartridge is requested. For detailed information about the valid values
for <replaceable>alert</replaceable>, see <olink targetptr="gfjhg" remap="internal">Table&nbsp;5&ndash;4</olink>. Some valid values are <literal>mail</literal>, <literal>write</literal>,
and <literal>quiet</literal>. </para><para>If you specify <literal>mail</literal> or <literal>write</literal>,
a predefined alert message says to mount the specified print wheel or font
cartridge. The message includes the names of one or more printers that have
been set up to use such a print wheel or font cartridge.</para>
</listitem>
</varlistentry><varlistentry><term><option>Q</option> <replaceable>requests</replaceable></term><listitem><para>Specifies the number of print requests that require the print
wheel or font cartridge that must be in the queue before an alert occurs.
If you don't specify this option, only one print request in the queue triggers
an alert.</para>
</listitem>
</varlistentry><varlistentry><term><option>W</option> <replaceable>minutes</replaceable></term><listitem><para>Specifies how often (in minutes) the alert occurs If you don't
specify this option, the alert is sent one time.</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, see the <olink targetdoc="refman" targetptr="lpadmin-1m" remap="external"><citerefentry><refentrytitle>lpadmin</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para>The alert is added to the print server's  <filename>/etc/lp/pwheels/</filename><replaceable>charset-name</replaceable><filename>/alert.sh</filename> file. </para>
</step><step id="printforms-step-113"><para>Verify that the alert has been added
for the print wheel or font cartridge by checking the output of the following
command.</para><screen># <userinput>lpadmin -S</userinput> <replaceable>hard-charset</replaceable> <userinput>-A list</userinput></screen><para>Alternately, if you have set a low number of print requests to trigger
the alert, submit enough print requests to meet the minimum requirements.
Ensure that you receive an alert to mount the print wheel or font cartridge.</para>
</step>
</procedure><example id="emjgl"><title>Setting an Alert to Mount a Print Wheel</title><para>The following example shows how to set email alerts to occur every 5
minutes for the <literal>elite</literal> print wheel when the print queue
contains 10 print requests for the <literal>elite</literal>.</para><screen># <userinput>lpadmin -S elite -A mail -Q 10 -W 5</userinput></screen>
</example><example id="embzl"><title>Setting an Alert to Mount a Font Cartridge</title><para>The following example shows how to set email alerts to occur every minute
for the <literal>finnish</literal> font cartridge when the print queue contains
5 print requests for the <literal>finnish</literal>.</para><screen># <userinput>lpadmin -S finnish -A mail -Q 5 -W 1</userinput></screen>
</example><example id="embzd"><title>Setting Up No Alerts for a Print Wheel</title><para>The following example shows how to set up no alerts for the <literal>elite</literal> print
wheel.</para><screen># <userinput>lpadmin -S elite -A none</userinput></screen>
</example>
</task><task id="printforms-36731"><title>How to Set Up an Alias for a Selectable
Character Set</title><indexterm><primary>alias for selectable character set</primary>
</indexterm><indexterm><primary>selectable character sets</primary><secondary>setting an alias</secondary>
</indexterm><tasksummary><para>You do not need to perform this procedure if the <filename>terminfo</filename> names
for the selectable character sets are adequate.  For more information on using
the <filename>terminfo</filename> database, see <olink targetptr="printcust-11157" remap="internal">Adding a terminfo Entry for an Unsupported Printer</olink>.</para>
</tasksummary><procedure><step id="printforms-step-24"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-25"><para>Display the names of the selectable character
sets for the specified printer type.</para><screen># <userinput>tput -T</userinput> <replaceable>printer-type</replaceable> <userinput>cs</userinput><replaceable>n</replaceable></screen><variablelist><varlistentry><term><option>T</option> <replaceable>printer-type</replaceable></term><listitem><para>Specifies the printer type found in the <filename>terminfo</filename> database.
 For information on entries in the <filename>terminfo</filename> database,
see <olink targetptr="printplan-15" remap="internal">Printer Type</olink>.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>n</replaceable></term><listitem><para>Specifies the number (0, 1, 2, 3, 4, 5, and so on) that represents
a selectable character set for the specified printer type. The system displays
the selectable character set name followed by the prompt symbol. For example, <literal>cs1</literal> could cause the system to display <literal>english#</literal>.</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, see the <olink targetdoc="refman" targetptr="tput-1" remap="external"><citerefentry><refentrytitle>tput</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man
page.</para>
</step><step id="printforms-step-26"><para>Set up an alias for a selectable character
set.</para><screen width="100"># <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-S</userinput> <replaceable>select-charset1=alias1,select-charset2=alias2...</replaceable></screen><variablelist><varlistentry><term><option>p</option> <replaceable>printer-name</replaceable></term><listitem><para>Specifies the printer on which you are setting up aliases
for selectable character sets.</para>
</listitem>
</varlistentry><varlistentry><term><option>S</option><replaceable>select-charset</replaceable></term><listitem><para>Specifies the electable character set name. The name can be
found in <olink targetptr="printforms-step-25" remap="internal">Step&nbsp;2</olink>. </para>
</listitem>
</varlistentry><varlistentry><term><replaceable>alias</replaceable></term><listitem><para>Is the alias for the specified selectable character set. This
alias can be used in addition to the selectable character set name.</para><para>You can set up more than one alias with this command. Use commas or
spaces to separate the aliases. If you use spaces, enclose the list of aliases
in quotation marks.</para>
</listitem>
</varlistentry>
</variablelist><para>The alias is added to the print server's  <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/configuration</filename> file.</para>
</step><step id="printforms-step-27"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on a system that is a print client of the print
server.</para>
</step><step id="printforms-step-28"><para>Set up an alias for the selectable character
set.</para><screen width="100"># <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-S</userinput> <replaceable>select-charset1=alias1,select-charset2=alias2...</replaceable></screen><para>In this command, the variables are the same as the variables in <olink targetptr="printforms-step-26" remap="internal">Step&nbsp;3</olink>.</para><para>The alias is added to the print client's  <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/configuration</filename> file.</para>
</step><step id="printforms-step-29"><para>Repeat <olink targetptr="printforms-step-27" remap="internal">Step&nbsp;4</olink> and <olink targetptr="printforms-step-28" remap="internal">Step&nbsp;5</olink> for
each print client that might need to use the alias.</para>
</step><step id="printforms-step-120"><para>On the print server and print clients,
verify that the selectable character set alias is listed in the output of
the following command.</para><screen># <userinput>lpstat -p</userinput> <replaceable>printer-name</replaceable> <userinput>-l</userinput></screen><para>Alternately, submit a print request that uses the alias for the selectable
character set and check for output.</para>
</step>
</procedure><example id="emjgk"><title>Setting Up an Alias for a Selectable Character Set</title><para><indexterm id="printforms-ix559"><primary>setting up</primary><secondary>character sets (example of)</secondary></indexterm>The following example shows how to
display the names of selectable character sets for the <literal>usascii</literal> selectable
character set on the printer <literal>luna</literal>. The printer <literal>luna</literal> is
a <literal>ln03</literal> printer type. This example also shows how to specify
text as an alias for the <literal>usascii</literal> selectable character set.</para><screen># <userinput>tput -T ln03 cs0</userinput>
usascii# <userinput>tput -T ln03 cs1</userinput>
english# <userinput>tput -T ln03 csn2</userinput>
finnish# <userinput>tput -T ln03 csn3</userinput>
japanese# <userinput>tput -T ln03 cs4</userinput>
norwegian#
# <userinput>lpadmin -p luna -S usascii=text</userinput></screen>
</example>
</task>
</sect1><sect1 id="eojcq"><title>Administering Print Filters (Task Map)</title><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Create a new print filter.</para>
</entry><entry><para>Create a new print filter for file types that the LP print service cannot
interpret.</para>
</entry><entry><para><olink targetptr="printcust-53777" remap="internal">How to Create a New Print Filter</olink></para>
</entry>
</row><row><entry><para>Add a print filter.</para>
</entry><entry><para>Add information about print filters, which are programs that convert
the content type of a file to a content type that is acceptable to the destination
printer.</para>
</entry><entry><para><olink targetptr="printforms-96887" remap="internal">How to Add a Print Filter</olink></para>
</entry>
</row><row><entry><para>Delete a print filter.</para>
</entry><entry><para>Delete information about print filters, which are programs that convert
the content type of a file to a content type that is acceptable to the destination
printer.</para>
</entry><entry><para><olink targetptr="printforms-76250" remap="internal">How to Delete a Print Filter</olink></para>
</entry>
</row><row><?PubTbl row rht="0.34in"?><entry><para>View information about a print filter.</para>
</entry><entry><para>Delete information about print filters, which are programs that convert
the content type of a file to a content type that is acceptable to the destination
printer.</para>
</entry><entry><para><olink targetptr="printforms-97732" remap="internal">How to View Information About a
Print Filter</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="printcust-45830"><title>Creating a New Print Filter</title><indexterm id="printcust-ix744"><primary>print filters</primary><secondary>creating (overview)</secondary>
</indexterm><indexterm id="printcust-ix745"><primary>creating print filters</primary>
</indexterm><para>A filter is used by the LP print service each time it has to print a
type of file that the printer cannot interpret. Creating a new print filter
is not easy, and it usually requires extensive experimentation. </para><itemizedlist><para>The process of defining a new print filter consists of two steps:</para><listitem><para>Writing a print filter program</para>
</listitem><listitem><para>Creating a print filter definition</para>
</listitem>
</itemizedlist><para>A print filter can be as simple or as complex as needed. Filters contain
input types, output types, and complex options that provide a language to
process command-line arguments within the filter.</para><para><indexterm id="printcust-ix746"><primary>printer(s)</primary><secondary>non-PostScript</secondary></indexterm>If you have nonPostScript printers, you have to create
and add print filters as required. First, you need to understand what print
filters are and the requirements that must be met by a filter program. </para><sect2 id="printcust-13170"><title>Writing a Print Filter Program</title><para>The LP print service provides filter programs in the <filename>/usr/lib/lp/postscript</filename> directory. These filters cover most PostScript printing situations,
where the destination printer requires the data to be in PostScript format.
A print filter program must be a binary executable file.</para><sect3 id="printcust-12213"><title>Types of Filters</title><indexterm id="printcust-ix747"><primary>print filters</primary><secondary>types of</secondary>
</indexterm><para>There are two types of print filters: fast filters and slow filters. </para><para><emphasis>Fast filters</emphasis> do not require much processing time
to prepare a file for printing. They must have access to the printer when
they run. To be capable of detecting printer faults, a print filter must be
a fast filter. Any filter that uses the <literal>PRINTER</literal> keyword
as a filter option must be installed as a fast filter.</para><para><emphasis>Slow filters</emphasis> require a great deal of processing
time to prepare a file for printing. They do not require access to the printer
when they run. Slow filters are run in the background so they do not tie up
the printer, allowing other files that do not need slow filtering to be printed.</para>
</sect3><sect3 id="printcust-25"><title>Converting Files</title><indexterm id="printcust-ix748"><primary>print filters</primary><secondary>used to convert files</secondary>
</indexterm><para>The LP print service uses print filters to convert files from one content
type to another content type. You can specify the accepted file content types
for each printer. The user specifies the file content type when submitting
a print request. Then, the LP print service finds a printer that can print
files of that content type. Because many applications can generate files for
various printers, this method is often sufficient. However, some applications
can generate files that cannot be printed on any available printers.</para><para><indexterm id="printcust-ix749"><primary>file content type</primary><secondary>converted by print filters</secondary></indexterm>Each time the
LP print service receives a request to print a type of file that is in a format
that cannot be accepted directly by a printer, the LP print service tries
to match the content type of the print request with the content type of the
available (or specified) printer. If there is a match, the file can be sent
directly to the printer without filtering. If no match is found, or if the
content type specifies that a filter be used, the LP print service tries to
match the content type of the file with the input content type of available
filters. In addition, the LP print service tries to match the output type
of the filter with the content type of the printer. When an appropriate filter
is found, the print request is passed through the filter.</para>
</sect3><sect3 id="printcust-26"><title>Handling Special Printing Modes</title><indexterm id="printcust-ix750"><primary>printing</primary><secondary>special modes</secondary>
</indexterm><indexterm id="printcust-ix751"><primary>print filters</primary><secondary>handling special modes</secondary>
</indexterm><para>A print filter handles special printing modes and requests to print
specific pages. A special printing mode is needed to print any characteristics
of print requests that require a customized filter. </para><itemizedlist><para>Filters handle the following characteristics:</para><listitem><para>Printer type</para>
</listitem><listitem><para>Character pitch</para>
</listitem><listitem><para>Line pitch</para>
</listitem><listitem><para>Page length</para>
</listitem><listitem><para>Page width</para>
</listitem><listitem><para>Pages to print</para>
</listitem><listitem><para>Character set</para>
</listitem><listitem><para>Form name</para>
</listitem><listitem><para>Number of copies</para>
</listitem>
</itemizedlist><para>The LP print service provides default settings for these characteristics.
However, a print filter can handle some characteristics more efficiently.
For example, some printers can handle multiple copies more efficiently than
the LP print service. So, in this case, you can provide a filter for multiple-copy
page control.</para>
</sect3><sect3 id="printcust-27"><title>Detecting Printer Faults</title><para>Each printer has its own way of detecting printer faults and transmitting
fault signals to the LP print service. The LP print service only checks for
hang-ups (loss of carrier) and excessive delays in printing.</para><para>Some printers provide good fault coverage and can send a message that
describes the reason for a fault. Other printers indicate a fault by using
signals other than the signals for loss of carrier signal or shut off of data
flow. A filter is required to interpret this additional printer fault information.</para><para><indexterm id="printcust-ix753"><primary>print filters</primary><secondary>putting a request on hold</secondary></indexterm>A filter can also
put a print request on hold, wait for a printer fault to clear, and then resume
printing. With this capability, the print request that was interrupted does
not need to be reprinted in its entirety. Only a filter that knows the control
sequences used by a printer can determine where to break a file into pages.
Consequently, only such a filter can find the place in the file where printing
should start after a fault is cleared. </para><para>When a print filter generates messages, those messages are handled by
the LP print service. If alerts are enabled, the LP print service sends alerts
to the system administrator. For further information, see <olink targetptr="gfjim" remap="internal">Setting Up Printer Fault Alerts by Using LP Print Commands</olink>.</para>
</sect3><sect3 id="printcust-45714"><title>Requirements for a Print Filter Program</title><indexterm id="printcust-ix754"><primary>print filters</primary><secondary>requirements for</secondary>
</indexterm><itemizedlist><para>A print filter can be simple or complex, but it has to meet the following
requirements:</para><listitem><para>The filter should get the contents of a file from its standard
input and send the converted file to the standard output.</para>
</listitem><listitem><para>A program cannot be used as a filter if it references external
files. You might be tempted to use a program such as<command>troff</command>, <command>nroff</command>, or a similar word processing program as a filter. The LP
print service does not recognize references to other files, known as <emphasis>include
files</emphasis>, from a filter program. Because <command>troff</command> and <command>nroff</command> programs allow include files, they can fail when used as filters.
If the program needs other files to complete its processing. The program t
should not be used as a filter.</para>
</listitem><listitem><para>The filter should not depend on files that normally would
not be accessible to a user. If a filter fails when run directly by a user,
it will fail when run by the LP print service.</para>
</listitem><listitem><para>A slow filter can send messages about errors in the file to
standard error. a fast filter should not. Error messages from a slow filter
are collected and sent to the user who submitted the print request.</para>
</listitem><listitem><para>If a slow filter dies because it received a signal, the print
request is stopped and the user who submitted the request is notified. Likewise,
if a slow filter exits with a nonzero exit code, the print request is stopped
and the user is notified. The exit codes from fast filters are treated differently.</para>
</listitem>
</itemizedlist><itemizedlist><para>If you want the filter to detect printer faults, it should also meet
the following requirements:</para><listitem><para>If possible, the filter should wait for a fault to be cleared
before exiting. The filter should also continue to print at the top of the
page where printing stopped after the fault is cleared. If you do not want
use the continuation feature, the LP print service stops the filter before
alerting the administrator.</para>
</listitem><listitem><para>The filter should send printer fault messages to its standard
error as soon as the fault is recognized. The filter does not have to exit,
but can wait for the fault to be cleared.</para>
</listitem><listitem><para>The filter should not send messages about errors in the file
to standard error. These messages should be included in the standard output,
where they can be read by the user.</para>
</listitem><listitem><para>The filter should exit with a zero exit code if the file is
finished printing (even if errors in the file have prevented it from being
printed correctly).</para>
</listitem><listitem><para>The filter should exit with a nonzero exit code, only if a
printer fault has prevented the filter from finishing a print request.</para>
</listitem><listitem><para>When added to the filter table, the filter must be added as
a fast filter.</para>
</listitem>
</itemizedlist>
</sect3>
</sect2><sect2 id="printcust-69439"><title>Creating a Print Filter Definition</title><indexterm id="printcust-ix755"><primary>print filters</primary><secondary>creating definitions</secondary>
</indexterm><para>A print filter definition tells the LP print service about the filter,
what print filter program to run, what kind of conversion the print filter
does, and so on. A set of filter descriptor files are provided in the <filename>/etc/lp/fd</filename> directory. These files describe the characteristics of the filters
(for example, fast filter or slow filter), and point to the filter programs
(for example, <filename>/usr/lib/lp/postscript/postdaisy</filename>). </para><para>When defining a new print filter, you must create a print filter definition. </para><itemizedlist><para>A print filter definition contains the following information used by
the LP print service:</para><listitem><para>Name of the filter program to run</para>
</listitem><listitem><para>Input types the filter program accepts</para>
</listitem><listitem><para>Output types the filter program produces</para>
</listitem><listitem><para>Printer types to which the filter program can send jobs</para>
</listitem><listitem><para>Names of specific printers to which the filter program can
send jobs</para>
</listitem><listitem><para>Filter types (either fast or slow)</para>
</listitem><listitem><para>Options</para>
</listitem>
</itemizedlist><para>You can type the characteristics as direct input to the <filename>lpfilter</filename> command.
You also can create a file that specifies the filter's characteristics, and
use the file name as input to the <command>lpfilter</command> command arguments.
Such a file is called a <emphasis>filter descriptor file</emphasis> and should
be located in the <filename>/etc/lp/fd</filename> directory. These files are
not the filters themselves. Rather, these files point to the filters.</para><para>Whether you store the information in a file, or type the information
directly on the command line, use the following format:</para><screen>Command: <replaceable>command-pathname [options]</replaceable>
Input types: <replaceable>input-type-list</replaceable>
Output types: <replaceable>output-type-list</replaceable>
Printer types: <replaceable>printer-type-list</replaceable>
Printers: <replaceable>printer-list</replaceable>
Filter type: fast or slow
Options: <replaceable>template-list</replaceable></screen><note><para>If you provide more than one definition (that is, more than one
line) for any filter characteristic other than <filename>Options</filename>,
only the second definition is used by the print service.</para>
</note><para>The information can be arranged in any order, and not all the information
is required. When you do not specify values, the values shown in the following
table are assigned by default. These values are not very useful, which is
why you should specify values.</para><table frame="topbot" id="printcust-60235"><title>Default Values for <command>lpfilter</command> Command</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colname="column1" colwidth="158*"/><colspec colname="column2" colwidth="238*"/><thead><row rowsep="1"><entry><para>Item</para>
</entry><entry><para>Default Value</para>
</entry>
</row>
</thead><tbody><row><entry><para>Input types</para>
</entry><entry><para><literal>any</literal></para>
</entry>
</row><row><entry><para>Output type</para>
</entry><entry><para><literal>any</literal></para>
</entry>
</row><row><entry><para>Printer types</para>
</entry><entry><para><literal>any</literal></para>
</entry>
</row><row><entry><para>Printers</para>
</entry><entry><para><literal>any</literal></para>
</entry>
</row><row><entry><para>Filter type</para>
</entry><entry><para><literal>slow</literal></para>
</entry>
</row>
</tbody>
</tgroup>
</table><sect3 id="printcust-28"><title><command>lpfilter</command> Command</title><para>Use the full path of the filter program. If there are any fixed options
that the program always needs, include them here.</para>
</sect3><sect3 id="printcust-29"><title><command>lpfilter</command> Input Types Argument</title><para>Input types is a list of file content types that the print filter can
process. The LP print service does limit the number of input types, but most
filters can accept only one input type. Several file types can be similar
enough, such that the filter can deal with them. You can use whatever names
you prefer, with a maximum of 14 alphanumeric characters and dashes. Do not
use underscores as part of the input type name.</para><para>The LP print service uses these names to match a filter to a file type,
so follow a consistent naming convention. For example, if more than one filter
can accept the same input type, use the same name for that input type when
you specify it for each filter. Inform your users of these names so that they
know how to identify the file type when submitting a file for printing.</para>
</sect3><sect3 id="printcust-30"><title><command>lpfilter</command> Output Types Argument</title><para>Output types is list of file types that the filter can produce as output.
For each input type, the filter produces a single output type. The output
type can vary, however, from job to job. The name of the output type is restricted
to 14 alphanumeric characters and dashes.</para><para>The output type names should either match the types of available (local
or remote) printers, or match the input types handled by other filters. The
LP print service groups filters in a shell pipeline if it finds that several
passes by different filters are needed to convert a file. You will unlikely
need this level of sophistication, but the LP print service allows it. Try
to find a set of filters that takes as input types all the different files
the users might want printed, and that converts those files directly into
file types the printer can handle.</para>
</sect3><sect3 id="printcust-31"><title><command>lpfilter</command> Printer Types
Argument</title><para>Printer types is a list of the types of printers into which the print
filter can convert files. For most printers and filters, you can leave this
part of the filter definition blank, because this list is identical to the
list of output types. However, this list can be different. For example, you
could have a printer with a single printer type for purposes of initialization.
However, that printer can recognize several different file content types.
Essentially, this printer has an internal filter that converts the various
file types into a filter type that it can handle. Thus, a filter might produce
one of several output types that match the file types that the printer can
handle. The print filter should be marked as working with that printer type.</para><para>As another example, you might have two different models of printers
that are listed as accepting the same file types. Due to slight differences
in manufacture, however, one printer deviates in the results it produces.
You label the printers as being of different printer types, say A and B, where
B is the printer that deviates. You create a filter that adjusts files to
account for the deviation produced by printers of type B. Because this filter
is needed only for those printer types, you would list this filter as working
only on type B printers.</para>
</sect3><sect3 id="printcust-32"><title><command>lpfilter</command> Printers Argument</title><para>A print filter normally can work with all printers that accept its output,
so you can usually skip this part of the filter definition.</para><para>You might, however, have some printers that are inappropriate for the
output that the filter produces. For example, you might want to dedicate one
printer for fast turnaround, only sending files that require no filtering
to that printer. Other printers of identical type can be used for files that
need extensive filtering before they can be printed.</para>
</sect3><sect3 id="printcust-33"><title><command>lpfilter</command> Filter Type Argument</title><para>The LP print service recognizes fast filters and slow filters, as described
in <olink targetptr="printcust-12213" remap="internal">Types of Filters</olink>.</para><para>Slow filters that are invoked by printing modes, by using the <command>lp</command> <option>y</option> command, must be run on the system from which the print request
originated. The LP print service cannot pass values for modes to print servers.
It can, however, match a file content type (specified after the <command>-T</command> option
of the <command>lp</command> command) to a content type on a print server.
Therefore, if you want to activate special modes on a print server, you must
specify content types that permit the LP print service to match input types
and output types.</para>
</sect3><sect3 id="printcust-34"><title><command>lpfilter</command> Options Argument</title><para>Options specify how different types of information are converted into
command-line arguments to the filter command. This information can include
specifications from a user (with the print request), the printer definition,
and the specifications implemented by any filters that are used to process
the request.</para>
</sect3><sect3 id="printcust-35"><title>Defining Print Filter Options With Templates</title><indexterm id="printcust-ix756"><primary>templates (print filters)</primary>
</indexterm><indexterm id="printcust-ix757"><primary>print filters</primary><secondary>templates to define options</secondary>
</indexterm><para>There are 13 sources of information for defining print filter options,
each of which is represented by a <emphasis>keyword</emphasis>. Each option
is defined in a <emphasis>template</emphasis>. A template is a statement in
a filter definition that defines an option to be passed to the filter command,
based on the value of one of the filter characteristics</para><para><indexterm id="printcust-ix758"><primary>print filters</primary><secondary>options keywords</secondary></indexterm>The options specified in
a filter definition can include none, all, or any subset of the 13 keywords.
In addition, a single keyword can be defined more than once, if multiple definitions
are required for a complete filter definition. The following table contains
descriptions of the 13 keywords available for defining options in a print
filter definition.</para><table frame="topbot" id="printcust-45015"><title>Keywords for Print Filter
Options</title><tgroup cols="4" colsep="0" rowsep="0"><colspec colname="column1" colwidth="90*"/><colspec colname="column2" colwidth="90*"/><colspec colname="column3" colwidth="89*"/><colspec colname="column4" colwidth="90*"/><thead><row rowsep="1"><entry><para><indexterm id="printcust-ix759"><primary>print filters</primary><secondary>characteristics of</secondary></indexterm>Option Characteristic </para>
</entry><entry><para>Keyword</para>
</entry><entry><para>Patterns</para>
</entry><entry><para>Example</para>
</entry>
</row>
</thead><tbody><row><entry><para>Content type (input)</para>
</entry><entry><para><literal>INPUT</literal></para>
</entry><entry><para><replaceable>content-type</replaceable></para>
</entry><entry><para><literal>troff</literal></para>
</entry>
</row><row><entry><para>Content type (output)</para>
</entry><entry><para><literal>OUTPUT</literal></para>
</entry><entry><para><replaceable>content-type</replaceable></para>
</entry><entry><para><literal>postscript,  impress</literal></para>
</entry>
</row><row><entry><para>Printer type</para>
</entry><entry><para><literal>TERM</literal></para>
</entry><entry><para><replaceable>printer-type</replaceable></para>
</entry><entry><para><literal>att495</literal></para>
</entry>
</row><row><entry><para>Printer name</para>
</entry><entry><para><literal>PRINTER</literal></para>
</entry><entry><para><replaceable>printer-name</replaceable></para>
</entry><entry><para><literal>lp1</literal></para>
</entry>
</row><row><entry><para>Character pitch</para>
</entry><entry><para><literal>CPI</literal></para>
</entry><entry><para><replaceable>scaled-decimal</replaceable></para>
</entry><entry><para><literal>10</literal></para>
</entry>
</row><row><entry><para>Line pitch</para>
</entry><entry><para><literal>LPI</literal></para>
</entry><entry><para><replaceable>scaled-decimal</replaceable></para>
</entry><entry><para><literal>6</literal></para>
</entry>
</row><row><entry><para>Page length</para>
</entry><entry><para><literal>LENGTH</literal></para>
</entry><entry><para><replaceable>scaled-decimal</replaceable></para>
</entry><entry><para><literal>66</literal></para>
</entry>
</row><row><entry><para>Page width</para>
</entry><entry><para><literal>WIDTH</literal></para>
</entry><entry><para><replaceable>scaled-decimal</replaceable></para>
</entry><entry><para><literal>80</literal></para>
</entry>
</row><row><entry><para>Pages to print</para>
</entry><entry><para><literal>PAGES</literal></para>
</entry><entry><para><replaceable>page-list</replaceable></para>
</entry><entry><para><literal>1-5,13-20</literal></para>
</entry>
</row><row><entry><para>Character set</para>
</entry><entry><para><literal>CHARSET</literal></para>
</entry><entry><para><replaceable>character-set</replaceable></para>
</entry><entry><para><literal>finnish</literal></para>
</entry>
</row><row><entry><para>Form name</para>
</entry><entry><para><literal>FORM</literal></para>
</entry><entry><para><replaceable>form-name</replaceable></para>
</entry><entry><para><literal>invoice2</literal></para>
</entry>
</row><row><entry><para>Number of copies</para>
</entry><entry><para><literal>COPIES</literal></para>
</entry><entry><para><replaceable>integer</replaceable></para>
</entry><entry><para><literal>3</literal></para>
</entry>
</row><row><entry><para><indexterm id="printcust-ix760"><primary>print filters</primary><secondary>characteristics of</secondary></indexterm>Special modes </para>
</entry><entry><para><literal>MODES</literal></para>
</entry><entry><para><replaceable>mode</replaceable></para>
</entry><entry><para><literal>landscape</literal></para>
</entry>
</row>
</tbody>
</tgroup>
</table><para>A print filter definition can include more than one template. Multiple
templates are entered on a single line and separated with commas, or they
are entered on separate lines, preceded by the Options: prefix.</para><para>The format of a template is as follows: <emphasis>keyword</emphasis><replaceable>pattern</replaceable> = <replaceable>replacement</replaceable></para><para>The <emphasis>keyword</emphasis> identifies the type of option being
registered for a particular characteristic of the filter.</para><para>The <replaceable>pattern</replaceable> is a specific option for the
keyword. </para><para>The <replaceable>replacement</replaceable> is what happens when the
keyword has the noted value.</para><itemizedlist><para>For an example of how an option is defined for a particular filter,
suppose you want to have the print service scheduler assign print requests
to filters following this criteria: </para><listitem><para>If the type of <literal>OUTPUT</literal> to be produced by
the filter is <literal>impress</literal>, then pass the <command>-I</command> option
to the filter. </para>
</listitem><listitem><para>If the type of <literal>OUTPUT</literal> to be produced by
the filter is <literal>postscript</literal>, then pass the <command>-P</command> option
to the filter. </para>
</listitem>
</itemizedlist><para>To specify these criteria, provide the following templates as options
to the <command>lpfilter</command> command:</para><screen>Options: OUTPUT impress=-I, OUTPUT postscript=-P</screen><para>If the <command>Options</command> line becomes too long, put each template
on a separate line, as follows: </para><screen>Options: OUTPUT impress=-I
Options: OUTPUT postscript=-P </screen><para>In both templates, the <replaceable>keyword</replaceable> is defined
as <literal>OUTPUT</literal>. In the first template, the pattern is <literal>impress</literal>, and the value of the <emphasis>replacement</emphasis> is <option>-I</option>.
In the second template, the value of <emphasis>pattern</emphasis> is <literal>postscript</literal>, and the value of <emphasis>replacement</emphasis> is <option>P</option>.</para><itemizedlist><para>To determine which values to supply for each type of template (that
is, for the <replaceable>pattern</replaceable> and <replaceable>replacement</replaceable> arguments
for each keyword), consider the following: </para><listitem><para>The values for the <literal>INPUT</literal> templates come
from the file content type that needs to be converted by the filter.</para>
</listitem><listitem><para>The values for the <literal>OUTPUT</literal> templates come
from the output type that has to be produced by the filter.</para>
</listitem><listitem><para>The value for the <literal>TERM</literal> template is the
printer type. </para>
</listitem><listitem><para>The value for the <literal>PRINTER</literal> template is the
name of the printer that will print the final output. </para>
</listitem><listitem><para>The values for the <literal>CPI</literal>, <literal>LPI</literal>, <literal>LENGTH</literal>, and <literal>WIDTH</literal> templates come from the user's
print request, the form being used, or the default values for the printer. </para>
</listitem><listitem><para>The value for the <literal>PAGES</literal> template is a list
of pages that should be printed. Typically, the value consists of a list of
page ranges separated by commas. Each page range consists of a pair of numbers
separated by a dash, or a single number. (For example, 1&ndash;5,6,8,10 indicates
pages 1 through 5, plus pages 6, 8, and 10.) However, whatever value was given
in the <option>P</option> option to a print request is passed unchanged. </para>
</listitem><listitem><para>The value for the <literal>CHARSET</literal> template is the
name of the character set to be used. </para>
</listitem><listitem><para>The value for the <literal>FORM</literal> template is the
name of the form requested by the  <command>lp</command> <option>f</option> command
(the command used to submit a print request). </para>
</listitem><listitem><para>The value of the <command>COPIES</command> template is the
number of copies of the file to print. If the filter uses this template, the
LP print service reduces to one the number of copies of the filtered file
it prints. This &ldquo;single copy&rdquo; includes the multiple copies that
are produced by the filter. </para>
</listitem><listitem><para>The value of the <command>MODES</command> template comes from
the <command>lp</command> <option>y</option> command. Because a user can specify
several <option>y</option> options, the <literal>MODES</literal> template
might have several values. The values are applied in the left-to-right order
given by the user. </para>
</listitem>
</itemizedlist><para>The <replaceable>replacement</replaceable> option shows how the value
of a template should be given to the filter program. This part typically a
literal option, sometimes with the placeholder asterisk (*) included to show
where the value goes. The <replaceable>pattern</replaceable> and <replaceable>replacement</replaceable> options also can use the regular expression syntax of the <command>ed</command> command for more complex conversion of user input options into
filter options. All regular expression syntax of <command>ed</command> is
supported, including the <command>\( ... \)</command> and <command>\n</command> constructions.
These constructions can be used to extract portions of the <replaceable>pattern</replaceable> option
for copying into the <replaceable>replacement</replaceable> option, and the <command>&amp;</command> option, which can be used to copy the entire <replaceable>pattern</replaceable> option into the <replaceable>replacement</replaceable> option.
For more information, see the <olink targetdoc="refman" targetptr="ed-1" remap="external"><citerefentry><refentrytitle>ed</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man
page.</para><note><para>If a comma or an equal sign (<command>=</command>) is included
in a <replaceable>pattern</replaceable> or a <replaceable>replacement</replaceable> option,
precede it with a backslash (<command>\</command>). A backslash in front of
any of these characters is removed when the <replaceable>pattern</replaceable> or <replaceable>replacement</replaceable> option is used.</para>
</note>
</sect3>
</sect2><task id="printcust-53777"><title>How to Create a New Print Filter</title><indexterm><primary>print filters</primary><secondary>how to create</secondary>
</indexterm><procedure><step id="printcust-step-37"><para>Log in as superuser, <literal>lp</literal>,
 or assume an equivalent role on the print server.</para>
</step><step id="printcust-step-38"><para>Create a print filter program.</para><para>For
information on print filter programs, see <olink targetptr="printcust-13170" remap="internal">Writing
a Print Filter Program</olink>. By convention, filter programs for PostScript
printers are located in the <filename>/usr/lib/lp/postscript</filename> directory.
You should put programs you create under the <filename>/usr/lib/lp</filename> directory
in a directory of your choosing. </para>
</step><step id="printcust-step-39"><para>Create a print filter definition.</para><para>For information on print filter definitions, see <olink targetptr="printcust-69439" remap="internal">Creating a Print Filter Definition</olink>. You
should save the print filter definition in a text file. By convention, filter
definitions are located in the <filename>/etc/lp/fd</filename> directory and
are identified with the <filename>.fd</filename> suffix.</para>
</step><step id="printcust-step-40"><para>Add the print filter to a print server.</para><para>For instructions, see <olink targetptr="printforms-96887" remap="internal">How to Add
a Print Filter</olink>.</para>
</step>
</procedure><example id="emqre"><title>Creating a New Print Filter</title><para>This example shows a print filter definition that is used to convert <literal>N37</literal> or <literal>Nlp</literal> to <literal>simple</literal>.</para><screen>Input types: N37, Nlp, simple
Output types: simple
Command: /usr/bin/col
Options: MODES expand = -x
Options: INPUT simple = -p -f</screen><para>In this example, the print filter program is named <literal>col</literal>.
Once you add the new print filter to a print server, a user's print requests
are handled as follows: </para><para>When a user types the following command:</para><screen>$ <userinput>lp -y expand report.doc</userinput></screen><para>The print filter program is run with the following arguments to convert
the file: </para><screen>/usr/bin/col -x -p -f</screen><para>When a user types the following command: </para><screen>$ <userinput>lp -T N37 -y expand report.doc</userinput></screen><para>The print filter program is run with the following arguments to convert
the file: </para><screen>/usr/bin/col -x</screen>
</example><example id="emqpo"><title>Creating a New Print Filter by Converting One Input Type to Another
Output Type</title><para><indexterm id="printcust-ix763"><primary>print filters</primary><secondary>to convert from troff to PostScript</secondary></indexterm><indexterm id="printcust-ix764"><primary>troff to PostScript conversion</primary></indexterm>This example shows a print filter definition that is used to convert
from <literal>troff</literal> to a PostScript file.</para><screen>Input types: troff
 Output types: postscript
 Printer types: PS
 Filter type: slow
 Command: /usr/lib/lp/postscript/dpost
 Options: LENGTH * = -l*
 Options: MODES port = -pp, MODES land = -pl
 Options: MODES group \=\([1-9]\) = -n\l</screen><para>In this example, the filter program is named <filename>dpost</filename>.
The filter program takes one input type, <filename>troff</filename>, produces
a <literal>postscript</literal> output, and works with any printer of type <literal>PS</literal> (PostScript). Users need to give just the abbreviation <literal>port</literal> or <literal>land</literal> when they ask for the paper orientation
to be in either portrait mode or landscape mode. Because these options are
not intrinsic to the LP print service, users must specify them by using the <command>lp -y</command> command. </para><itemizedlist><para>After you add the new print filter to a print server, print requests
will be handled as follows:</para><listitem><para>When a user types the following command to submit a <literal>troff</literal> file type for printing on a PostScript printer (type <literal>PS</literal>),
with requests for landscape orientation and a page length of 60 lines: </para><screen>$ <userinput>lp -T troff -o length=60 -y land -d luna ch1.doc</userinput></screen><para>The print filter program <command>dpost</command> is run with the following
arguments to convert the file:</para><screen>/usr/lib/lp/postscript/dpost -l60 -pl</screen>
</listitem><listitem><para>When a user enters the following command:</para><screen>$ <userinput>lp -T troff -y group=4 -d luna ch1.doc</userinput></screen><para>The print filter program <command>dpost</command> is run with the following
arguments to convert the file: </para><screen>/usr/lib/lp/postscript/dpost -n4</screen>
</listitem>
</itemizedlist>
</example>
</task>
</sect1><sect1 id="printforms-88247"><title>Administering Print Filters</title><para><indexterm id="printforms-ix567"><primary>managing print filters</primary></indexterm><indexterm id="printforms-ix568"><primary>print filters</primary><secondary>definition</secondary></indexterm><indexterm id="printforms-ix569"><primary>print filters</primary><secondary>administering</secondary></indexterm>Print
filters are programs that convert the content type of a file to a content
type that is acceptable to the destination printer. </para><itemizedlist><para>The LP print service uses filters to complete the following tasks:</para><listitem><para>Convert a file from one data format to another format so that
it can be printed properly on a specific type of printer</para>
</listitem><listitem><para>Handle the special modes of printing, such as two-sided printing,
landscape printing, draft-quality, and letter-quality printing</para>
</listitem><listitem><para>Detect printer faults and notify the LP print service, so
that the print service can alert users and system administrators</para>
</listitem>
</itemizedlist><para>Not every print filter can perform all these tasks. Because each task
is printer-specific, the tasks can be implemented separately.</para><para><indexterm id="printforms-ix575"><primary sortas="usr/lib/lp/postscript directory"><filename>/usr/lib/lp/postscript</filename> directory</primary></indexterm>The LP print service provides the PostScript filters
listed in <olink targetptr="printforms-63029" remap="internal">Table&nbsp;8&ndash;3</olink>.
The filter programs are located in the <filename>/usr/lib/lp/postscript</filename> directory.
For PostScript printing, you usually only need to install the filter programs
when setting up a print server. Solaris Print Manager automatically enables
the supplied filters. However, if you administer other printers, you might
need to administer print filters for them. </para><sect2 id="printforms-32"><title>Creating Print Filters</title><para>To create a new print filter, you must write a print filter program
and create a print filter definition. Filters contain input types, output
types, and complex options that provide a language to process command-line
arguments within the filter. For more information and step-by-step instructions,
see <olink targetptr="printcust-45830" remap="internal">Creating a New Print Filter</olink>.</para>
</sect2><sect2 id="printforms-33"><title>Adding, Changing, Deleting, and Restoring
Print Filters</title><indexterm id="printforms-ix577"><primary>print filters</primary><secondary>adding, changing, removing, restoring</secondary>
</indexterm><para>Print filters are added, changed, deleted, or restored on the print
server only.</para><para><indexterm id="printforms-ix581"><primary sortas="etc/lp/filter.table file"><filename>/etc/lp/filter.table</filename> file</primary></indexterm><indexterm id="printforms-ix583"><primary><command>lpfilter</command> command</primary></indexterm><indexterm id="printforms-ix584"><primary sortas="etc/lp/fd directory"><filename>/etc/lp/fd</filename> directory</primary></indexterm><indexterm id="printforms-ix585"><primary sortas="usr/lib/lp directory"><filename>/usr/lib/lp</filename> directory</primary></indexterm>You can use the <command>lpfilter</command> command to manage
the list of available filters. System information about filters is stored
in the <filename>/etc/lp/filter.table</filename> file. The <command>lpfilter</command> command
gets the information about filters to write to the table from filter descriptor
files. The filter descriptor files that are supplied (PostScript only) are
located in the <filename>/etc/lp/fd</filename> directory. The actual filter
programs are located in the <filename>/usr/lib/lp</filename> directory.  
 </para><para>The LP print service imposes no fixed limit on the number of print filters
you can define. You can remove filters that are no longer used to avoid extra
processing by the LP print service. (LP examines all filters to find a filter
that works for a specific print request.) If in doubt, do not remove a filter. </para><para>As you add, change, or delete filters, you can overwrite or remove some
of the original filters provided by the LP print service. You can restore
the original set of filters, if necessary. You can also remove any filters
you have added.</para><para><indexterm id="printforms-ix588"><primary>print filters</primary><secondary>PostScript</secondary></indexterm><indexterm id="printforms-ix589"><primary>print filters</primary><secondary>TranScript</secondary></indexterm><indexterm id="printforms-ix590"><primary>TranScript print filters</primary></indexterm><indexterm id="printforms-ix591"><primary>PostScript print filters</primary></indexterm>SunOS
software provides a default set of PostScript filters. Solaris Print Manager
automatically adds these filters to a print server. Some of the TranScript
filters used with LPD-based print services have SunOS equivalents, but other
TranScript filters do not. The following table lists the default PostScript
filters and identifies the equivalent TranScript filters, where applicable. </para><table frame="topbot" id="printforms-63029"><title>Default PostScript Filters</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="column1" colwidth="89*"/><colspec colname="column2" colwidth="162*"/><colspec colname="column3" colwidth="108*"/><thead><row rowsep="1"><entry><para>PostScript Filter</para>
</entry><entry><para>Action</para>
</entry><entry><para>TranScript Equivalent</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>download</literal></para>
</entry><entry><para>Used to download fonts</para>
</entry><entry><para></para>
</entry>
</row><row><entry><para><literal>dpost</literal></para>
</entry><entry><para>Changes <literal>ditroff</literal> to PostScript</para>
</entry><entry><para><literal>psdit</literal></para>
</entry>
</row><row><entry><para><literal>postdaisy</literal></para>
</entry><entry><para>Changes <literal>daisy</literal> to PostScript</para>
</entry><entry>
</entry>
</row><row><entry><para><literal>postdmd</literal></para>
</entry><entry><para>Changes <literal>dmd</literal> to PostScript</para>
</entry><entry>
</entry>
</row><row><entry><para><literal>postio</literal></para>
</entry><entry><para>Used for serial interface for PostScript printer</para>
</entry><entry><para><literal>pscomm</literal></para>
</entry>
</row><row><entry><para><literal>postior</literal></para>
</entry><entry><para>Used to communicate with printer</para>
</entry><entry>
</entry>
</row><row><entry><para><literal>postmd</literal></para>
</entry><entry><para>Changes matrix gray scales to PostScript</para>
</entry><entry>
</entry>
</row><row><entry><para><literal>postplot</literal></para>
</entry><entry><para>Changes <literal>plot</literal> to PostScript</para>
</entry><entry><para><literal>psplot</literal></para>
</entry>
</row><row><entry><para><literal>postprint</literal></para>
</entry><entry><para>Changes <literal>simple</literal> to PostScript</para>
</entry><entry><para><literal>enscript</literal></para>
</entry>
</row><row><entry><para><literal>postreverse</literal></para>
</entry><entry><para>Used to reverse or select pages</para>
</entry><entry><para><literal>psrev</literal></para>
</entry>
</row><row><entry><para><literal>posttek</literal></para>
</entry><entry><para>Changes <literal>TEK4014</literal> to PostScript</para>
</entry><entry><para><literal>ps4014</literal></para>
</entry>
</row>
</tbody>
</tgroup>
</table><itemizedlist><para>The SunOS software does <emphasis>not</emphasis> provide the following
filters: </para><listitem><para><literal>TEX</literal></para>
</listitem><listitem><para><literal>oscat</literal> (NeWSprint <literal>opost</literal>)</para>
</listitem><listitem><para>Enscript</para>
</listitem>
</itemizedlist><para>The <literal>postreverse</literal>, <literal>postprint</literal>, <literal>postio</literal>, and <literal>dpost</literal> filters are provided in place
of Enscript.</para><para>Solaris Print Manager adds the default PostScript filters to a print
server. If you have printing needs that are not met by these filters, see <olink targetptr="printcust-53777" remap="internal">How to Create a New Print Filter</olink>. This
section provides information about writing a custom print filter.</para>
</sect2><task id="printforms-96887"><title>How to Add a Print Filter</title><indexterm><primary>print filters</primary><secondary>adding (how to)</secondary>
</indexterm><indexterm><primary>adding print filters</primary>
</indexterm><procedure><step id="printforms-step-35"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-36"><para>Add a print filter that is based on a
print filter definition.</para><screen># <userinput>lpfilter -f</userinput> <replaceable>filter-name</replaceable> <userinput>-F</userinput> <replaceable>filter-definition</replaceable></screen><variablelist><varlistentry><term><option>f</option> <replaceable>filter-name</replaceable></term><listitem><para>Specifies the name you choose for the print filter.</para>
</listitem>
</varlistentry><varlistentry><term><option>F</option> <replaceable>filter-definition</replaceable></term><listitem><para>Specifies the name of the print filter definition.</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, see the <olink targetdoc="refman" targetptr="lpfilter-1m" remap="external"><citerefentry><refentrytitle>lpfilter</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para><indexterm id="printforms-ix593"><primary><filename>/etc/lp/filter.table</filename> file</primary></indexterm>The print filter is added in the print server's <filename>/etc/lp/filter.table</filename> file. </para>
</step><step id="printforms-step-115"><para>Verify that the print filter was added.</para><screen># <userinput>lpfilter -f</userinput> <replaceable>filter-name</replaceable> <userinput>-l</userinput></screen>
</step>
</procedure><example id="emjgv"><title>Adding a Print Filter</title><para>The following example shows how to add the <literal>daisytroff</literal> print
filter that has the <literal>daisytroff.fd</literal> print filter definition.</para><screen># <userinput>lpfilter -f daisytroff -F /etc/lp/fd/daisytroff.fd</userinput></screen>
</example>
</task><task id="printforms-76250"><title>How to Delete a Print Filter</title><indexterm><primary>print filters</primary><secondary>deleting</secondary>
</indexterm><indexterm><primary>deleting print filters</primary>
</indexterm><procedure><step id="printforms-step-40"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-41"><para>Delete the print filter.</para><screen># <userinput>lpfilter -f</userinput> <replaceable>filter-name</replaceable> <userinput>-x</userinput></screen><variablelist><varlistentry><term><option>f</option></term><term><replaceable>filter-name</replaceable></term><listitem><para>Specifies the name of the print filter to be deleted.</para>
</listitem>
</varlistentry><varlistentry><term><option>x</option></term><listitem><para>Deletes the specified filter.</para>
</listitem>
</varlistentry>
</variablelist><para><indexterm id="frcdo"><primary><filename>/etc/lp/filter.table</filename> file</primary><secondary sortas="">filter deleted from</secondary></indexterm>The
print filter is deleted from the print server's <filename>/etc/lp/filter.table</filename> file. </para>
</step><step id="printforms-step-116"><para>Verify that the filter was deleted.</para><screen># <userinput>lpfilter -f</userinput> <replaceable>filter-name</replaceable> <userinput>-l</userinput></screen><para>You should receive an error indicating that no filter by the specified
name exists.</para>
</step>
</procedure><example id="emjgu"><title>Deleting a Print Filter</title><para>The following example shows how to delete the <literal>daisytroff</literal> print
filter.</para><screen># <userinput>lpfilter -f daisytroff -x</userinput></screen>
</example>
</task><task id="printforms-97732"><title>How to View Information About a Print Filter</title><indexterm><primary>print filters</primary><secondary>viewing information about</secondary>
</indexterm><procedure><step id="printforms-step-45"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-46"><para>Request information about a print filter. </para><screen># <userinput>lpfilter -f</userinput> <replaceable>filter-name</replaceable> <userinput>-l</userinput></screen><variablelist><varlistentry><term><option>f</option></term><listitem><para>Specifies the print filter for which you want to view information.
Specify <literal>all</literal> for <replaceable>filter-name</replaceable> to
view information about all available print filters.</para>
</listitem>
</varlistentry><varlistentry><term><option>l</option></term><listitem><para>Displays information about the specified filter.</para>
</listitem>
</varlistentry>
</variablelist><para>Information about the specified print filter or filters is displayed.</para>
</step>
</procedure><example id="emjgn"><title>Viewing Information About a Print Filter</title><para>This example shows how to request information for the <literal>postdaisy</literal> print
filter. Sample command output follows.</para><screen># <userinput>lpfilter -f postdaisy -l</userinput>
Input types: daisy
Output types: postscript
Printer types: any
Printers: any
Filter type: slow
Command: /usr/lib/lp/postscript/postdaisy
Options: PAGES * = -o*
Options: COPIES * = -c*
Options: MODES group = -n2
Options: MODES group\=\([2-9]\) = -n\1
Options: MODES portrait = -pp
Options: MODES landscape = -pl
Options: MODES x\=\(\-*[\.0-9]*\) = -x\1
Options: MODES y\=\(\-*[\.0-9]*\) = -y\1
Options: MODES magnify\=\([\.0-9]*\) = -m\1</screen>
</example><example id="embzg"><title>Viewing Information About All Print Filters on a System</title><para>This example shows how to display all the print filters that have been
added to the system. Sample command output follows.</para><screen># <userinput>lpfilter -f all -l | grep Filter</userinput>
(Filter "download")
Filter type: fast
(Filter "postio")
Filter type: fast
(Filter "postior")
Filter type: fast
(Filter "postreverse")
Filter type: slow</screen>
</example><example id="embzp"><title>Redirecting Information About a Print Filter</title><para>This example shows how to redirect information about the <literal>daisytroff</literal> filter to a file. This task is useful if a filter definition is
removed unintentionally.</para><screen># <userinput>lpfilter -f daisytroff -l &gt; daisytroff.fd</userinput></screen>
</example>
</task>
</sect1><sect1 id="eojco"><title>Administering Forms (Task Map)</title><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33.27*"/><colspec colwidth="32.87*"/><colspec colwidth="32.87*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><?PubTbl row rht="0.84in"?><entry><para>Create a new form definition.</para>
</entry><entry><para>Provide a new form definition by specifying information for nine required
printer characteristics.</para>
</entry><entry><para><olink targetptr="printcust-65472" remap="internal">How to Create a New Printer Form
Definition</olink></para>
</entry>
</row><row><entry><para>Limit user access to a form.</para>
</entry><entry><para>Control user access to printers and forms that are available on the
network.</para>
</entry><entry><para><olink targetptr="printforms-12946" remap="internal">How to Limit User Access to a Form</olink></para>
</entry>
</row><row><entry><para>Add a form.</para>
</entry><entry><para>Add the definition of a form to the list of available forms, so that
the LP print service can recognize the form.</para>
</entry><entry><para><olink targetptr="printforms-70477" remap="internal">How to Add a Form</olink></para>
</entry>
</row><row><entry><para>Delete a form.</para>
</entry><entry><para>Remove the definition of a form from the list of available forms that
are recognized by the LP print service.</para>
</entry><entry><para><olink targetptr="printforms-98930" remap="internal">How to Delete a Form</olink></para>
</entry>
</row><row><entry><para>Mount a form.</para>
</entry><entry><para>Use the <command>mount</command> command to notify the LP print service
to accept print requests for a form with a specific definition.</para>
</entry><entry><para><olink targetptr="printforms-31385" remap="internal">How to Unmount and Mount a Form</olink></para>
</entry>
</row><row><entry><para>Set an alert to mount a form.</para>
</entry><entry><para>Set alerts for forms that are mounted to a printer.</para>
</entry><entry><para><olink targetptr="printforms-44360" remap="internal">How to Set an Alert to Mount a Form</olink></para>
</entry>
</row><row><entry><para>View information about a form.</para>
</entry><entry><para>View form names and other form information by listing the contents of
the <filename>/etc/lp/forms</filename> directory.</para>
</entry><entry><para><olink targetptr="printforms-40098" remap="internal">How to View Information About a
Form</olink></para>
</entry>
</row><row><entry><para>View the current status of a form.</para>
</entry><entry><para>Use the <command>lpforms</command> command to display the current status
of a form.</para>
</entry><entry><para><olink targetptr="printforms-67212" remap="internal">How to View the Current Status of
a Form</olink></para>
</entry>
</row><row><entry><para>Limit printer access to a form.</para>
</entry><entry><para>Control what forms printers have access to.</para>
</entry><entry><para><olink targetptr="printforms-12033" remap="internal">How to Limit Printer Access to a
Form</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="printcust-30290"><title>Creating a New Printer Form</title><indexterm id="printcust-ix765"><primary>forms</primary><secondary>creating</secondary>
</indexterm><indexterm id="printcust-ix766"><primary>creating</primary><secondary>forms</secondary>
</indexterm><para>When you want to provide a new form, you must define its characteristics
by specifying information for nine required printer characteristics (such
as page length and page width) as input to the <filename>lpforms</filename> command. </para><itemizedlist><para>The LP print service uses this information to perform the following
tasks:</para><listitem><para>Initialize the printer so that printing is done properly on
the form</para>
</listitem><listitem><para>Send reminders to the system administrator about how to handle
the form</para>
</listitem>
</itemizedlist><para>The form name can be anything you choose, as long as it does not contain
more than 14 alphanumeric characters or any underscores. The information must
use the following format:</para><screen>Page length: <replaceable>scaled-number</replaceable>
Page width: <replaceable>scaled-number</replaceable>
Number of pages: <replaceable>integer</replaceable>
Line pitch: <replaceable>scaled-number</replaceable>
Character pitch: <replaceable>scaled-number</replaceable>
Character set choice: <replaceable>character-set-name</replaceable> [,mandatory]
Ribbon color: <replaceable>ribbon-color</replaceable>
Comment:
<replaceable>informal notes about the form</replaceable>
Alignment pattern: <replaceable>[content-type] alignment pattern</replaceable></screen><para>The optional word <literal>[,mandatory]</literal>, means that the user
cannot override the character set choice in the form. The <replaceable>content-type</replaceable> can be given, although this information is optional, with an
alignment pattern. If this value is given, the print service uses it to determine,
as necessary, how to filter and print the file.</para><itemizedlist><para>Aside from following two exceptions, the information can appear in any
order:</para><listitem><para>The <literal>Alignment pattern</literal> (which must always
be last).</para>
</listitem><listitem><para>The <literal>comment</literal> (which must always follow the
line with the <literal>Comment:</literal> prompt).</para><para>If the comment
contains a line that begins with a key phrase, such as <literal>Page length</literal>, <literal>Page width</literal>, and so on, precede that line with a &gt; character so that
the key phrase is not at the beginning of the line. The initial &gt; character
is stripped from the comment and is not displayed.</para>
</listitem>
</itemizedlist><para><indexterm id="printcust-ix767"><primary>forms</primary><secondary>default values for</secondary></indexterm><indexterm id="ggfjf"><primary>default values</primary><secondary>for printer forms</secondary></indexterm>Not all of the information
must be given. When you do not specify values, the default values in the following
table are assigned. Before running the <filename>lpforms</filename> command,
gather the following information about the new form that is described in this
table.</para><table frame="topbot" id="printcust-19368"><title>Default Values for Printer
Forms</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="column1" colwidth="90*"/><colspec colname="column2" colwidth="90*"/><colspec colname="column3" colwidth="177*"/><thead><row rowsep="1"><entry><para>Value</para>
</entry><entry><para>Default</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para>Page length</para>
</entry><entry><para>66 lines</para>
</entry><entry><para>The length of the form, or the length of each page in a multipage form.
This information can be the number of lines, or the size in inches or centimeters.</para>
</entry>
</row><row><entry><para>Page width</para>
</entry><entry><para>80 columns</para>
</entry><entry><para>The width of the form, in characters, inches, or centimeters.</para>
</entry>
</row><row><entry><para>Number of pages</para>
</entry><entry><para>1</para>
</entry><entry><para>The number of pages in a multipage form. The LP print service uses this
number with a print filter (if available) to restrict the alignment pattern
to a length of one form. See the description of alignment pattern below. If
no filter is available, the LP print service does not truncate the output.</para>
</entry>
</row><row><entry><para>Line pitch</para>
</entry><entry><para>6 lines per inch</para>
</entry><entry><para>A measurement of how close lines appear on the form. Line pitch is also
called <emphasis>leading</emphasis>. Character pitch is the distance between
two lines, from baseline to baseline, measured by either lines per inch or
lines per centimeter.</para>
</entry>
</row><row><entry><para>Character pitch</para>
</entry><entry><para>10 characters per inch</para>
</entry><entry><para>A measurement of how close together characters appear on the form. It
is the distance between characters, measured by either characters per inch
or characters per centimeter.</para>
</entry>
</row><row><entry><para>Character set choice</para>
</entry><entry><para>Any</para>
</entry><entry><para>The character set, print wheel, or font cartridge that should be used
when this form is used. Users can choose a different character set for their
own print requests when using this form. Or, you can require that only one
character set be used.</para>
</entry>
</row><row><entry><para>Ribbon color</para>
</entry><entry><para>Any</para>
</entry><entry><para>If the form should always be printed using a certain color ribbon, the
LP print service can give a mount alert message indicating which color to
use.</para>
</entry>
</row><row><entry><para>Comment </para>
</entry><entry><para>(No default)</para>
</entry><entry><para>Any remarks that might help users understand the form. For example,
the remarks could indicate the name of the form, its revision, its purpose,
or restrictions on its use.</para>
</entry>
</row><row><entry><para><indexterm id="printcust-ix768"><primary>alignment pattern</primary><secondary>defining</secondary></indexterm>Alignment pattern </para>
</entry><entry><para>(No default)</para>
</entry><entry><para>A sample file that the LP print service uses to fill one blank form.
When mounting the form, you can print this pattern on the form to align it
properly. You can also define a content type for this pattern so that the
print service knows how to print it.</para>
</entry>
</row>
</tbody>
</tgroup>
</table><note><para>The LP print service does not try to mask sensitive information
in the alignment pattern. If you do not want sensitive information printed
on sample forms, for example when you align checks, then you should mask the
appropriate data. The LP print service keeps the alignment pattern stored
in a safe place, where only users logged in as superuser or <literal>lp</literal> user
can read it.</para>
</note><para>When you have gathered the information for the form, specify it as input
to the <command>lpforms</command> command. You should record this information
first in a separate file so that you can edit it before specifying it with
the <command>lpforms</command> command. You can then use the file as input
instead of typing each piece of information separately after a prompt.</para><task id="printcust-65472"><title>How to Create a New Printer Form Definition</title><procedure><step id="printcust-step-43"><para>Log in as superuser, <literal>lp</literal>,
 or assume an equivalent role on the print server.</para>
</step><step id="printcust-step-44"><para>Create a form definition file.</para><para>For
a description on creating printer forms, see <olink targetptr="printcust-30290" remap="internal">Creating
a New Printer Form</olink>. You should save the printer definition in a text
file. </para>
</step><step id="printcust-step-45"><para>Add the form to the LP print service.</para><screen># <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-M -f</userinput> <replaceable>form-name</replaceable></screen>
</step><step id="printcust-step-46"><para>Add the form to a print server.</para><para>For
instructions, see <olink targetptr="printforms-70477" remap="internal">How to Add a Form</olink>.
 </para>
</step>
</procedure>
</task>
</sect1><sect1 id="printforms-48"><title>Administering Forms</title><para>A <emphasis>form</emphasis> is a sheet of paper on which information
is printed in a predetermined format. Unlike plain paper stock, forms usually
have text or graphics preprinted on them. Common examples of forms are company
letterhead, invoices, blank checks, receipts, and labels.</para><para>The term <emphasis>form</emphasis> has two meanings: the physical medium
(the paper) and the software that defines a form to the LP print service.</para><para>The LP print service allows you to control the use of forms. This section
provides information about adding, changing, deleting, mounting, and limiting
access to forms.</para><sect2 id="printforms-70392"><title>Adding, Changing, or Deleting Forms</title><indexterm id="printforms-ix603"><primary>forms</primary><secondary>adding, changing, deleting</secondary>
</indexterm><para>When you add a form, you tell the LP print service to include the form
in its list of available forms. You also have to supply the information required
to describe or define the form. Although you can specify such definitions
when you add the form, it helps to create the definitions first and save them
in files. You can then change the form definition by editing the file.</para><note><para>No form definitions are supplied with the LP print service.</para>
</note><para>To change a form, you must re-add the form with a different definition.</para><para>The LP print service imposes no limit on the number of forms you can
define. However, you should delete forms that are no longer appropriate. Obsolete
forms can result in unnecessary processing by the print service.</para>
</sect2><task id="printforms-70477"><title>How to Add a Form</title><indexterm><primary>forms</primary><secondary>adding</secondary>
</indexterm><indexterm><primary>adding forms</primary>
</indexterm><procedure><step id="printforms-step-50"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-51"><para>Add a form that is based on a form definition.</para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-F /etc/lp/forms/</userinput><replaceable>form</replaceable></screen><variablelist><varlistentry><term><option>f</option></term><listitem><para>Specifies the name you choose for the form</para>
</listitem>
</varlistentry><varlistentry><term><option>F</option> <filename>/etc/lp/forms/</filename> <replaceable>form</replaceable></term><listitem><para>Specifies the name of the form definition.</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, see the <olink targetdoc="refman" targetptr="lpforms-1m" remap="external"><citerefentry><refentrytitle>lpforms</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para><indexterm id="printforms-ix616"><primary sortas="etc/lp/forms/form-name/describe file"><filename>/etc/lp/forms/form-name/describe</filename> file</primary></indexterm>The form is added to the print server's <filename>/etc/lp/forms/</filename><replaceable>form-name</replaceable><filename>/describe</filename> file. </para>
</step><step id="printforms-step-117"><para>Verify that the form was added by checking
the output of the following command:</para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-l</userinput></screen>
</step>
</procedure><example id="emjgs"><title>Adding a Form</title><para>The following example shows how to add the <literal>medical</literal> form
that uses the <literal>medical.fmd</literal> form definition.</para><screen># <userinput>lpforms -f medical -F /etc/lp/forms/medical.fmd</userinput></screen>
</example><taskrelated role="see-also"><para>Before the form can be used, one or more printers must be given access
to the form. For more information, see <olink targetptr="printforms-12033" remap="internal">How
to Limit Printer Access to a Form</olink>. </para>
</taskrelated>
</task><task id="printforms-98930"><title>How to Delete a Form</title><indexterm><primary>forms</primary><secondary>deleting</secondary>
</indexterm><indexterm><primary>deleting forms</primary>
</indexterm><procedure><step id="printforms-step-55"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-56"><para>Delete the form.</para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-x</userinput></screen><variablelist><varlistentry><term><option>f</option></term><listitem><para>Is the form to be deleted.</para>
</listitem>
</varlistentry><varlistentry><term><option>x</option></term><listitem><para>Deletes the specified form</para>
</listitem>
</varlistentry>
</variablelist><para><indexterm id="printforms-ix621"><primary sortas="etc/lp/forms/form-name file"><filename>/etc/lp/forms/form-name</filename> file</primary></indexterm>The form is deleted from <filename>/etc/lp/forms/</filename><replaceable>form-name</replaceable> file. </para><para>For more information, see the <olink targetdoc="refman" targetptr="lpforms-1m" remap="external"><citerefentry><refentrytitle>lpforms</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</step><step id="printforms-step-112"><para>Verify that the form was deleted.</para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-l</userinput></screen><para>You should receive an error indicating that a form by the specified
name does not exist.</para>
</step>
</procedure><example id="emjgo"><title>Deleting a Form</title><para>The following example shows how to delete the <literal>medical</literal> form.</para><screen># <userinput>lpforms -f medical -x</userinput></screen>
</example>
</task><sect2 id="printforms-83300"><title>Mounting Forms</title><indexterm id="printforms-ix606"><primary>forms</primary><secondary>mounting (overview)</secondary>
</indexterm><indexterm id="printforms-ix607"><primary>mounting forms</primary>
</indexterm><para>To print a form, you must load the paper in the printer and use a command
to <emphasis>mount</emphasis> the form. This command notifies the LP print
service that print requests submitted to the printer are to be printed using
the form definition. </para><itemizedlist><para>If you use one printer for different types of printing, including forms,
you should do the following:</para><listitem><para>Disable the printer before you load the paper and mount the
form. </para>
</listitem><listitem><para>Re-enable the printer when the form is ready. Otherwise, the
LP print service will continue to print files that do not need the form on
the printer. </para>
</listitem>
</itemizedlist><para>When you mount a form, ensure that it is aligned properly. If an alignment
pattern has been defined for the form, you can request that the pattern print
repeatedly after you have mounted the form. Let the pattern print repeatedly
until you have adjusted the printer so the alignment is correct.</para><para>When you want to change or discontinue using a form on a printer, you
must notify the LP print service by unmounting the form.</para>
</sect2><task id="printforms-31385"><title>How to Unmount and Mount a Form</title><indexterm><primary>forms</primary><secondary>unmounting and mounting</secondary>
</indexterm><indexterm><primary>mounting forms</primary>
</indexterm><indexterm><primary>unmounting forms</primary>
</indexterm><procedure><step id="printforms-step-60"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-61"><para>Stop accepting print requests on the printer
on which you are unmounting the current form.</para><screen># <userinput>reject</userinput> <replaceable>printer-name</replaceable></screen><para><replaceable>printer-name</replaceable> is the name of the printer on
which you are unmounting a form.</para><para>New print requests (which might not require the form) are not allowed
to enter the printer's queue.</para>
</step><step id="printforms-step-62"><para><indexterm id="printforms-ix626"><primary><command>lpadmin</command> command</primary><secondary>mounting forms with (how to)</secondary></indexterm><indexterm id="printforms-ix627"><primary><command>lpadmin</command> command</primary><secondary>unmounting forms with (how to)</secondary></indexterm>Unmount
the current form. </para><screen># <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-M -f none</userinput></screen><para>In this command, the variable <replaceable>printer-name</replaceable> is
the same variable that is used in <olink targetptr="printforms-step-61" remap="internal">Step&nbsp;2</olink>.</para><para>The current form is deleted from the print server's  <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/configuration</filename> file. </para>
</step><step id="printforms-step-63"><para><indexterm id="printforms-ix629"><primary>forms</primary><secondary>paper loading and removing</secondary></indexterm><indexterm id="printforms-ix634"><primary>alignment pattern</primary><secondary>printing</secondary></indexterm>Remove the form paper from the printer.  </para>
</step><step id="printforms-step-64"><para>Load the new form paper for the next print
request. </para>
</step><step id="printforms-step-65"><para>Mount the form. </para><screen># <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-M -f</userinput> <replaceable>form-name</replaceable>[<userinput>-a -o filebreak</userinput>]</screen><variablelist><varlistentry><term><option>p</option></term><listitem><para>Specifies the printer on which you are mounting a form.</para>
</listitem>
</varlistentry><varlistentry><term><option>M</option></term><listitem><para>Specifies the name of the form to be mounted.</para>
</listitem>
</varlistentry><varlistentry><term><option>a</option> <option>o</option> <command>filebreak</command></term><listitem><para>Optionally enables you to print a copy of the alignment pattern
defined for the form, if this definition exists.</para>
</listitem>
</varlistentry>
</variablelist><variablelist><varlistentry><term><option>p</option> <replaceable>printer-name</replaceable></term><listitem><para>Printer on which you are mounting a form.</para>
</listitem>
</varlistentry><varlistentry><term><option>M</option> <option>f</option> <replaceable>form-name</replaceable></term><listitem><para>Name of the form to be mounted.</para>
</listitem>
</varlistentry>
</variablelist><para>The specified form is added in the print server's <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/configuration</filename> file. </para>
</step><step id="printforms-step-66"><para>Start accepting print requests on the
printer. </para><screen># <userinput>accept</userinput> <replaceable>printer-name</replaceable></screen><para>The printer is ready to print the form you just mounted.</para>
</step><step id="printforms-step-119"><para>Verify that the form has been mounted.</para><screen># <userinput>lpstat -p</userinput> <replaceable>printer-name</replaceable> <userinput>-l</userinput></screen><para>Otherwise, submit a print request that requires the new form and check
the printer for output.</para>
</step>
</procedure><example id="emjgr"><title>Unmounting a Form</title><para>The following example shows the process of unmounting the currently
mounted form on the printer <literal>luna</literal>.</para><screen># <userinput>reject luna</userinput>
destination "luna" will no longer accept requests
# <userinput>lpadmin -p luna -M f none</userinput>
# <userinput>accept luna</userinput>
destination "luna" now accepting requests</screen>
</example><example id="embzo"><title>Mounting a Form</title><para>The following example shows the process of mounting the <literal>medical</literal> form
on the printer <literal>luna</literal>.</para><screen># <userinput>reject luna</userinput>
destination "luna" will no longer accept requests
# <userinput>lpadmin -p luna -M f medical -a -o filebreak</userinput>
# <userinput>accept luna</userinput>
destination "luna" now accepting requests</screen>
</example>
</task><sect2 id="printforms-45"><title>Tracking Forms</title><indexterm id="printref-ix212"><primary>forms</primary><secondary>tracking mounting (overview)</secondary>
</indexterm><indexterm id="printref-ix213"><primary>LP print service</primary><secondary>tracking forms (overview)</secondary>
</indexterm><indexterm><primary>tracking forms</primary>
</indexterm><para>The LP print service helps you track which forms are mounted on each
printer. The print service also notifies you when it cannot find a description
it needs to print a form. You are responsible for creating form descriptions,
and mounting and unmounting form paper in each printer. You complete this
task either as part of setting up a printer or in response to alerts from
the LP print service.</para><para>Users can specify the form on which they want a job to print. As superuser,
you can mount a specific form, then tell the LP print service that the form
is available and on which printer it is mounted. Users can submit print requests
specifying a particular form. When the LP print service receives the request,
it sends an alert message to <literal>root</literal> requesting that you mount
the form.</para>
</sect2><sect2 id="printforms-30782"><title>Defining Alerts for Mounting Forms</title><indexterm id="printforms-ix608"><primary>forms</primary><secondary>alerts for mounting</secondary>
</indexterm><indexterm id="printforms-ix609"><primary>alerts</primary><secondary>for mounting forms</secondary>
</indexterm><para>You request alerts for mounting forms in the same way that you request
other alerts from the LP print service. For general information about alerts,
see <olink targetptr="gfjhf" remap="internal">Setting Up Printer Fault Recovery by Using LP
Print Commands</olink>.</para>
</sect2><task id="printforms-44360"><title>How to Set an Alert to Mount a Form</title><procedure><step id="printforms-step-70"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-71"><para><indexterm id="printforms-ix640"><primary><command>lpadmin</command> command</primary><secondary>setting alerts to mount forms with (how to)</secondary></indexterm>Set a request alert for mounting a form. </para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-A</userinput> <replaceable>alert</replaceable> [<userinput>-Q</userinput> <replaceable>requests</replaceable>] [<userinput>-W</userinput> <replaceable>minutes</replaceable>]</screen><variablelist><varlistentry><term><option>f</option></term><listitem><para>Specifies the form for which you want to set a request alert.</para>
</listitem>
</varlistentry><varlistentry><term><option>A</option> <replaceable>alert</replaceable></term><listitem><para>Specifies what kind of alert will occur when a form is requested.
Some valid values are <literal>mail</literal>, <literal>write</literal>, and <literal>quiet</literal>. If you choose <literal>mail</literal> or <literal>write</literal>,
a predefined alert message says to mount the specified form. The message includes
names of one or more printers that have been set up to use the form.</para>
</listitem>
</varlistentry><varlistentry><term><option>Q</option> <replaceable>requests</replaceable></term><listitem><para>Specifies how many print requests that require the form must
be in the queue to trigger an alert. If you don't specify this option, an
alert occurs with just one print request in the queue.</para>
</listitem>
</varlistentry><varlistentry><term><option>W</option> <replaceable>minutes</replaceable></term><listitem><para>Specifies how often (in minutes) the alert will occur. If
you don't specify this option, the alert is sent one time.</para>
</listitem>
</varlistentry>
</variablelist><para>The request alert is added to the print server's <filename>/etc/lp/forms/</filename><replaceable>form-name</replaceable><filename>/alert.sh</filename> file. </para>
</step><step id="printforms-step-114"><para>Verify that the alert has been added
for the form.</para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-A list</userinput></screen><para>Alternately, if you have set a low number of print requests to trigger
the alert, submit print requests to meet the minimum requirement. Ensure that
you receive an alert to mount the form.</para>
</step>
</procedure><example id="emjgp"><title>Setting an Alert to Mount a Form</title><para>This example shows how to set email alerts to occur every 5 minutes
for the <literal>letterhead</literal> form when 10 print requests for <literal>letterhead</literal> reside in the print queue.</para><screen># <userinput>lpforms -f letterhead -A mail -Q 10 -W 5</userinput></screen>
</example><example id="embzm"><title>Setting a Console Window Alert</title><para>This example shows how to set console window alerts to occur every 10
minutes for the <literal>letterhead</literal> form when 5 requests for <literal>letterhead</literal>reside in the print queue.</para><screen># <userinput>lpforms -f letterhead -A write -Q 5 -W 10</userinput></screen>
</example><example id="embyn"><title>Setting up No Request Alerts</title><para>This example shows how to set no request alerts for the <literal>invoice</literal> form.</para><screen># <userinput>lpforms -f invoice -A none</userinput></screen>
</example>
</task><sect2 id="printforms-55079"><title>Checking Forms</title><indexterm id="printforms-ix610"><primary>forms</primary><secondary>displaying attributes of (overview)</secondary>
</indexterm><indexterm><primary>checking forms</primary>
</indexterm><para>When you have defined a form for the LP print service, you can check
the form with either of two commands. Which command you choose depends on
the type of information you want to check.</para><itemizedlist><listitem><para>To show the attributes of the form, use the <command>lpforms</command> command.
You can also redirect the output of the command into a file to save it for
future reference.</para>
</listitem><listitem><para><indexterm id="printforms-ix611"><primary>alignment pattern</primary><secondary>protection of</secondary></indexterm>To display the current status
of the form, use the <command>lpstat</command> command. To protect potentially
sensitive content, the alignment pattern is not shown. </para>
</listitem>
</itemizedlist><para><indexterm id="printforms-ix612"><primary sortas="etc/lp/forms directory"><filename>/etc/lp/forms</filename> directory</primary></indexterm>If you are not sure
about the name of an existing form, you can view the form names by listing
the contents of the <filename>/etc/lp/forms</filename> directory. </para>
</sect2><task id="printforms-40098"><title>How to View Information About a Form</title><indexterm><primary>form</primary><secondary>how to view information about</secondary>
</indexterm><procedure><step id="printforms-step-75"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-76"><para>Request information about a form.</para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-l</userinput></screen><variablelist><varlistentry><term><option>f</option></term><listitem><para>Specifies the form for which you want to view information.
Specify <literal>all</literal> for <replaceable>form-name</replaceable> to
view information about all the available forms.</para>
</listitem>
</varlistentry><varlistentry><term><option>l</option></term><listitem><para>Lists the specified form.</para>
</listitem>
</varlistentry>
</variablelist><para>Information about the specified form or forms is displayed.</para>
</step>
</procedure><example id="emjgq"><title>Viewing Information About a Form</title><para>The following example shows how to display information about the <literal>medical</literal> form.</para><screen># <userinput>lpforms -f medical -l</userinput>
Page length: 62
Page width: 72
Number of pages: 2
Line pitch: 6
Character pitch: 12
Character set choice: pica
Ribbon color: black
Comment:
Medical claim form</screen><para>The following example shows how to redirect the information about the <literal>medical</literal> form to a file. This command creates the form definition
for the form. This command is useful if a form definition is removed unintentionally.</para><screen># <userinput>lpforms -f medical -l &gt; medical.fmd</userinput></screen>
</example>
</task><task id="printforms-67212"><title>How to View the Current Status of a Form</title><indexterm><primary>forms</primary><secondary>displaying current status</secondary>
</indexterm><indexterm><primary>displaying</primary><secondary>current status of forms</secondary>
</indexterm><procedure><step id="printforms-step-79"><para>Log in on the print server.</para>
</step><step id="printforms-step-80"><para>Request information about the current
status of a form.</para><screen>$ <userinput>lpstat -f</userinput> <replaceable>form-name</replaceable></screen><para>The <option>f</option> option specifies the form for which you want
to view the current status. Specify <literal>all</literal> for <replaceable>form-name</replaceable> to view the current status of all the forms.</para><para>Information about the current status of the specified form or forms
is displayed.</para>
</step>
</procedure><example id="emjgt"><title>Viewing the Current Status of a Form</title><para>This example shows how to display the status of the <literal>medical</literal> form.</para><screen>$ <userinput>lpstat -f medical</userinput>
form medical is available to you</screen>
</example>
</task><sect2 id="printforms-91507"><title>Limiting Access to Forms</title><indexterm id="printforms-ix613"><primary>forms</primary><secondary>controlling access to (overview)</secondary>
</indexterm><para>You can control which printers and which users have access to some or
all of the forms available on the network. For example, you might want only
the people in the payroll or accounts payable department to be able to print
check forms. In addition, you might want the check forms to be available only
on certain printers.</para><para>For more information, see <olink targetptr="printforms-12946" remap="internal">How to
Limit User Access to a Form</olink>. To limit printer access to a form, see <olink targetptr="printforms-12033" remap="internal">How to Limit Printer Access to a Form</olink>.</para>
</sect2><task id="printforms-12946"><title>How to Limit User Access to a Form</title><indexterm><primary>limiting access to a form</primary>
</indexterm><indexterm><primary>access to forms</primary><secondary>limiting</secondary>
</indexterm><indexterm><primary>forms</primary><secondary>limiting access to</secondary>
</indexterm><procedure><step id="printforms-step-83"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-84"><para>Allow or deny users access to a form.</para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-u allow</userinput>:<replaceable>user-list</replaceable> | <userinput>deny</userinput>:<replaceable>user-list</replaceable></screen><variablelist><varlistentry><term><option>f</option></term><listitem><para>Specifies the name of the form for which the allow user access
lists or the deny user access list is being created.</para>
</listitem>
</varlistentry><varlistentry><term><command>-u allow:</command><replaceable>user-list</replaceable></term><listitem><para>Represents users to be added to the allow user access list.
Use a comma or a space to separate user login IDs. If you use spaces, enclose
the list of IDs in quotation marks. </para><para><olink targetptr="gfjje" remap="internal">Table&nbsp;5&ndash;5</olink> provides the valid
values for <replaceable>user-list</replaceable>.</para>
</listitem>
</varlistentry><varlistentry><term><command>-u deny:</command><replaceable>user-list</replaceable></term><listitem><para>Represents users to be added to the deny user access list.
Use a comma or a space to separate user login IDs. If you use spaces, enclose
the list of IDs in quotation marks. <olink targetptr="gfjje" remap="internal">Table&nbsp;5&ndash;5</olink> provides the valid values for <replaceable>user-list</replaceable>.</para>
</listitem>
</varlistentry>
</variablelist><para><indexterm id="printforms-ix650"><primary>allow list</primary><secondary>for user access to forms</secondary></indexterm><indexterm id="printforms-ix651"><primary>deny list</primary><secondary>for user access to forms</secondary></indexterm>The specified users are added to the appropriate user access list
for the specified form in one of the following files on the print server: </para><itemizedlist><listitem><para><filename>/etc/lp/forms/</filename><replaceable>form-name</replaceable><filename>/allow</filename></para>
</listitem><listitem><para><filename>/etc/lp/forms/</filename><replaceable>form-name</replaceable><filename>/deny</filename> </para>
</listitem>
</itemizedlist>
</step><step id="printforms-step-121"><para>Verify that the allow user access list
and deny user access list are set up correctly.</para><screen># <userinput>lpforms -f</userinput> <replaceable>form-name</replaceable> <userinput>-l</userinput></screen>
</step>
</procedure><example id="emjgw"><title>Allowing User Access to a Form</title><para>This example shows how to allow only the users <literal>nathan</literal> and <literal>marcia</literal> access to the <literal>check</literal> form. </para><screen># <userinput>lpforms -f check -u allow:nathan,marcia</userinput></screen>
</example><example id="emcab"><title>Denying User Access to a Form</title><para>This example shows how to deny users <literal>jones</literal> and <literal>smith</literal> access to the <literal>dental</literal> form. </para><screen># <userinput>lpforms -f dental -u deny:jones,smith</userinput></screen>
</example>
</task><task id="printforms-12033"><title>How to Limit Printer Access to a Form</title><procedure><step id="printforms-step-88"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server.</para>
</step><step id="printforms-step-89"><para><indexterm id="printforms-ix659"><primary><command>lpadmin</command> command</primary><secondary>limiting printer access to forms with (how to)</secondary></indexterm>Allow or deny use of forms on a printer. </para><screen># <userinput>lpadmin -p</userinput> <replaceable>printer-name</replaceable> <userinput>-f allow</userinput>:<replaceable>form-list</replaceable> | <userinput>deny</userinput>:<replaceable>form-list</replaceable></screen><variablelist><varlistentry><term><option>p</option></term><listitem><para>Specifies the name of the printer for which the allow forms
list or deny forms list is being created.</para>
</listitem>
</varlistentry><varlistentry><term><option>f</option> allow: <replaceable>form-list</replaceable></term><listitem><para>Specifies the form name to be added to the allow list. Use
a space or a comma to separate multiple form names. If you use spaces to separate
form names, enclose the list of form names in quotation marks.</para>
</listitem>
</varlistentry><varlistentry><term><option>f</option> deny: <replaceable>form-list</replaceable></term><listitem><para>Is the form name to be added to the deny list. Use a space
or a comma to separate multiple form names. If you use spaces to separate
form names, enclose the list of form names in quotation marks.</para>
</listitem>
</varlistentry>
</variablelist><para>The specified form or forms are added to the allow forms list or the
deny forms list in one of the following files on the print server:</para><itemizedlist><listitem><para><filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/form.allow</filename></para>
</listitem><listitem><para><filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable><filename>/form.deny</filename> </para>
</listitem>
</itemizedlist>
</step><step id="printforms-step-122"><para>Verify that the allow forms list and
the deny forms list are set up correctly.</para><screen># <userinput>lpstat -p</userinput> <replaceable>printer-name</replaceable> <userinput>-l</userinput></screen>
</step>
</procedure><example id="emjgy"><title>Allowing Printer Access to a Form</title><para>This example shows how to allow the printer <literal>luna</literal> to
access only the <literal>medical</literal>, <literal>dental</literal>, and <literal>check</literal> forms. </para><screen># <userinput>lpadmin -p luna -f allow:medical,dental,check</userinput></screen>
</example><example id="embze"><title>Limiting Printer Access to a Form</title><para>This example shows how to deny the printer <literal>luna</literal> from
accessing the <literal>medical</literal>, <literal>dental</literal>, and <literal>check</literal> forms. </para><screen># <userinput>lpadmin -p luna -f deny:"medical dental check"</userinput></screen>
</example>
</task>
</sect1><sect1 id="eojct"><title>Administering Fonts (Task Map)</title><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Install downloaded PostScript fonts.</para>
</entry><entry><para>Permanently download a font if most print requests serviced by the printer
use that font. To avoid transmitting fonts across the network, add all the
printer-resident fonts.</para>
</entry><entry><para><olink targetptr="printforms-12681" remap="internal">How to Install Downloaded PostScript
Fonts</olink></para>
</entry>
</row><row><entry><para>Install host-resident PostScript fonts.</para>
</entry><entry><para>Install host-resident fonts on a system that is shared by many users.
Use this method when numerous fonts are available, or when these fonts are
not used by all print requests.</para>
</entry><entry><para><olink targetptr="printforms-34675" remap="internal">How to Install Host-Resident PostScript
Fonts</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="printforms-26075"><title>Administering Fonts</title><indexterm id="printforms-ix667"><primary>administering</primary><secondary>fonts (overview)</secondary>
</indexterm><para><indexterm id="printforms-ix668"><primary>fonts</primary><secondary>PostScript</secondary></indexterm><indexterm id="printforms-ix669"><primary>PostScript fonts</primary></indexterm>If you have a laser printer, you might need to
install and maintain PostScript fonts. For many printers, the fonts are set
up as part of the printer installation process.  </para><para><indexterm id="printforms-ix670"><primary>fonts</primary><secondary>downloading</secondary></indexterm><indexterm id="printforms-ix671"><primary>downloading fonts</primary></indexterm>PostScript fonts are stored in outline form, either
on the printer or on a system that communicates with the printer. When a document
is printed, the PostScript interpreter generates each character as needed
in the appropriate size from the outline description of it. If a font required
for a document is not stored on the printer being used, the font must be transmitted
to that printer before the document can be printed. This transmission process
is called <emphasis>downloading fonts</emphasis>.  </para><itemizedlist><para>Fonts are stored and accessed in several ways:</para><listitem><para><indexterm id="printforms-ix672"><primary>fonts</primary><secondary>printer-resident</secondary></indexterm><emphasis>Printer-resident</emphasis> <emphasis>fonts</emphasis> are stored permanently on a printer. These fonts are installed
in read-only memory (ROM) on the printer by the manufacturer. If the printer
has a disk, you can install fonts on that disk. Most PostScript printers are
shipped with 35 standard fonts. </para>
</listitem><listitem><para><indexterm id="printforms-ix673"><primary>fonts</primary><secondary>permanently downloaded</secondary></indexterm>A <emphasis>permanently
downloaded</emphasis> <emphasis>font</emphasis> is transmitted to a printer
with a PostScript <command>exitserver</command> program. A permanently downloaded
font remains in printer memory until the printer is turned off. Memory allocated
to a downloaded font reduces the memory available on the server for PostScript
print requests. Use of an <command>exitserver</command> program requires the
printer system password and can be reserved for the printer administrator.
You should permanently download a font if most print requests serviced by
the printer use that font. </para>
</listitem><listitem><para>Fonts that are used infrequently or for special purposes can
be stored on a user's system. The user can specify these fonts when submitting
the print request. The fonts are appended to the print request and transmitted
to the printer. When the print request is processed, the space allocated for
the font is freed for other print requests.</para>
</listitem><listitem><para><indexterm id="printforms-ix674"><primary>fonts</primary><secondary>host-resident</secondary></indexterm><indexterm><primary>host-resident fonts</primary></indexterm><emphasis>Host-resident fonts</emphasis> are stored
on a system that is shared by many users. The system that stores the fonts
can be a print server or a print client. Each user can request fonts in the
document to be printed. This method is useful when numerous fonts are available,
or when these fonts are not used by all print requests. If the fonts will
be used only on printers attached to a print server, they should be stored
on the print server. If the fonts will be used by the users on one system
and those users can submit requests to multiple printers on a network, the
fonts should be stored on the users' system. </para><para><indexterm id="printforms-ix676"><primary>filters</primary><secondary>downloading</secondary></indexterm><indexterm><primary>downloading filters</primary></indexterm>The
LP print service provides a special download filter to manage host-resident
fonts. The LP print service also supplies <literal>troff</literal> width tables
for the 35 standard PostScript fonts that reside on many PostScript printers.
For more information about the <literal>troff</literal> program, see the <olink targetdoc="refman" targetptr="troff-1" remap="external"><citerefentry><refentrytitle>troff</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page.</para>
</listitem>
</itemizedlist><sect2 id="printforms-92"><title>Managing Printer-Resident Fonts</title><para>Most PostScript printers come equipped with fonts that are resident
in the printer ROM. Some printers have a disk on which additional fonts are
stored. When a printer is installed, you should add the list of printer-resident
fonts to the font list for that printer. By identifying printer-resident fonts,
you prevent fonts from being transmitted unnecessarily across a network. Each
printer has its own list of resident fonts, which is contained in this file:</para><screen>/etc/lp/printers/<replaceable>printer-name</replaceable>/residentfonts</screen><para><indexterm id="printforms-ix698"><primary><filename>residentfonts</filename> file</primary></indexterm>When the printer is attached to a print server, ensure
that the list in the <filename>residentfonts</filename> file includes fonts
that are on the print server. The file must also include fonts that are available
for downloading to the printer.</para><para>You must edit the files that contain the list of printer-resident fonts
by using a text editor such as <command>vi</command>.</para>
</sect2><sect2 id="printforms-93"><title>Downloading Host-Resident Fonts</title><indexterm id="printforms-ix682"><primary>host-resident fonts</primary><secondary>downloading</secondary>
</indexterm><para>When a PostScript document contains a request for fonts not loaded on
the printer, the download filter manages this request. The download filter
uses PostScript document structuring conventions to determine which fonts
to download.  </para><para><indexterm id="printforms-ix687"><primary>fast print filters (overview)</primary></indexterm><indexterm id="printforms-ix689"><primary>slow print filters</primary></indexterm>LP print filters are either fast or slow. A <emphasis>fast filter</emphasis> quickly
prepares a file for printing. Also, a fast filter must have access to the
printer while the filter is processing. A <emphasis>slow filter</emphasis> takes
longer to convert a file. However, a slow filter does not need to access the
printer while the filter is processing. An example of a slow filter is a filter
that converts an ASCII document to a PostScript document.</para><para><indexterm id="printforms-ix690"><primary>print filters</primary><secondary>download (overview)</secondary></indexterm>The <emphasis>download
filter</emphasis> is a fast filter. This filter downloads fonts automatically
if the fonts are on the print server. The download filter can also be used
to send fonts to a print server. To do so, you can create a new filter table
entry that calls the download filter as a slow filter by using the <command>lp</command> <option>y</option> command. Alternatively, you can force selection of this filter
by changing the input type. </para><para>The download filter performs five tasks:</para><orderedlist><listitem><para>The filter searches the PostScript document to determine which
fonts are requested. These requests are documented with the following PostScript
structuring comments: <literal>%%DocumentFonts:</literal> <replaceable>font1
font2 &hellip;</replaceable> in the header comments.</para>
</listitem><listitem><para>The download filter searches the list of printer-resident
fonts to determine if the requested font must be downloaded.</para>
</listitem><listitem><para>If the font is not resident on the printer, the download filter
searches the host-resident font directory table to determine if the requested
font is available. This filter performs this search by getting the appropriate
file name from the map.</para>
</listitem><listitem><para>If the font is available, the download filter takes the file
for that font and appends it to the file to be printed.</para>
</listitem><listitem><para>The download filter sends the font definition file and the
source file to the PostScript printer. The <emphasis>source file</emphasis> is
the file to be printed.</para>
</listitem>
</orderedlist>
</sect2><sect2 id="printforms-94"><title>Installing and Maintaining Host-Resident
Fonts</title><para>Some fonts reside on the host system and are transmitted to the printer
as needed for particular print requests. As the administrator, you make PostScript
fonts available to all users on a system. To do so, you must know how and
where to install these fonts. Because fonts are requested by name and stored
in files, the LP print service keeps a <emphasis>map file</emphasis>. A map
file shows the correspondence between the names of fonts and the names of
the files that contain those fonts. Both the map file and the font list must
be updated when you install host-resident fonts.</para><para>The fonts available for use with PostScript printers are stored in directories
that you create. These directories are called <filename>/usr/share/lib/hostfontdir/</filename><replaceable>typeface</replaceable><filename>/</filename><replaceable>font</replaceable>. The variable <replaceable>typeface</replaceable> is replaced
by a name, such as <literal>palatino</literal> or <literal>helvetica</literal>.
The variable <replaceable>font</replaceable> is replaced by a an attribute
name, such as <literal>bold</literal> or <literal>italic</literal>.</para>
</sect2><task id="printforms-12681"><title>How to Install Downloaded PostScript Fonts</title><indexterm><primary>installing downloaded PostScript fonts</primary>
</indexterm><procedure><step id="printforms-step-96"><para>Log in as superuser, <literal>lp</literal> user,
or assume an equivalent role on the print server or print client.</para>
</step><step id="printforms-step-97"><para>Change directory to the <filename>/etc/lp/printers/</filename><replaceable>printer-name</replaceable> directory.</para><screen># <userinput>cd /etc/lp/printers/</userinput><replaceable>printer-name</replaceable></screen><para>The variable <emphasis>printer-name</emphasis> specifies the name of
the printer on which you want to install downloaded PostScript fonts.</para>
</step><step id="printforms-step-98"><para>Create the <filename>residentfonts</filename> file,
if this file does not already exist. </para><screen># <userinput>touch residentfonts</userinput></screen><para>This file might not exist if you are adding permanently downloaded fonts
for the first time. </para>
</step><step id="printforms-step-99"><para>Edit the <filename>residentfonts</filename> file.
Add all the printer-resident fonts and the fonts to be permanently downloaded.</para>
</step>
</procedure>
</task><task id="printforms-34675"><title>How to Install Host-Resident PostScript
Fonts</title><indexterm><primary>installing</primary><secondary>host-resident PostScript fonts</secondary>
</indexterm><indexterm><primary>fonts</primary><secondary>host-resident PostScript fonts</secondary>
</indexterm><indexterm><primary>host-resident PostScript Fonts</primary><secondary>how to install</secondary>
</indexterm><procedure><step id="printforms-step-102"><para>Log in as superuser, <literal>lp</literal>,
or assume an equivalent role on the print server or print client.</para>
</step><step id="printforms-step-103"><para>Create the <filename>hostfontdir</filename> directory.</para><screen># <userinput>cd /usr/share/lib</userinput></screen><substeps><step><para>Change to the <filename>/usr/share/lib</filename>directory.</para><screen># <userinput>cd /usr/share/lib</userinput></screen>
</step><step><para>Create the <filename>hostfontdir</filename> directory, if this
directory does not already exist.</para><screen># <userinput>mkdir hostfontdir</userinput></screen>
</step><step><para>Change the permissions on the <filename>hostfontdir</filename> directory
to 775.</para><screen># <userinput>chmod 775 hostfontdir</userinput></screen>
</step>
</substeps>
</step><step id="printforms-step-104"><para>Create a directory for a new typeface,
if the directory does not already exist. </para><screen># <userinput>mkdir</userinput> <replaceable>typeface</replaceable></screen>
</step><step id="printforms-step-105"><para>Copy the font file to the appropriate
directory.</para><screen># <userinput>cp</userinput> <replaceable>filename</replaceable> <userinput>/usr/share/lib/hostfontdir</userinput>/<replaceable>typeface</replaceable>/<replaceable>font</replaceable></screen>
</step><step id="printforms-step-106"><para>Add to the map file the name of the font
and the name of the file in which it resides.</para><substeps><step id="printforms-step-107"><para>Change to the <filename>/usr/share/lib/hostfontdir</filename> directory.</para>
</step><step id="printforms-step-108"><para>Edit the <filename>map</filename> file
by using a text editor such as the <command>vi</command> editor.</para><para>Add
a one-line entry for each font that you want to add to the file. Put the font
name first, followed by a space, followed by the name of the file where the
font resides. For example:</para><screen><userinput>Palatino-Bold /usr/share/lib/hostfontdir/palatino/bold</userinput></screen>
</step><step id="printforms-step-109"><para>Save the file.</para><para>When an example
entry exists in the map file on the appropriate system, users can apply the
font (for example, Palatino Bold) to their print jobs. When users submit a
print request that contains this font, the LP print service appends a copy
of the <filename>/usr/share/lib/hostfontdir/palatino/bold</filename> file
to that file before sending it to the printer.</para>
</step>
</substeps>
</step><step id="printforms-step-110"><para>If you are using the <command>troff</command> program,
you must create new width tables for this font in the standard <command>troff</command> font
directory. </para>
</step>
</procedure>
</task>
</sect1>
</chapter><?Pub *0000142204 0?>