This chapter explains how to define and use a logical printer, examine printer properties and settings, and set up printer attribute files. A logical printer is a software representation created by the system administrator of one or more physical printers. For example, one logical printer might represent three diverse printers: one that prints on standard paper, one that prints with highlight colors and stapling, and another that prints on large media. You send a print request to a logical printer whose characteristics fit your needs and the server determines if and how it can print that job.
If you submit all or most of your jobs to the same logical printer, you can define it to be your default printer. This also reduces the need to specify a logical printer in many print system commands.
Consider the following scenario:
Printer same_old prints jobs in black and white.
Since you print most often in black and white on regular sized paper, you can specify this as your default logical printer.
Printer flashy prints in highlight colors and can staple documents.
Occasionally, you need to print using highlight colors, so you can override the default setting and specify this logical printer.
Printer jumbo prints in black and white on oversized paper.
Sometimes you need to print on oversized paper in black and white. If so, you can override the default setting and specify this logical printer.
The PDPRINTER environment variable, which you can define in your shell or in your .profile or .login file, determines your default logical printer. To set or change the default, use one of the following procedures, substituting the name of your default printer for PrinterName.
Procedure for C shell users:
Insert or modify the following line in the .login file in your home directory, then save the file:
%
setenv PDPRINTER
PrinterName
Apply the changes to the .login file by entering this command:
%
source .login
Display the name of the logical printer by entering this command:
%
echo $PDPRINTER
Procedure for Korn shell users:
Insert or modify this line in the .profile file in your home directory, then save the file:
%
export PDPRINTER=
PrinterName
Apply the changes to the .profile file by entering this command:
%
. ./.profile
Display the name of the logical printer by entering this command:
%
echo $PDPRINTER
After you set the PDPRINTER environment variable, any print job you submit without designating a printer will be inserted into the default logical printer's queue. In addition, the spooler server associated with your default logical printer becomes your default server. When you issue certain commands without specifying an operand, the system uses the default server value to provide a useful result in the context of that server.
Use the pdpr command to submit a print job. For example, to submit the file budget99.txt to the default logical printer, enter:
%
pdpr budget99.txt
You can use the pdq command to return a list of your jobs on the default printer. To request such a list, enter:
%
pdq
To specify a logical printer, use the -p printer_name option with the pdpr command. For example, to submit the file budget99.txt to the highlight color printer named flashy, enter:
%
pdpr -p flashy budget99.txt
Use the -p option of the pdq command to return a list of jobs you have submitted to a specific logical printer. For example, to display a list of jobs you have submitted to logical printer flashy, enter:
%
pdq -p flashy
To find the names of all available logical printers, use the pdls command as follows:
%
pdls -c printer
You may have a variety of printers available to you in your networked environment. To determine which printer best meets your needs, use the pdls command to list printer properties, including:
The printer name
Whether the printer is capable of accepting print requests
Supported features such as input trays, output bins, media, and native document formats
How many jobs are pending in the print queue for the printer
You can request a list of all logical printers supported by your default server by entering the following command:
%
pdls -c printer
To request information about all printers on a particular spooler, specify the server name followed by a colon. For example, to find out which printers are supported by the spooler doggone_spl, issue the following command:
%
pdls -c printer doggone_spl:
The following example requests basic information about the printer bulldog:
%
pdls -c printer bulldog
To request an expanded list of attributes that includes
the associated server and printers, use the
-r verbose
option:
%
pdls -c printer -r verbose bulldog
To request a complete list of all attributes including printer features,
use the
-r all
option and the
-s line
option.
The latter option indicates that you want the output displayed one
attribute per line instead of wrapping to the width of your window, which
is harder to read.
%
pdls -c printer -r all -s line bulldog
You can request printer attributes by including the -r option with the pdls command. For example, the printer-name attribute stores the names of logical printers associated with a server and the printer-associated-printers attribute stores the names of physical printers associated with a logical printer. The following example shows how to determine the logical and physical printers available on server bulldog_spl.
%
pdls -c printer -r \ "printer-name printer-associated-printers" bulldog_spl:
printer-name printer-associated-printers ------------ --------------------------- fetch bone_pp stick_pp slipper_pp two_sidedPS ln1701_pp ln1702_pp biglab office_pp hallway_pp javaroom_pp closet_pp
When you issue print requests, you probably use certain attributes frequently, such as specifying job start sheets. Rather than repeating the same attributes with every print request, you can apply default settings by using initial-value-job and initial-value-document objects.
An initial-value-job object is a collection of attributes and values stored on the server. The set of attributes is applied to a job all at once, when you specify the object while submitting a job, or automatically whenever a job is directed at a particular logical printer.
An initial-value-document object is a similar collection of attributes and values, except that it applies to documents rather than jobs.
Because every print system configuration is unique, you should check with your administrator for details on the use of such objects. If you know the name of the spooler server that manages your logical printers, you can use the pdls command to ask the system for its initial value objects.
For example, the following command lists all initial-value-job objects on server doggone_spl:
%
pdls -c initial-value-job doggone_spl:
If the result of the preceding example included an object named bulldog_IVJ_DEFAULT, you can list the details of that object by using the following command:
%
pdls -c initial-value-job -r all -s line doggone_spl:bulldog_IVJ_DEFAULT
The result lists those attributes that are applied to a job whenever that initial-value-job object is either specified with a job or associated with the printer.
Your print system administrator can apply default settings to all jobs submitted to a printer by associating an initial-value-job object with a logical printer's printer-initial-value-job attribute. The print system uses this attribute to apply attribute values to all jobs submitted to the printer.
For example, a printer's initial-value-job object can include the job-sheets=job-copy-start attribute. All jobs you submit to that logical printer include, by default, include job start sheets.
You can also specify initial-value-job objects when you submit a print job.
Similarly, your administrator can apply default attribute values to every document submitted to a printer. In this case, an initial-value-document object is associated with a logical printer's printer-initial-value-document attribute.
For example, a printer's initial-value-document object might include the copy-count=2 attribute. As a result, the printer makes two copies of every document in every job.
You can also specify initial-value-document objects, such as a different number of copies, when you submit a print job.
To determine the name of the initial-value-job and initial-value-document objects associated with the printer bulldog, use the following command:
%
pdls -c printer -r \ "printer-name printer-initial-value-job printer-init-val-doc" \ bulldog
Then, assuming that the initial-value objects are bulldog_IVJ_DEFAULT and bulldog_IVD_DEFAULT respectively, and that the spooler name is doggone_spl, display the attributes and values represented by the initial-value objects using the following commands:
%
pdls -c initial-value-job -r all \ -s line doggone_spl:bulldog_IVJ_DEFAULT
%
pdls -c initial-value-document \ -r all -s line doggone_spl:bulldog_IVD_DEFAULT
The resulting output will list attributes that are defined by the initial value objects. For example, the command to list initial-value-job information might produce the following output:
bulldog_IVJ_DEFAULT: object-class = initial-value-job
bulldog_IVJ_DEFAULT: initial-value-job-identifier = bulldog_IVJ_DEFAULT
bulldog_IVJ_DEFAULT: job-hold = no
bulldog_IVJ_DEFAULT: job-retention-period = 2:00
bulldog_IVJ_DEFAULT: associated-server = dogear_spl
bulldog_IVJ_DEFAULT: job-sheets = job-copy-start
You can predefine specific attributes in text files called attribute files. You can then include them in a printer command by using the -X option to specify an attributes file. Refer to the Advanced Printing Software Command Reference Guide for more information.
In the following example, an attribute file called budget_format.attr, located in your current working directory, contains a set of attributes for printing PostScript documents two-sided with no document sheets.
# Attribute file budget_format.attr
# Use this for printing 2-sided PostScript documents
document-format=PostScript
document-sheets=none
sides=2
The following example uses that attribute file to print the document budget99.ps as a PostScript one, double-sided, and without document sheets:
%
pdpr -X "budget_format.attr" budget99.ps