InnerhalbNach weiteren Dokumenten suchenSupport-Ressourcen | Dieses Buch im PDF-Format herunterladen (1611 KB)
Chapter 6 Managing Character Sets, Filters, Forms, and Fonts (Tasks)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, Print Management (Overview). Managing Character SetsPrinters 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 enter lp -S gothic. Selectable Character SetsThe 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:
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. 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" for information about how to administer PostScript fonts. Hardware-Mounted Character SetsAnother 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. See "How to Unmount and Mount a Print Wheel or Font Cartridge" for more information. 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. Tracking Print WheelsThe 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. Alerts for Mounting Print Wheels or CartridgesYou request alerts for mounting print wheels or cartridges in the same way you request other alerts from the LP print service. See "Setting Up Printer Fault Alerts" for general information about alerts. How to Define a Print Wheel or Font Cartridge
Example--Defining a Print WheelIn the following example, the command defines the pica print wheel on the printer luna for a print client named asteroid.
How to Unmount and Mount a Print Wheel or Font Cartridge
Example--Unmounting and Mounting a Print WheelIn the following example, the commands unmount the current print wheel on the printer luna and mount the pica print wheel.
How to Set an Alert to Mount a Print Wheel or Font Cartridge
Examples--Setting an Alert to Mount a Print Wheel or Font CartridgeIn the following example, the command sets email alerts to occur every five minutes for the elite print wheel when there are ten print requests for elite in the print queue.
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.
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.
In the following example, the command sets no alerts to occur for the elite print wheel.
How to Set Up an Alias for a Selectable Character SetNote - You do not need to perform this procedure if the terminfo(4) names for the selectable character sets are adequate. See "Adding a terminfo Entry for an Unsupported Printer" for more information on using the terminfo database.
Example--Setting Up an Alias for a Selectable Character SetIn 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.
Managing Print FiltersPrint 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:
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. Creating Print FiltersTo 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" for background information and step-by-step instructions. Adding, Changing, Removing, and Restoring Print FiltersPrint filters are added, changed, or removed on the print server only. You use the lpfilter(1M) 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 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 SunOS 4.1 have SunOS equivalents, but others do not. The table below lists the default PostScript filters and identifies the TranScript filters, where applicable. Table 6-1 Default PostScript Filters
The SunOS software does not provide the following filters:
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. How to Add a Print Filter
Example--Adding a Print FilterIn the following example, the command adds the daisytroff print filter that has the daisytroff.fd print filter definition.
How to Delete a Print Filter
Example--Deleting a Print FilterIn the following example, the command deletes the daisytroff print filter.
How to View Information About a Print Filter
Examples--Viewing Information About a Print FilterIn the following example, the command requests information for the postdaisy print filter, and the information that is displayed in response.
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.
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.
Managing FormsA 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 FormsWhen 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 the table below 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 can result in unnecessary processing by the print service. Mounting FormsTo 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:
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. Tracking FormsThe 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. Defining Alerts for Mounting FormsYou request alerts for mounting forms in the same way you request other alerts from the LP print service. See "Setting Up Printer Fault Alerts" for general information about alerts. Checking FormsWhen 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.
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 FormsYou 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". How to Add a Form
Example--Adding a FormIn the following example, the command adds the medical form that uses the medical.fmd form definition.
Note - Before the form can be used, one or more printers must be given access to the form. See "How to Limit Printer Access to a Form". How to Delete a Form
Example--Deleting a FormIn the following example, the command deletes the medical form.
How to Unmount and Mount a Form
Examples--Unmounting and Mounting a FormThe following example shows the process of unmounting the currently mounted form on the printer luna.
The following example shows the process of mounting the medical form on the printer luna.
How to Set an Alert to Mount a Form
Examples--Setting an Alert to Mount a FormIn 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.
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.
In the following example, the command sets no request alerts for the invoice form.
How to View Information About a Form
Examples--Viewing Information About a FormIn the following example, the command displays information about the medical 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.
How to View the Current Status of a Form
Example--Viewing the Current Status of a FormIn the following example, the command displays the status of the medical form.
How to Limit User Access to a Form
Examples--Limiting User Access to a FormIn the following example, the command allows only the users nathan and marcia access to the check form.
In the following example, the command denies users jones and smith access to the dental form.
How to Limit Printer Access to a Form
Examples--Limiting Printer Access to a FormIn the following example, the command allows the printer luna to access only the medical, dental, and check forms.
In the following example, the command denies the printer luna from accessing the medical, dental, and check forms.
Managing FontsIf 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:
Managing Printer-Resident FontsMost 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:
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 FontsWhen 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:
Installing and Maintaining Host-Resident FontsSome 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
How to Install Host-Resident PostScript Fonts
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||