Inom
Hitta mer dokumentation
Supportresurser som ingår
| Ladda ner denna bok i PDF
Managing Character Sets, Filters, Forms, and Fonts
50
- 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 47, "Overview of Print Management."
Managing Character Sets
- Printers differ in the method they use to print text in various font styles. For instance, 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 may have defined a print wheel as gothic. To request the gothic print wheel, the user would enter lp -S gothic.
Selectable Character Sets
- 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 csnm n
|
- The csnm 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 may 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.
-
Note - 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.
-
Note - 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. See "Managing Fonts" on page 992 for information about how to administer PostScript fonts.
Hardware-Mounted Character Sets
- 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.
- 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, may not be the same character set.
Alerts for Mounting Print Wheels or Cartridges
- You request alerts for mounting print wheels or cartridges in the same way you request other alerts from the LP print service. See "Fault Notification" on page 878 for general information about alerts.
· How to Define a Print Wheel or Font Cartridge
-
-
Log in as root or lp 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...]
|
- In this command,
-
| printer-name | Is the name of the printer for which you are defining a print wheel or font cartridge. |
| hard-charset | Is the 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 root or lp on a system that is 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 may need to use the print wheel or font cartridge.
Verification--Defining a Print Wheel
- On both the print server and the print client, check the information following the Character sets heading in the output of the following command:
-
$ lpstat -p printer-name -l
|
Example--Defining a Print Wheel
- In the following example, the command defines the pica print wheel on the printer luna for a print client named asteroid.
-
asteroid# lpadmin -p luna -S pica
|
· How to Unmount and Mount a Print Wheel or Font Cartridge
-
-
Log in as root or lp on the print server.
-
Unmount the print wheel or font cartridge that is in the printer by using the lpadmin command.
-
# lpadmin -p printer-name -M -S none
|
- In this command,
-
| printer-name | Is the name of the printer on which you are unmounting a print wheel or font cartridge. |
| -S none | Specifies unmounting the current print wheel or font cartridge. |
- 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 by using the lpadmin command.
-
# lpadmin -p printer-name -M -S hard-charset
|
- In this command,
-
| printer-name | Is the printer on which you are mounting a print wheel or font cartridge. |
| hard-charset | Is the 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.
Verification--Unmounting and Mounting a Print Wheel
- Check 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
|
Example--Unmounting and Mounting a Print Wheel
- In the following example, the commands 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
|
· How to Set an Alert to Mount a Print Wheel or Font Cartridge
-
-
Log in as root or lp on the print server.
-
Set an alert to mount a print wheel or font cartridge by using the lpadmin command.
-
# lpadmin -S hard-charset -A alert [-Q requests] [-W minutes]
|
- In this command,
-
| hard-charset | Is the hardware character set name of the print wheel or font cartridge for which you want to set an alert. |
| alert | Specifies what kind of alert will occur when a print wheel or font cartridge is requested. See Table 49-2 on page 937 for detailed information about the valid values for alert. 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.
-
| requests | Specifies the number of print requests that require the print wheel or font cartridge 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. |
| minutes | Specifies how often (in minutes) the alert will occur. If you don't specify this option, the alert is sent only once. |
- The alert is added in the print server's /etc/lp/pwheels/charset-name/alert.sh file.
Verification--Setting an Alert to Mount a Print Wheel or Font Cartridge
- 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.
Examples--Setting an Alert to Mount a Print Wheel or Font Cartridge
- In the following example, the command sets email alerts to occur every five minutes for the elite print wheel when there are 10 print requests for elite in the print queue.
-
# lpadmin -S elite -A mail -Q 10 -W 5
|
- In the following example, the command sets 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
|
- In the following example, the command sets 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
|
- In the following example, the command sets no alerts to occur for the elite print wheel.
-
# lpadmin -S elite -A none
|
· How to Set Up an Alias for a Selectable Character Set
-
Note - You do not need to perform this procedure if the terminfo names for the selectable character sets are adequate. See "Managing Print Requests" on page 884 for more information.
-
-
Log in as root or lp on the print server.
-
Display the names of the selectable character sets for the specified printer type by using the tput command.
-
# tput -T printer-type csnm n
|
- In this command,
-
| printer-type | Is a printer type found in the terminfo database. See "Printer Type" on page 873 for information on entries in the terminfo database. |
| n | Is a 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, csnm 1 could cause the system to display english#. |
-
-
Set up an alias for a selectable character set.
-
# lpadmin -p printer-name -S select-charset1=alias1[,select-charset2=alias2...]
|
- In this command,
-
| printer-name | Is the printer on which you are setting up aliases for selectable character sets. |
| select-charset | Is the selectable character set name for which to set an alias. The name can be found in Step 2. |
| alias | Is the 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 root or lp 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 may need to use the alias.
Verification--Setting Up an Alias for a Selectable Character Set
- On the print server and print clients, verify that the alias for the selectable character set is listed in the output of the following command.
-
$ lpstat -p printer-name -l
|
- Otherwise, submit a print request that uses the alias for the selectable character set and check for output.
Example--Setting Up an Alias for a Selectable Character Set
- In the following example, the commands 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 csnm 0
usascii# tput -T ln03 csnm 1
english# tput -T ln03 csnm 2
finnish# tput -T ln03 csnm 3
japanese# tput -T ln03 csnm 4
norwegian#
# lpadmin -p luna -S usascii=text
|
Managing Print Filters
-
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 so 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 50-1 on page 974. 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. Admintool automatically enables the supplied filters. However, if you administer other printers, you may need to administer print filters for them.
Creating Print Filters
- 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. See "Creating a New Print Filter" on page 1011 for background information and step-by-step instructions.
Adding, Changing, Removing, and Restoring Print Filters
- Print filters are added, changed, or removed on both the print server and the print clients.
- You 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 under /usr/lib/lp.
- The LP print service imposes no fixed limit on the number of print filters you can define. You may 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 may 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 5.x system software provides a default set of PostScript filters, which Admintool automatically adds to a print server. Some of the TranScript filters used with SunOS 4.1 have SunOS 5.x equivalents, but others do not. Table 50-1 lists the default PostScript filters and identifies the TranScript filters, where applicable.
-
Table 50-1
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 |
- SunOS 5.x does not provide the following filters:
-
- TEX
-
oscat (NeWSprint opost)
- Enscript
- The postreverse, postprint, postio, and dpost filters are provided in place of Enscript.
- Admintool 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" on page 1022 for information about writing a custom print filter.
· How to Add a Print Filter
-
-
Log in as root or lp on the print server.
-
Add a print filter that is based on a print filter definition by using the
lpfilter command.
-
# lpfilter -f filter-name -F filter-def
|
- In this command,
-
| filter-name | Is a name you choose for the print filter. |
| filter-def | Is name of the print filter definition. |
- The print filter is added in the print server's /etc/lp/filter.table file.
Verification--Adding a Print Filter
- 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
|
Example--Adding a Print Filter
- In the following example, the command adds the daisytroff print filter that has the daisytroff.fd print filter definition.
-
# lpfilter -f daisytroff -F /etc/lp/fd/daisytroff.fd
|
· How to Delete a Print Filter
-
-
Log in as root or lp on the print server.
-
Delete the print filter by using the lpfilter command.
-
# lpfilter -f filter-name -x
|
- In this command,
-
filter-name...Is the name of the print filter to be deleted.
- The print filter is deleted from the print server's /etc/lp/filter.table file.
Verification--Deleting a Print Filter
- Verify that filter was deleted by using the following command. You should receive an error indicating that no filter by the specified name exists.
-
# lpfilter -f filter-name -l
|
Example--Deleting a Print Filter
- In the following example, the command deletes the daisytroff print filter.
-
# lpfilter -f daisytroff -x
|
· How to View Information About a Print Filter
-
-
Log in as root or lp on the print server.
-
Request information about a print filter by using the lpfilter command.
-
# lpfilter -f filter-name -l
|
- In this command,
-
filter-name...Is the print filter for which you want to view information. Specify all for filter-name to view information about all the available print filters.
- Information about the specified print filter(s) is displayed.
Examples--Viewing Information About a Print Filter
- In the following example, the command requests 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
|
- In the following example, the command redirects information about the daisytroff filter to a file (creates the filter definition for that filter). This is useful if a filter definition is removed unintentionally.
-
# lpfilter -f daisytroff -l > daisytroff.fd
|
- In the following example, the command displays 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
|
Managing Forms
- 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.
Adding, Changing, or Deleting 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. See "How to Create a New Form Definition" on page 1027 for information about how to create form definitions.
-
Note - 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 may result in unnecessary processing by the print service.
Mounting Forms
- 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. Then 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.
Defining Alerts for Mounting Forms
- You request alerts for mounting forms in the same way you request other alerts from the LP print service. See "Fault Notification" on page 878 for general information about alerts.
Checking Forms
- 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.
-
- Use the lpforms command to show the attributes of the form. You can also redirect the output of the command into a file to save it for future reference.
- Use the lpstat command to display the current status of the form. 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.
Limiting Access to Forms
- You can control which printers and users have access to some or all of the forms available on the network. For example, you may want only the people in the payroll or accounts payable department to be able to print check forms. In addition, you may 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" on page 990. To limit printer access to a form, see "How to Limit Printer Access to a Form" on page 991.
· How to Add a Form
-
-
Log in as root or lp on the print server.
-
Add a form that is based on a form definition by using the lpforms command.
-
# lpforms -f form-name -F /etc/lp/forms/form
|
- In this command,
-
form-name.........Is the name you choose for the form.
-
-
/etc/lp/forms/form Is the name of the form definition.
- The form is added in the print server's /etc/lp/forms/form-name/describe file.
Verification--Adding a Form
- 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
|
Example--Adding a Form
- In the following example, the command adds the medical form that uses the medical.fmd form definition.
-
# lpforms -f medical -F /etc/lp/forms/medical.fmd
|
-
Note - Before the form can be used, one or more printers must be granted access to the form. See "How to Limit Printer Access to a Form" on page 991.
· How to Delete a Form
-
-
Log in as root or lp on the print server.
-
Delete the form by using the lpforms command.
-
# lpforms -f form-name -x
|
- In this command,
-
form-name....Is the form to be deleted.
- The form is deleted from /etc/lp/forms/form-name file.
Verification--Deleting a Form
- Verify that form was deleted by using the following command. You should receive an error indicating that a form by the specified name does not exist.
-
# lpforms -f form-name -l
|
Example--Deleting a Form
- In the following example, the command deletes the medical form.
-
· How to Unmount and Mount a Form
-
-
Log in as root or lp on the print server.
-
Stop accepting print requests on the printer on which you are unmounting the current form by using the reject command.
-
- In this command,
-
printer-name..Is the name of the printer on which you are unmounting a form.
- New print requests (which may not require the form) are not allowed to enter the printer's queue.
-
-
Unmount the current form by using the lpadmin command.
-
# 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.
-
-
Remove the form paper from the printer.
-
Load the form paper for the next print request.
-
-
Mount the form by using the lpadmin command.
-
# lpadmin -p printer-name -M -f form-name [-a -o filebreak]
|
- In this command,
-
| printer-name | Is the printer on which you are mounting a form. |
| form-name | Is the name of the form to be mounted. |
| -a -o filebreak | 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.
-
- The printer is ready to print the form you just mounted.
Verification--Unmounting and Mounting a Form
- 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.
Examples--Unmounting and Mounting a Form
- 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
|
· How to Set an Alert to Mount a Form
-
-
Log in as root or lp on the print server.
-
Set a request alert for mounting a form by using the lpadmin command.
-
# lpforms -f form-name -A alert [-Q requests] [-W minutes]
|
- In this command,
-
| form-name | Is the form for which you want to set a request alert. |
| alert | Specifies what kind of alert will occur when a form is requested. See Table 49-2 on page 937 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.
-
| 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. |
| 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.
Verification--Setting an Alert to Mount a Form
- 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.
Examples--Setting an Alert to Mount a Form
- In the following example, the command sets 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
|
- In the following example, the command sets 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
|
- In the following example, the command sets no request alerts for the invoice form.
-
# lpforms -f invoice -A none
|
· How to View Information About a Form
-
-
Log in as root or lp on the print server.
-
Request information about a form by using the lpforms command.
-
# lpforms -f form-name -l
|
- In this command,
-
-f form-name Is the form for which you want to view information. Specify all for form-name to view information about all the available forms.
- Information about the specified form(s) is displayed.
Examples--Viewing Information About a Form
- In the following example, the command displays 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
|
- In the following example, the command redirects 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
|
· How to View the Current Status of a Form
-
-
Log in on the print server.
-
Request information about the current status of a form by using the
lpstat command.
-
- In this command,
-
-f form-name Is the 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.
Example--Viewing the Current Status of a Form
- In the following example, the command displays the status of the medical form.
-
$ lpstat -f medical,payroll
form medical is available to you
|
· How to Limit User Access to a Form
-
-
Log in as root or lp on the print server.
-
Allow or deny users access to a form by using the lpforms command.
-
# lpforms -f form-name -u allow:user-list | deny:user-list
|
- In this command,
-
| form-name | Is the name of the form for which the allow or deny user access list is being created. |
| user-list | Represents users to be added to the allow or 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 49-3 on page 938 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
/etc/lp/forms/form-name/deny
Verification--Limiting User Access to a Form
- Verify the allow and deny user access lists by using the lpforms command.
-
# lpforms -f form-name -l
|
Examples--Limiting User Access to a Form
- In the following example, the command allows only the users nathan and marcia access to the check form.
-
# lpforms -f check -u allow:nathan,marcia
|
- In the following example, the command denies users jones and smith access to the dental form.
-
# lpforms -f dental -u deny:"jones,smith"
|
· How to Limit Printer Access to a Form
-
-
Log in as root or lp on the print server.
-
Allow or deny use of forms on a printer by using the lpadmin command.
-
# lpadmin -p printer-name -f allow:form-list | deny:form-list
|
- In this command,
-
| printer-name | Is the name of the printer for which the allow or deny forms list is being created. |
| form-list | Are 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
Verification--Limiting Printer Access to a Form
- Verify the allow and deny forms lists by using the following command.
-
# lpstat -p printer-name -l
|
Examples--Limiting Printer Access to a Form
- In the following example, the command allows the printer luna to access only the medical, dental, and check forms.
-
# lpadmin -p luna -f allow:medical,dental,check
|
- In the following example, the command denies the printer luna from accessing the medical, dental, and check forms.
-
# lpadmin -p luna -f deny:"medical dental payroll"
|
Managing Fonts
- If you have a laser printer, you may need to install and maintain PostScript fonts. You may 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:
-
Managing Printer-Resident Fonts
- 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.
Downloading Host-Resident Fonts
- 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 may also be used to send fonts to a print server. To do this, you may create a new filter table entry that calls the download filter as a slow filter by using the -y option of the lp command. Alternatively, you may 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.
Installing and Maintaining Host-Resident Fonts
- 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.
· How to Install Downloaded PostScript Fonts
-
-
Log in as root or lp on the print server or print client.
-
Change directory to the /etc/lp/printers/printer-name directory.
-
# cd /etc/lp/printers/printer-name
|
- In this command,
-
printer-name..Is the name of the printer on which you want to install downloaded PostScript fonts.
-
-
Create the residentfonts file, if it does not already exist. This file may not exist if this is the first time you are adding permanently downloaded fonts.
-
Edit the residentfonts file by adding all the printer-resident fonts and fonts to be permanently downloaded.
You can use any text editor, such as vi.
-
Save the file.
· How to Install Host-Resident PostScript Fonts
-
-
Log in as root or lp 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.
-
-
-
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.
a. Type cd /usr/share/lib/hostfontdir and press Return. b. 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
|
-
c. 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.
|
|