Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Solaris Printing
Previous Next

Administering Character Sets

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

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 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.

Hardware 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 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.

Tracking Print Wheels

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.

Alerts for Mounting Print Wheels or Font Cartridges

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.

How to Define a Print Wheel or Font Cartridge

These procedure shows how to define a print wheel or font cartridge that can be used with the printer.

  1. Log in as superuser, lp, or assume an equivalent role on the print server.
  2. Define a print wheel or font cartridge.
    # print-server lpadmin -p printer-name -S hard-charset1[,hard-charset2...]
    -p printer-name

    Specifies the name of the printer for which you are defining a print wheel or font cartridge.

    -s hard-charset

    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.

  3. Log in as superuser, lp, or assume an equivalent role on a print client of the print server.
  4. 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 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.

  5. Repeat Step 3 and Step 4 for each print client that might need to use the print wheel or font cartridge.
  6. Verify that the print wheel or font cartridge is defined.

    You should see the name of the character set and the notation (mounted).

    # lpstat -p printer-name -l
Example 8-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

How to Unmount and Mount a Print Wheel or Font Cartridge

  1. Log in as superuser, lp, or assume an equivalent role on the print server.
  2. Unmount the print wheel or font cartridge that is mounted in the printer.
    # lpadmin -p printer-name -M -S none
    -p printer-name

    Specifies the printer on which you are unmounting a print wheel or font cartridge.

    -M -S none

    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.

  3. Remove the print wheel or font cartridge from the printer.
  4. Put the new print wheel or font cartridge in the printer.
  5. Mount the new print wheel or font cartridge.
    # lpadmin -p printer-name -M -S hard-charset...
    -p printer-name

    Specifies the printer on which you are mounting a print wheel or font cartridge.

    -M -S hard-charset

    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.

  6. 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 8-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

How to Set an Alert to Mount a Print Wheel or Font Cartridge

  1. Log in as superuser, lp, or assume an equivalent role on the print server.
  2. Set an alert to mount a print wheel or font cartridge.
    # lpadmin -S hard-charset -A alert [-Q requests] [-W minutes]
    -S hard-charset

    Specifies the 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-4. 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.

    -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 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.

  3. 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

    Alternately, if you have set a low number of print requests to trigger the alert, submit enough print requests to meet the minimum requirements. Ensure that you receive an alert to mount the print wheel or font cartridge.

Example 8-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 8-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 8-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

How to Set Up an Alias for a Selectable Character Set

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.

  1. Log in as superuser, lp, or assume an equivalent role on the print server.
  2. Display the names of the selectable character sets for the specified printer type.
    # tput -T printer-type csn
    -T printer-type

    Specifies the printer type found in the terminfo database. For information on entries in the terminfo database, see Printer Type.

    n

    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.

  3. Set up an alias for a selectable character set.
    # lpadmin -p printer-name -S select-charset1=alias1,select-charset2=alias2...
    -p printer-name

    Specifies the printer on which you are setting up aliases for selectable character sets.

    -Sselect-charset

    Specifies the electable character set name. 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 quotation marks.

    The alias is added to the print server's /etc/lp/printers/printer-name/configuration file.

  4. Log in as superuser, lp, or assume an equivalent role on a system that is a print client of the print server.
  5. 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 the variables in Step 3.

    The alias is added to the print client's /etc/lp/printers/printer-name/configuration file.

  6. Repeat Step 4 and Step 5 for each print client that might need to use the alias.
  7. On the print server and print clients, verify that the selectable character set alias is listed in the output of the following command.
    # lpstat -p printer-name -l

    Alternately, submit a print request that uses the alias for the selectable character set and check for output.

Example 8-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
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire