Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Printing Oracle Solaris 11 Express 11/10 |
1. Introduction to Printing in the Oracle Solaris Operating System
2. Planning for Printing (Tasks)
3. Setting Up and Administering Printers by Using CUPS (Tasks)
4. Setting Up and Administering Printers by Using Print Manager for LP (Tasks)
5. Setting Up and Administering Printers by Using Oracle Solaris Print Manager (Tasks)
6. Setting Up Printers by Using LP Print Commands (Tasks)
7. Administering Printers by Using LP Print Commands (Tasks)
8. Customizing LP Printing Services and Printers (Tasks)
9. Administering the LP Print Scheduler and Managing Print Requests (Tasks)
10. Administering Printers on a Network (Tasks)
11. Administering Character Sets, Filters, Forms, and Fonts (Tasks)
Administering Character Sets (Task Map)
Alerts for Mounting Print Wheels or Font Cartridges
How to Define a Print Wheel or Font Cartridge
How to Unmount and Mount a Print Wheel or Font Cartridge
How to Set an Alert to Mount a Print Wheel or Font Cartridge
Administering Print Filters (Task Map)
Writing a Print Filter Program
Handling Special Printing Modes
Requirements for a Print Filter Program
Creating a Print Filter Definition
lpfilter Output Types Argument
lpfilter Printer Types Argument
Defining Print Filter Options With Templates
How to Create a New Print Filter
Adding, Changing, Deleting, and Restoring Print Filters
How to View Information About a Print Filter
Administering Forms (Task Map)
How to Create a New Printer Form Definition
Adding, Changing, or Deleting Forms
How to Unmount and Mount a Form
Defining Alerts for Mounting Forms
How to Set an Alert to Mount a Form
How to View Information About a Form
How to View the Current Status of a Form
How to Limit User Access to a Form
How to Limit Printer Access to a Form
Administering Fonts (Task Map)
Managing Printer-Resident Fonts
Downloading Host-Resident Fonts
Installing and Maintaining Host-Resident Fonts
How to Install Downloaded PostScript Fonts
How to Install Host-Resident PostScript Fonts
12. Administering Printers by Using the PPD File Management Utility (Tasks)
13. Printing in the Oracle Solaris Operating System (Reference)
14. Troubleshooting Printing Problems in the Oracle Solaris OS (Tasks)
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.
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 hardware character sets. 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 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 as follows:
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. To display the names of the other character sets, you can repeat the command by using -1, -2, -3, and so on, in place of the -0. 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 that are used in the manufacturer's documentation for the printer. Because all manufacturers do not use the same character set names, the terminfo character set names can differ from one printer type to the next printer type.
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.
Character sets for PostScript printers are not listed when you use the lpstat -p -l command. The PostScript fonts are controlled by PostScript filters, not by entries in the terminfo database. For information about how to administer PostScript fonts, see Administering Fonts.
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.
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 following:
The names you want to use for the available print wheels
How you want to be alerted when a printer needs a different print wheel
Then, when a user requests a particular character set by using the lp -S 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 How to Unmount and Mount a Print Wheel or Font Cartridge.
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.
Unlike selectable character sets, the names you use for print wheels or font cartridges are not tied to entries in the terminfo database. Print wheel names or font cartridge names are used only for the purpose of communicating with the LP print service and its users.
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.
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.
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 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 font cartridges in the same way that you request other alerts from the LP print service. For general information about alerts, see Setting Up Printer Fault Recovery by Using LP Print Commands.
These procedure shows how to 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...]
Specifies the name of the printer for which you are defining a print wheel or font cartridge.
Specifies 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 quotation marks.
Define names that are meaningful to users. Inform the users of these names.
The print wheel or font cartridge definition is specified in the print server's /etc/lp/printers/printer-name/configuration file.
# print-client lpadmin -p printer-name -S hard-charset1, hard-charset2...
In this command, the variables are the same as the variables in Step 2.
The print wheel or font cartridge definition is added to the print client's /etc/lp/printers/printer-name/configuration file.
You should see the name of the character set and the notation (mounted).
# lpstat -p printer-name -l
Example 11-1 Defining a Print Wheel
The following example shows how to define the pica print wheel on the printer luna. The print client is named asteroid.
asteroid# lpadmin -p luna -S pica
# lpadmin -p printer-name -M -S none
Specifies the printer on which you are unmounting a print wheel or font cartridge.
Indicates that you want to unmount the current print wheel or font cartridge.
For more information, see the lpadmin(1M) man page.
The current print wheel or font cartridge is deleted from the print server's /etc/lp/printers/printer-name/configuration file.
# lpadmin -p printer-name -M -S hard-charset...
Specifies the printer on which you are mounting a print wheel or font cartridge.
Specifies the hardware character set name of the print wheel or font cartridge you want to mount.
The print wheel or font cartridge is added to 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.
You should see the name of the print wheel or character set and the notation (mounted).
# lpstat -p printer-name -l
Example 11-2 Unmounting and Mounting a Print Wheel
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
# lpadmin -S hard-charset -A alert [-Q requests] [-W minutes]
Specifies the hardware character set name of the print wheel or font cartridge for which you want to set an 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 7-5. 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. The message includes the names of one or more printers that have been set up to use such a print wheel or font cartridge.
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.
Specifies how often (in minutes) the alert occurs If you don't specify this option, the alert is sent one time.
For more information, see the lpadmin(1M) man page.
The alert is added to the print server's /etc/lp/pwheels/charset-name/alert.sh file.
# lpadmin -S hard-charset -A list
Alternatively, 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.
Example 11-3 Setting an Alert to Mount a Print Wheel
The following example shows how to set email alerts to occur every 5 minutes for the elite print wheel when the print queue contains 10 print requests for the elite.
# lpadmin -S elite -A mail -Q 10 -W 5
Example 11-4 Setting an Alert to Mount a Font Cartridge
The following example shows how to set email alerts to occur every minute for the finnish font cartridge when the print queue contains 5 print requests for the finnish.
# lpadmin -S finnish -A mail -Q 5 -W 1
Example 11-5 Setting Up No Alerts for a Print Wheel
The following example shows how to set up no alerts 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.
# tput -T printer-type csn
Specifies the printer type found in the terminfo database. For information on entries in the terminfo database, see Printer Type.
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, cs1 could cause the system to display english#.
For more information, see the tput(1) man page.
# lpadmin -p printer-name -S select-charset1=alias1,select-charset2=alias2...
Specifies the printer on which you are setting up aliases for selectable character sets.
Specifies the electable character set name. The name can be found in Step 2.
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 quotation marks.
The alias is added to the print server's /etc/lp/printers/printer-name/configuration file.
# lpadmin -p printer-name -S select-charset1=alias1,select-charset2=alias2...
In this command, the variables are the same as the variables in Step 3.
The alias is added to the print client's /etc/lp/printers/printer-name/configuration file.
# lpstat -p printer-name -l
Alternatively, submit a print request that uses the alias for the selectable character set and check for output.
Example 11-6 Setting Up an Alias for a Selectable Character Set
The following example shows how to display the names of selectable character sets for the usascii selectable character set on the printer luna. The printer luna is a ln03 printer type. This example also shows how to specify text as an alias for the usascii selectable character set.
# 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