This chapter provides background information and step-by-step instructions for setting up and administering character sets, print filters, forms, and fonts.
This is a list of the step-by-step instructions in this chapter.
For overview information about printing, see Chapter 2, Managing Printing Services (Overview).
Printers differ in the method 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, and 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, using either print wheels, font cartridges, or preprogrammed selectable character sets. Usually, only one of these printing methods applies to a given printer type.
Print wheels and font cartridges, from the perspective of the LP print service, are similar, because someone must intervene and mount the hardware on the printer, when needed. Character sets that require you to physically mount a wheel or cartridge are referred to as hardware character sets. Character sets that do not require hardware mounting, that come preprogrammed with the printer, and can be selected by a print request, are referred to as software character sets.
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 lp -S 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 gothic. To request the gothic print wheel, the user would use the following command:
% lp -S gothic filename |
The selectable character sets supported by a printer are listed in the terminfo entry for that printer. For example, the entry for the ln03 printer is /usr/share/lib/terminfo/l/ln03. You can find the names of selectable character sets for any printer type in the terminfo database by using the tput command. The syntax for the tput command is:
tput -T printer-type csn |
The csn 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. You can repeat the command, using -1, -2, -3, and so on in place of the -0, to display the names of the other character sets. For each selectable character set, a terminfo name (for example, usascii, english, finnish, and so forth) is returned.
In general, the terminfo character set names should closely match the character set names used in the manufacturer's documentation for the printer. Because manufacturers do not all use the same character set names, the terminfo character set names can differ from one printer type to the next.
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.
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 cs0, cs1, or cs2) or the terminfo name known for the printer.
Users can use the lpstat -p -l command to display the names of the selectable character sets that you have defined for each printer on a print server.
Character sets for PostScript printers are not listed when you use the lpstat -p -l command because the PostScript fonts are controlled by PostScript filters, not by entries in the terminfo database. For information about how to administer PostScript fonts, see Managing Fonts.
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.
To administer hardware-mounted character sets, you inform the LP print service of the names you want to use for the available print wheels, and how you want to be alerted when a printer needs a different print wheel. Then, when a user requests a particular character set with the lp -S command, the scheduler sends an alert to mount the print wheel, and 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 How to Unmount and Mount a Print Wheel or Font Cartridge.
If you do not specify multiple print wheels or cartridges for a printer, the LP print service assumes that the printer has a single, fixed print wheel or cartridge, and users cannot specify a special print wheel or cartridge when using the printer.
Unlike selectable character sets, the names you use for print wheels or cartridges are not tied to entries in the terminfo database. Print wheel or cartridge names are used only for the purpose of communicating with the LP print service and its users.
The names you choose for print wheels or cartridges, however, 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 or cartridges, or selectable character sets. That way, users can ask for a font style (character set) without regard to which printer—or even whether a print wheel or cartridges—or selectable character set will be used.
Of course, you and the printer users should agree on the meanings of print wheel or cartridge names. Otherwise, what a user asks for and what you mount, might not be the same character set.
The procedure for tracking print wheels is similar to the procedure for tracking forms. Some printers (usually letter-quality printers) have removable print heads, such as print wheels or print cartridges, that provide a particular font or character set. A user can request a named character set. If that character set is not available, the LP print service notifies root of the request. The job is stored in the print queue until the print wheel is changed.
You request alerts for mounting print wheels or cartridges in the same way you request other alerts from the LP print service. For general information about alerts, see Setting Up Printer Fault Alerts.
Log in as superuser, lp, or assume an equivalent role on the print server.
Define a print wheel or font cartridge that can be used with the printer.
print-server# lpadmin -p printer-name -S hard-charset1[,hard-charset2...] |
-p printer-name |
Name of the printer for which you are defining a print wheel or font cartridge. |
-s hard-charset |
Hardware character set name of the print wheel or font cartridge. 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 quotes. Define names that are meaningful to users, and inform the users of the names. |
The print wheel or font cartridge definition is added in the print server's /etc/lp/printers/printer-name/configuration file.
Log in as superuser, lp, or assume an equivalent role on a print client of the print server.
Define the same print wheel or font cartridge for the print client.
print-client# lpadmin -p printer-name -S hard-charset1[,hard-charset2...] |
In this command, the variables are the same as those in Step 2.
The print wheel or font cartridge definition is added in the print client's /etc/lp/printers/printer-name/configuration file.
Repeat Step 3 and Step 4 for each print client that might need to use the print wheel or font cartridge.
Verify that the information following the Character sets heading in the following output is correct on both the print server and the print client.
$ lpstat -p printer-name -l |
The following example shows how to define the pica print wheel on the printer luna for a print client named asteroid.
asteroid# lpadmin -p luna -S pica |
Log in as superuser, lp, or assume an equivalent role on the print server.
Unmount the print wheel or font cartridge that is in the printer.
# lpadmin -p printer-name -M -S none |
-p printer-name |
Printer on which you are unmounting a print wheel or font cartridge. |
-M -S none |
Specifies unmounting the current print wheel or font cartridge. |
For more information, see lpadmin(1M).
The current print wheel or font cartridge is deleted from the print server's /etc/lp/printers/printer-name/configuration file.
Remove the print wheel or font cartridge from the printer.
Put the new print wheel or font cartridge in the printer.
Mount the new print wheel or font cartridge.
# lpadmin -p printer-name -M -S hard-charset |
-p printer-name |
Printer on which you are mounting a print wheel or font cartridge. |
-M -S hard-charset |
Hardware character set name of the print wheel or font cartridge you want to mount. |
The print wheel or font cartridge is added in the print server's /etc/lp/printers/printer-name/configuration 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.
Check that the information under the Print wheels or Character set heading in the output of the following command. You should see the name of the print wheel or character set and the notation (mounted)
$ lpstat -p printer-name -l |
The following example shows how to unmount the current print wheel on the printer luna and mount the pica print wheel.
# lpadmin -p luna -M -S none # lpadmin -p luna -M -S pica |
Log in as superuser, lp, or assume an equivalent role on the print server.
Set an alert to mount a print wheel or font cartridge.
# lpadmin -S hard-charset -A alert [-Q requests] [-W minutes] |
-S hard-charset |
Hardware character set name of the print wheel or font cartridge for which you want to set an alert. |
-A alert |
Specifies what kind of alert will occur when a print wheel or font cartridge is requested. For detailed information about the valid values for alert, see Table 5–3. Some valid values are mail, write, and quiet. If you specify mail or write, a predefined alert message says to mount the specified print wheel or font cartridge and includes the names of one or more printers that have been set up to use such a print wheel or cartridge. |
-Q requests |
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. |
-W minutes |
Specifies how often (in minutes) the alert will occur. If you don't specify this option, the alert is sent only once. |
For more information, see lpadmin(1M).
The alert is added in the print server's /etc/lp/pwheels/charset-name/alert.sh file.
Verify that the alert has been added for the print wheel or font cartridge by checking the output of the following command.
# lpadmin -S hard-charset -A list |
Otherwise, if you have set a low number of print requests to trigger the alert, submit enough print requests to meet the minimum requirement and make sure you receive an alert to mount the print wheel or font cartridge.
The following example shows how to set email alerts to occur every five minutes for the elite print wheel when there are ten print requests for elite in the print queue.
# lpadmin -S elite -A mail -Q 10 -W 5 |
The following example shows how to set email alerts to occur every minute for the finnish font cartridge when there are five print requests for finnish in the print queue.
# lpadmin -S finnish -A mail -Q 5 -W 1 |
The following example show how to set console-window alerts to occur every 10 minutes for the elite print wheel when there are five print requests for elite in the print queue.
# lpadmin -S elite -A write -Q 5 -W 10 |
The following example shows how to set no alerts to occur for the elite print wheel.
# lpadmin -S elite -A none |
You do not need to perform this procedure if the terminfo names for the selectable character sets are adequate. For more information on using the terminfo database, see Adding a terminfo Entry for an Unsupported Printer.
Log in as superuser, lp, or assume an equivalent role on the print server.
Display the names of the selectable character sets for the specified printer type.
# tput -T printer-type csn |
-T printer-type |
Printer type found in the terminfo database. For information on entries in the terminfo database, see Printer Type. |
n |
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, cs1 could cause the system to display english#. |
For more information, see tput(1).
Set up an alias for a selectable character set.
# lpadmin -p printer-name -S select-charset1=alias1[,select-charset2=alias2...] |
-p printer-name |
Printer on which you are setting up aliases for selectable character sets. |
-S select-charset |
Selectable character set name for which to set an alias. The name can be found in Step 2. |
alias |
Alias for the specified selectable character set. This alias can be used in addition to the selectable character set name. 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 quotes. |
The alias is added in the print server's /etc/lp/printers/printer-name/configuration file.
Log in as superuser, lp, or assume an equivalent role on a system that is a print client of the print server.
Set up an alias for the selectable character set.
# lpadmin -p printer-name -S select-charset1=alias1[,select-charset2=alias2...] |
In this command, the variables are the same as those in Step 3.
The alias is added in the print client's /etc/lp/printers/printer-name/configuration file.
Repeat Step 4 and Step 5 for each print client that might need to use the alias.
Verify that the selectable character set alias is listed in the output of the following command on the print server and print clients.
$ lpstat -p printer-name -l |
Otherwise, submit a print request that uses the alias for the selectable character set and check for output.
The following example shows how to display the names of selectable character sets and specify text as an alias for the usascii selectable character set on the printer luna, which is an ln03 printer type.
# tput -T ln03 cs0 usascii# tput -T ln03 cs1 english# tput -T ln03 csn2 finnish# tput -T ln03 csn3 japanese# tput -T ln03 cs4 norwegian# # lpadmin -p luna -S usascii=text |
Print filters are programs that convert the content type of a file to a content type that is acceptable to the destination printer. The LP print service uses filters to:
Convert a file from one data format to another format so that it can be printed properly on a specific type of printer
Handle the special modes of printing, like two-sided printing, landscape printing, or draft- and letter-quality printing
Detect printer faults and notify the LP print service of them so the print service can alert users and system administrators
Not every print filter can perform all these tasks. Because each task is printer-specific, the tasks can be implemented separately.
The LP print service provides the PostScript filters listed in Table 6–1. The filter programs are located in the /usr/lib/lp/postscript directory. For PostScript printing, you usually do not need to do anything beyond installing 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.
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 background information and step-by-step instructions, see Creating a New Print Filter.
Print filters are added, changed, or removed on the print server only.
You can use the lpfilter command to manage the list of available filters. System information about filters is stored in the /etc/lp/filter.table file. The lpfilter command gets the information about filters to write to the table from filter descriptor files. The filter descriptor files supplied (PostScript only) are located in the /etc/lp/fd directory. The actual filter programs are located in the /usr/lib/lp directory.
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 one that works for a specific print request.) If in doubt, do not remove a filter.
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, and remove any filters you have added.
SunOS software provides a default set of PostScript filters, which Solaris Print Manager automatically adds to a print server. Some of the TranScript filters used with lpd-based print services have SunOS equivalents, but others do not. The following table lists the default PostScript filters and identifies the TranScript filters, where applicable.
Table 6–1 Default PostScript Filters
Filter |
Action |
TranScript Equivalent |
---|---|---|
download |
Download fonts |
|
dpost |
ditroff to PostScript |
psdit |
postdaisy |
daisy to PostScript | |
postdmd |
dmd to PostScript | |
postio |
Serial interface for PostScript printer | pscomm |
postior |
Communicate with printer | |
postmd |
Matrix gray scales to PostScript | |
postplot |
plot to PostScript |
psplot |
postprint |
simple to PostScript |
enscript |
postreverse |
Reverse or select pages |
psrev |
posttek |
TEK4014 to PostScript |
ps4014 |
The SunOS software does not provide the following filters:
TEX
oscat (NeWSprint opost)
Enscript
The postreverse, postprint, postio, and dpost filters are provided in place of Enscript.
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 How to Create a New Print Filter for information about writing a custom print filter.
Log in as superuser, lp, or assume an equivalent role on the print server.
Add a print filter that is based on a print filter definition.
# lpfilter -f filter-name -F filter-def |
-f filter-name |
Name you choose for the print filter. |
-F filter-def |
Name of the print filter definition. |
For more information, see lpfilter(1M).
The print filter is added in the print server's /etc/lp/filter.table file.
Verify that the print filter was added by checking for information about the print filter in the output of the following command.
# lpfilter -f filter-name -l |
The following example shows how to add the daisytroff print filter that has the daisytroff.fd print filter definition.
# lpfilter -f daisytroff -F /etc/lp/fd/daisytroff.fd |
Log in as superuser, lp, or assume an equivalent role on the print server.
Delete the print filter.
# lpfilter -f filter-name -x |
-f filter-name |
Name of the print filter to be deleted. |
-x |
Deletes the specified filter. |
The print filter is deleted from the print server's /etc/lp/filter.table file.
Verify that filter was deleted.
# lpfilter -f filter-name -l |
You should receive an error indicating that no filter by the specified name exists.
The following example shows how to delete the daisytroff print filter.
# lpfilter -f daisytroff -x |
Log in as superuser, lp, or assume an equivalent role on the print server.
Request information about a print filter.
# lpfilter -f filter-name -l |
-f filter-name |
Print filter for which you want to view information. Specify all for filter-name to view information about all the available print filters. |
-l |
Displays information about the specified filter. |
Information about the specified print filter(s) is displayed.
The following example shows how to request information for the postdaisy print filter, and the information that is displayed in response.
# lpfilter -f postdaisy -l 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 |
The following example shows how to redirect information about the daisytroff filter to a file (create the filter definition for that filter). This is useful if a filter definition is removed unintentionally.
# lpfilter -f daisytroff -l > daisytroff.fd |
The following example shows how to display all the print filters that have been added to the system, and the information that is displayed in response.
# lpfilter -f all -l | grep Filter (Filter "download") Filter type: fast (Filter "postio") Filter type: fast (Filter "postior") Filter type: fast (Filter "postreverse") Filter type: slow |
A form 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.
The term form has two meanings: the physical medium (the paper) and the software that defines a form to the LP print service.
The LP print service allows you to control the use of forms. This section provides information about adding, changing, removing, mounting, and controlling access to forms.
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 enter 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.
No form definitions are supplied with the LP print service.
To change a form, you must re-add the form with a different definition.
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.
To print a form, you must load the paper in the printer and use a command to mount the form, which notifies the LP print service that print requests submitted to the printer are to be printed using the form definition. If you use one printer for different types of printing, including forms, you should:
Disable the printer before you load the paper and mount the form.
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.
When you mount a form, make sure 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 until you have adjusted the printer so the alignment is correct.
When you want to change or discontinue using a form on a printer, you must notify the LP print service by unmounting the form.
The LP print service helps you track which forms are mounted on each printer and 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, either as part of setting up a printer or in response to alerts from the LP print service.
Users can specify the form on which they want a job to print. As root, 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 root requesting that you mount the form.
You request alerts for mounting forms in the same way you request other alerts from the LP print service. For general information about alerts, see Setting Up Printer Fault Alerts.
When you have defined a form for the LP print service, you can check it with either of two commands, depending on the type of information you want to check.
Show the attributes of the form by using the lpforms command. You can also redirect the output of the command into a file to save it for future reference.
Display the current status of the form by using the lpstat command. To protect potentially sensitive content, the alignment pattern is not shown.
If you are not sure about the name of an existing form, you can list the contents of the /etc/lp/forms directory to see the names of the forms there.
You can control which printers and 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.
To limit user access to forms, see How to Limit User Access to a Form. To limit printer access to a form, see How to Limit Printer Access to a Form.
Log in as superuser, lp, or assume an equivalent role on the print server.
Add a form that is based on a form definition.
# lpforms -f form-name -F /etc/lp/forms/form |
-f form-name |
Name you choose for the form. |
-F /etc/lp/forms/form |
Name of the form definition. |
For more information, see lpforms(1M).
The form is added in the print server's /etc/lp/forms/form-name/describe file.
Verify that the form was added by checking for a listing of information about the form in the output of the following command.
# lpforms -f form-name -l |
The following example shows how to add the medical form that uses the medical.fmd form definition.
# lpforms -f medical -F /etc/lp/forms/medical.fmd |
Before the form can be used, one or more printers must be given access to the form. For more information, see How to Limit Printer Access to a Form.
Log in as superuser, lp, or assume an equivalent role on the print server.
Delete the form.
# lpforms -f form-name -x |
-f form-name |
Form to be deleted. |
-x |
Deletes the specified form. |
For more information, see lpforms(1M).
Verify that form was deleted.
# lpforms -f form-name -l |
You should receive an error indicating that a form by the specified name does not exist.
The following example shows how to delete the medical form.
# lpforms -f medical -x |
Log in as superuser, lp, or assume an equivalent role on the print server.
Stop accepting print requests on the printer on which you are unmounting the current form.
# reject printer-name |
printer-name |
Name of the printer on which you are unmounting a form. |
New print requests (which might not require the form) are not allowed to enter the printer's queue.
# lpadmin -p printer-name -M -f none |
In this command, the variable printer-name is the same as in Step 2.
The current form is deleted from the print server's /etc/lp/printers/printer-name/configuration file.
Load the form paper for the next print request.
Mount the form.
# lpadmin -p printer-name -M -f form-name[-a -o filebreak] |
-p printer-name |
Printer on which you are mounting a form. |
-M -f form-name |
Name of the form to be mounted. |
Optionally enables you to print a copy of the alignment pattern defined for the form, if it has one. |
The specified form is added in the print server's /etc/lp/printers/printer-name/configuration file.
Start accepting print requests on the printer.
# accept printer-name |
The printer is ready to print the form you just mounted.
Verify that the form has been mounted by checking for the form name under the Form mounted heading in the output of the following command.
$ lpstat -p printer-name -l |
Otherwise, submit a print request that requires the new form and check the printer for output.
The following example shows the process of unmounting the currently mounted form on the printer luna.
# reject luna destination "luna" will no longer accept requests # lpadmin -p luna -M f none # accept luna destination "luna" now accepting requests |
The following example shows the process of mounting the medical form on the printer luna.
# reject luna destination "luna" will no longer accept requests # lpadmin -p luna -M f medical -a -o filebreak # accept luna destination "luna" now accepting requests |
Log in as superuser, lp, or assume an equivalent role on the print server.
Set a request alert for mounting a form.
# lpforms -f form-name -A alert [-Q requests] [-W minutes] |
-f form-name |
Form for which you want to set a request alert. |
-A alert |
Specifies what kind of alert will occur when a form is requested. See Table 5–3 for detailed information about the valid values for alert. Some valid values are mail, write, and quiet. If you choose mail or write, a predefined alert message says to mount the specified form and includes the names of one or more printers that have been set up to use the form. |
-Q requests |
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. |
-W minutes |
Specifies how often (in minutes) the alert will occur. If you don't specify this option, the alert is sent once. |
The request alert is added in the print server's /etc/lp/forms/form-name/alert.sh file.
Verify that the alert has been added for the form by checking the output of the following command.
# lpforms -f form-name -A list |
Otherwise, if you have set a low number of print requests to trigger the alert, submit print requests to meet the minimum requirement and make sure you receive an alert to mount the form.
The following example shows how to set email alerts to occur every five minutes for the letterhead form when there are 10 print requests for letterhead in the print queue.
# lpforms -f letterhead -A mail -Q 10 -W 5 |
The following example shows how to set console window alerts to occur every 10 minutes for the letterhead form when there are five requests for letterhead in the print queue.
# lpforms -f letterhead -A write -Q 5 -W 10 |
The following example shows how to set no request alerts for the invoice form.
# lpforms -f invoice -A none |
Log in as superuser, lp, or assume an equivalent role on the print server.
Request information about a form.
# lpforms -f form-name -l |
-f form-name
|
Form for which you want to view information. Specify all for form-name to view information about all the available forms. |
-l |
Lists the specified form. |
Information about the specified form(s) is displayed.
The following example shows how to display information about the medical form.
# lpforms -f medical -l 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 |
The following example shows how to redirect the information about the medical form to a file. (This command creates the form definition for the form.) This is useful if a form definition gets removed unintentionally.
# lpforms -f medical -l > medical.fmd |
Log in on the print server.
Request information about the current status of a form.
$ lpstat -f form-name |
-f form-name |
Form for which you want to view the current status. Specify all for form-name to view the current status of all the forms. |
Information about the current status of the specified form(s) is displayed.
the following example shows how to display the status of the medical form.
$ lpstat -f medical form medical is available to you |
Log in as superuser, lp, or assume an equivalent role on the print server.
Allow or deny users access to a form.
# lpforms -f form-name -u allow:user-list | deny:user-list |
-f form-name |
Name of the form for which the allow or deny user access list is being created. |
-u allow:user-list |
Represents users to be added to the allow access list. Use a comma or a space to separate users' login IDs. If you use spaces, enclose the list of IDs in quotes. Table 5–5 provides the valid values for user-list. |
deny:user-list |
Represents users to be added to the deny user access list. Use a comma or a space to separate users' login IDs. If you use spaces, enclose the list of IDs in quotes. Table 5–5 provides the valid values for user-list. |
The specified user(s) are added to the allow or deny user access list for the specified form in one of the following files on the print server:
/etc/lp/forms/form-name/allow or
/etc/lp/forms/form-name/deny
Verify the allow and deny user access lists.
# lpforms -f form-name -l |
The following example shows how to allow only the users nathan and marcia access to the check form.
# lpforms -f check -u allow:nathan,marcia |
The following example shows how to deny users jones and smith access to the dental form.
# lpforms -f dental -u deny:"jones,smith" |
Log in as superuser, lp, or assume an equivalent role on the print server.
Allow or deny use of forms on a printer.
# lpadmin -p printer-name -f allow:form-list | deny:form-list |
-p printer-name |
Name of the printer for which the allow or deny forms list is being created. |
-f allow:form-list | deny:form-list |
Form names to be added to the allow or 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 quotes. |
The specified form(s) are added to the allow or deny forms list in one of the following files on the print server:
/etc/lp/printers/printer-name/form.allow
/etc/lp/printers/printer-name/form.deny
Verify the allow and deny forms lists.
# lpstat -p printer-name -l |
The following example shows how to allow the printer luna to access only the medical, dental, and check forms.
# lpadmin -p luna -f allow:medical,dental,check |
The following example shows how to deny the printer luna from accessing the medical, dental, and check forms.
# lpadmin -p luna -f deny:"medical dental check" |
If you have a laser printer, you might need to install and maintain PostScript fonts. You might also have to decide where to install PostScript fonts and how to manage them. For many printers, the fonts are set up as part of the printer installation process.
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, it must be transmitted to that printer before the document can be printed. This transmission process is called downloading fonts.
Fonts are stored and accessed in several ways:
Printer-resident fonts 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.
A permanently downloaded font is transmitted to a printer with a PostScript exitserver 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 exitserver 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.
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.
Host-resident fonts are stored on a system 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 there are numerous available fonts, 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 are to be used by the users on one system and the users can submit requests to multiple printers on a network, the fonts should be stored on the users' system.
The LP print service provides a special download filter to manage host-resident fonts. It also supplies troff width tables for the 35 standard PostScript fonts which reside on many PostScript printers, for use by the troff(1) program.
Most PostScript printers come equipped with fonts 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 the file:
/etc/lp/printers/printer-name/residentfonts |
When the printer is attached to a print server, make sure the list in the residentfonts file includes fonts that are on the print server and which are available for downloading to the printer.
You must edit the files containing the list of printer-resident fonts by using a text editor such as vi.
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.
LP print filters are either fast or slow. A fast filter quickly prepares a file for printing, and it must have access to the printer while the filter is processing. A slow filter takes longer to convert a file, and it does not need to access the printer while the filter is processing. An example of a slow filter is ASCII to PostScript.
The download filter is a fast filter; it 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 this, you can create a new filter table entry that calls the download filter as a slow filter by using the lp -y command. Alternatively, you can force selection of this filter by changing the input type.
The download filter performs five tasks:
It searches the PostScript document to determine which fonts are requested. These requests are documented with the following PostScript structuring comments: %%DocumentFonts: font1 font2 … in the header comments.
It searches the list of printer-resident fonts to determine if the requested font must be downloaded.
If the font is not resident on the printer, the download filter searches the host-resident font directory (by getting the appropriate file name from the map table) to determine if the requested font is available.
If the font is available, the filter takes the file for that font and appends it to the file to be printed.
It sends the font definition file and the source file (the file to be printed) to the PostScript printer.
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 map file that shows the correspondence between the names of fonts and the names of the files containing those fonts. Both the map and the font list must be updated when you install host-resident fonts.
The fonts available for use with PostScript printers are stored in directories you create called /usr/share/lib/hostfontdir/typeface/font, where typeface is replaced by a name like palatino or helvetica, and font is replaced by a name like bold or italic.
Log in as superuser, lp, or assume an equivalent role on the print server or print client.
Change directory to the /etc/lp/printers/printer-name directory.
# cd /etc/lp/printers/printer-name |
printer-name |
Name of the printer on which you want to install downloaded PostScript fonts. |
Create the residentfonts file, if it does not already exist.
# touch residentfonts |
This file might not exist if this is the first time you are adding permanently downloaded fonts.
Edit the residentfonts file and add all the printer-resident fonts and fonts to be permanently downloaded.
Log in as superuser, lp, or assume an equivalent role on the print server or print client.
Create the hostfontdir directory, if it does not already exist.
# cd /usr/share/lib # mkdir hostfontdir # chmod 775 hostfontdir |
Create a directory for a new typeface, if the directory does not already exist.
# mkdir typeface |
Copy the font file to the appropriate directory.
# cp filename /usr/share/lib/hostfontdir/typeface/font |
Add the name of the font and the name of the file in which it resides to the map table.
Change to the /usr/share/lib/hostfontdir directory.
Edit the map file using a text editor such as vi.
Add a one-line entry for each font you want to add to the table, with the font name first, followed by a space, followed by the name of the file where the font resides. For example:
Palatino-Bold /usr/share/lib/hostfontdir/palatino/bold |
Save the file.
When an example entry exists in the map table on the appropriate system, users will be able to apply the font (for example, Palatino Bold) in their print jobs. When they submit a print request containing this font, the LP print service appends a copy of the file /usr/share/lib/hostfontdir/palatino/bold to that file before sending it to the printer.
If you are using troff, you must create new width tables for this font in the standard troff font directory.