2    Defining Printer Defaults

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 for 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 file. 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 the contents of 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

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:

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 logical printer, use one of the following procedures, substituting the name of your default printer for PrinterName.

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    Defining a Default Logical Printer for the CDE Mail Tool

If you have not specified a value for PDPRINTER environment variable 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 specify a working logical printer.

To set the default logical printer, insert the following line in your .dtprofile in your home directory:

export PDPRINTER=<printer name>

Save the file.

2.3    Accessing the Default Logical Printer

To specify a 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 display 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 with 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    Listing Logical Printer Attribute Properties

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:

You can request a list of all available 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 Printer Attributes

You can request specific 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

2.6    Setting Default Logical Printer Attributes

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 set 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 to a particular logical printer.

An initial-value-document object is a similar set 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    Setting Default Print Job Attributes

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, job start sheets.

You can also specify initial-value-job objects when you submit a print job.

2.6.2    Setting Default Print Document Attributes

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.

When you submit a print jo, you can also specify initial-value-document objects, such as one that specifies a different number of copies.

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 Attribute File

You can predefine specific attributes in text files called attribute files. You can then include them with a printer command by using the -X option to specify an attribute 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 file, double-sided, and without document sheets:

$ pdpr -X "budget_format.attr" budget99.ps