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.
2.1 Defining the Name Service
If your print system uses LDAP as a name service, you need to edit or
create the
/var/pd/config/apx.conf
.
The content of this
file should be obtained from the print system administrator.
The
/var/pd/config/apx.conf
file contains information
on name services you use and contains information about the host system that
is running the LDAP directory services.
The following example shows a
/var/pd/config/apx.conf
file:
name-services = file nis ldap
LDAP_hosts = system.abc.xyz.com
LDAP_path = ou=organizational unit,o=organization
name-services
describes the name services
the print system uses and the order in which they are used.
In this example,
local file, NIS, and LDAP are used.
Lookups for print objects are done in
the local file (/etc/printers.conf
), in the
printers.conf.byname
NIS map, and then in the LDAP directory server.
LDAP_hosts
list up to three hosts that
the LDAP directory services is running on.
Multiple hosts are listed when
they are providing replication services.
When you list multiple hosts, they
must be separated by colons.
If the LDAP server is on a system running TruCluster
Version 5.0 or later software, you can use the cluster alias as the host name.
The standard LDAP services port number is 389.
However, LDAP services
can be provided on a non-standard port number.
You specify the LDAP port
number by appending the port number to the host name within parenthessis as
in the following example:LDAP_hosts = myhost.xyz.com(8182)
LDAP_path
lists a directory search path.
To access an LDAP-based database, you must supply a distinguished name path.
Printing clients and servers use this path to create and search for entries
in the directory.
With Netscape Directory Server, you start by naming your
"Organization", and then you create "organizational units" under the organization.
The distinguished name path you need to specify for Advanced Printing includes
the organization and organizational unit in distinguished name syntax.
For
example, if your top-level organization is named "XYZ Corp", and you define
an organizational unit "AdvPrint", the distinguished name path would be:
ou=AdvPrint,o=XYZ Corp
You can specify up to three entries in the
LDAP_path
expression.
Separate multiple entries with a colon (":") character.
For
example, if in XYZ Corp, you create a secondary organizational unit called
"Test Environment", your
LDAP_path
should be specified
as follows:ou=AdvPrint,o=XYZ Corp:ou=Test Environment,o=XYZ
Corp
When accessing entries listed in the
LDAP_path
expression,
a search continues through the entries until a matching entry is found.
When
creating or deleting entries, only the first path entry is used; the second
and third entries listed in the
LDAP_path
expression are
"read-only".
2.2 Defining Your Default Logical Printer
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 is 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.
2.2.1 CDE Mail Tool Requests a Default Printer
If you have not specified a value of PDPRINTER in your
.dtprofile
file, and you print from the CDE mail tool, a dialog box is displayed
stating that you have not specified a default printer.
Printing succeeds if
you print to a working logical printer.
To eliminate this dialog box, edit your
.dtprofile
file and define a default logical printer using the following command:
%
export PDPRINTER=<printer name>
2.3 Accessing the Default Logical Printer
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
2.4 Accessing a Specific Logical Printer
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
2.5 Determining Properties of Printers
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
2.5.1 Requesting Specific Attributes with the pdls Command
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.
2.6.1 Using printer-initial-value-job Objects
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.
2.6.2 Using printer-initial-value-document Objects
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.
2.6.3 Checking a Logical Printer for Initial Value Objects
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 lists attributes that are defined by the initial
value objects.
For example, the command to list
initial-value-job
information may produce the following:
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
2.6.4 Using an Attributes File
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