3    Printing Your Job

This chapter explains how to submit jobs to a printer and how to specify characteristics for printed output by using attributes. For a detailed explanation of attributes and summaries of all available attributes, see Appendix A.

3.1    Submitting a Print Job

Use the pdpr command to print a job. For example, the following command submits a document file called report.txt to the default printer:

$ pdpr report.txt

The following command line sends three files to the default printer by using a space to separate the file names:

$ pdpr report.txt table.txt chart.ps

To indicate a specific printer, use the -p option and its printer_name argument. Always place the options and arguments before the document file names they apply to.

The following command line submits report.txt and table.txt to the printer named pawprint:

$ pdpr -p pawprint report.txt table.txt

3.2    Specifying Job Attributes

You can specify different characteristics for each job and document by using attributes. Enter a value for an attribute by using the -x option. For example, to print a two-sided copy of budget99.txt, enter the following:

$ pdpr -x "sides=2" budget99.txt

Note

In some examples, quotation marks are shown around single attributes. However, quotation marks must surround multiple attributes or an attribute value containing spaces.

To specify more than one attribute in a print request:

The following commands are equivalent:

$ pdpr -x "sides=2 job-comment='After the takeover'" budget99.txt

$ pdpr -x sides=2 \
-x job-comment="'After the takeover'" budget99.txt

3.2.1    Setting Print Job Priority

You can set the job priority of a new print job or you can change the priority of a print job that has been submitted.

To set the priority of new print job, new_job.txt to 20, use the pdpr command with the job-priority attribute, as shown in the following example:

$ pdpr -x job-priority=20 new_job.txt
 
 

To change the priority of a print job that has been submitted, first use the pdq command to get the job identification number. Then, use the pdmod command with the job-priority attribute to change the job's priority. For example, to change the priority of an existing print job identified as 0102 to a priority of 25, enter the following:

$ pdq
job-identifier  job-name     current-job-state intervening-jobs
--------------  --------     ----------------- ----------------
dogear_spl:0102 budget02.txt pending           0
% pdmod -x job-priority=25 dogear_spl:0102
 
 

3.2.2    Specifying the Number of Copies

You can print multiple copies of individual documents or of an entire job. To specify the number of copies in a job, use the pdpr command with the job-copies attribute or with the -n option. The system prints one copy by default.

To print two copies of budget99.txt and inventory99.txt on the default logical printer, use either of the following examples:

$ pdpr -x "job-copies=2" budget99.txt inventory99.txt
 
$ pdpr -n 2 budget99.txt inventory99.txt

To print a different number of copies for each document in a job, use the copy-count attribute. The following example prints two copies of the file slides.ps and three copies of the file handout.ps.

$ pdpr -x copy-count=2 slides.ps -x copy-count=3 handout.ps

3.2.3    Specifying Two-Sided Printing

If your environment includes printers that can print on both sides of a sheet of paper, you can specify one-sided or two-sided printing with the sides attribute.

To determine which printers offer two-sided printing, use the following pdls command line:

$ pdls -c printer -r "printer-name sides-supported" 
printer-name  sides-supported
------------  ---------------
bulldog       1
              2
boxer         1

The output shows that the only the first printer supports two-sided printing. To print a two-sided copy of the file budget99.txt, enter the following:

$ pdpr -p bulldog -x sides=2 budget99.txt

If the printer does not have a value for sides-supported, you cannot use the sides attribute for your job. The printer prints the document according to control instructions within the document file, or according to the default sides value set on the printer device front panel.

Some documents, particularly those created by PC-based applications, include printer instructions that force them to print as one-sided or two-sided, regardless of how you specify the print command.

3.2.4    Specifying the Document Format

The print system can print jobs in document formats such as text, PCL, and PostScript. When you submit a print job, you usually do not need to specify a document format. The print system determines the format by inspecting a small portion of each document.

There may be instances where the print system cannot determine the document format and the result may be unacceptable. In this case, you should specify the format with the document-format attribute.

To print a file called review on the default logical printer and specify PCL as the document format, enter:

$ pdpr -x "document-format=PCL" review

3.2.5    Specifying Media

In some print environments, media types are associated with input trays by the operator or administrator who assigns values to the input-trays-medium attribute. If this is the case, you can select a medium for printing by using the default-medium attribute. You can ask your administrator for the specifics of your configuration, or you can use the pdls command with the media-supported attribute. For example, to determine what media is supported for logical printer bulldog, enter:

$ pdls -c printer -r media-supported bulldog

If the command reports nothing, then you need to specify an input tray to select media.

Before you submit a job, you should first determine if the input-trays-medium attribute is defined on the physical printer. For example, if your physical printer is bulldog1_pp, then you can enter the following command line to view the input-trays-medium attribute:

$ pdls -c printer -r input-trays-medium bulldog1_pp

To submit a file called mailer to printer bulldog and specify monarch-envelope as the medium to use, enter:

$ pdpr -p bulldog -x "default-medium=monarch-envelope" mailer

If the document contains tray-selection operators that override the printer default settings, then unexpected media selection can occur.

3.2.6    Specifying Input Trays

Another way of selecting printing media is to use the pdpr command with the default-input-tray attribute. First, determine the input trays supported by your printer, as in the following example:

$ pdls -c printer -r input-trays-supported pawprint
input-trays-supported
---------------------
top
bottom
large-capacity

To print the file called cad23.ps on the printer pawprint using the bottom input tray, enter:

$ pdpr -p pawprint -x "default-input-tray=bottom" cad23.ps
 
 

If the document contains tray-selection operators that override the printer default settings, then unexpected media selection can occur.

3.2.7    Specifying Output Bins

You can specify the output bin for your print job by using the pdpr command with the output-bin attribute.

First, determine the output bins available for your printer as in the following example:

$ pdls -c printer -r output-bins-supported bulldog
output-bins-supported
---------------------
top
side

To print the file budget99.txt and place it in the side output bin, enter:

$ pdpr -x output-bin=side budget99.txt

3.2.8    Specifying Finishing Processes

Some printers offer advanced hardware options that perform finishing operations, such as trimming, binding, and stapling. To determine if any printers support finishing operations, use the following command line:

$ pdls -c printer -r "finishings-supported"

To print a job using a finishing process, include the finishing attribute in the pdpr command. For example, to print a saddle-stitched copy of budget99.txt, enter:

$ pdpr -x "finishing=saddle-stitch" budget99.txt

3.2.9    Printing from Standard Input

You can print jobs that originate from standard system utilities by using the shell's pipe capability. For example, to print a listing of files in your current directory, you can pipe the output of the ls command directly to your default printer:

% ls -l | pdpr

3.3    Specifying Job Scheduling Attributes

When you submit a print job, it is scheduled on a first in/first-out basis. Resource checking ensures that jobs are delivered only to printers that can print the job.

In some instances, you might want to submit a job with instructions to print at a later date. For example, you might want to schedule a long job to print after hours. You might also want to set a retention period for the job so you can check its status after you return to work.

The following sections explain job scheduling attributes that allow you to control when jobs are printed and how long they are retained.

3.3.1    Holding a Print Job

The job-hold attribute specifies whether a print job is to be printed or put on hold. The default value is no (do not hold).

If you have submitted a job and it is still waiting in its print queue, you can use the pdmod command to set its job-hold attribute to yes to put it on hold. The spooler server then prevents the job from printing. Other jobs submitted to the same printer (but not on hold) will continue to be scheduled normally. The held job will remain unprinted until you set the job-hold attribute to no or until the time specified by job-discard-time arrives.

The following example uses the pdmod command to put job dogear_spl:1027 on hold:

$ pdmod -x "job-hold=yes" dogear_spl:1027

At a later time, you can send the job to print with the following command line:

$ pdmod -x "job-hold=no" dogear_spl:1027

Note

You can use the pdpause and pdresume commands independently of the value of the job-hold attribute.

3.3.2    Printing a Job After a Specific Time

The job-print-after attribute specifies the calendar date and time after which the job can be scheduled for printing. You may enter values in the format dd:mm:yyyy:HH:MM:SS.

To specify that the file budget02.txtprint after 5:00 p.m. on March 23, 2002, use the following examples:

$ pdpr -x "job-print-after=23:03:2002:17:00:00" budget02.txt

If the job has not yet started to print, you can change the time after which it will print. First, use the pdq command to obtain the job identifier.

$ pdq
job-identifier  job-name     current-job-state intervening-jobs
--------------  --------     ----------------- ----------------
dogear_spl:1517 budget02.txt pending           0

Then use the pdmod command to specify a new time (like 7:00 p.m.), using the job identifier as the command operand.

$ pdmod -x "job-print-after=02:03:2002:19:00:00" dogear_spl:1517

3.3.3    Retaining a Print Job

Print jobs can be retained by the print system after they print or complete with errors. This is useful if you need to print extra copies after a job is complete or if the job does not print correctly. The job-retention-period attribute specifies the period of time following completion of a job that the print system retains the job, its attributes, and its data. By setting this attribute, you can obtain status information after a job has printed and also resubmit the print job.

The job-retention-period attribute specifies a lower boundary on how long the print system retains a job, its attributes, and data. The job-discard-time specifies an upper boundary for retention, regardless of whether the job has printed. Use the format [HH:]MM[:SS] for the time value.

For example, to specify that the job dogear_spl:27 be retained for 60 minutes after printing, use the pdmod command line:

$ pdmod -x "job-retention-period=60" dogear_spl:27

3.3.4    Automatically Discarding a Print Job

The job-discard-time attribute specifies the calendar date and time of day at which a print job should be discarded, regardless of whether it has printed.

This attribute specifies an upper boundary for retention, regardless of whether the job has printed. The job-retention-period attribute specifies a lower boundary on how long a job, its attributes, and data are retained. Use the format dd:mm:yyyy:HH:MM:SS for the time value.

To specify that the print job for the budget99.txt file should be deleted if it does not print by 5:00 p.m. on February 2, 1999, submit it as follows:

% pdpr -x "job-discard-time=02:02:1999:17:00:00" budget99.txt

3.4    Specifying Default Attributes for Jobs and Documents

The printing system supports two kinds of objects that supply an initial set of attributes for jobs and documents:

Initial-value objects make it easy for you to apply commonly-used sets of job and document attributes to your print jobs. Your administrator can create as many initial value objects as necessary. In addition, it is easy to modify the attributes and values they contain.

Initial value objects can be used in two ways:

Only administrators can create or modify initial value objects. If you need to create a a colletion of job and document attributes, refer to Section 3.4.3.

Every site is unique. Check with your administrator for details on your installation's use of such objects.

3.4.1    Setting Default Print Job Attributes

The following example demonstrates how an initial-value-job object might be used.

Your administrator uses the printer-initial-value-job attribute to apply default job settings to your default logical printer. One of those settings is the job-sheets=job-copy-start attribute. Consequently, all jobs sent to that logical printer include job start sheets.

You, however, prefer to have start sheets, end sheets, and document sheets printed with certain jobs. Your administrator created an initial-value-job object called ivj_full_sheets for this purpose. It contains the job-sheets=job-copy-wrap and document-sheets=doc-set-start-copy-separate attributes.

To send the file quote.txt to the default printer and apply ivj_full_sheets to your print request, enter:

$ pdpr -x initial-value-job=ivj_full_sheets quote.txt

3.4.2    Setting Default Print Document Attributes

The example below shows how an initial-value-document object might be used.

Your administrator uses a printer-initial-value-document attribute to apply document defaults to a logical printer. One of those defaults is the sides=1 attribute. As a result, all documents submitted to that logical printer are printed one sided.

You, however, occasionally need to print text documents two-sided and two page images per sheet side. To meet this need, your administrator created an initial-value-document object called ivd_2x2. It contains the sides=2 and number-up=2 attributes.

To send the file quote.txt to the logical printer called bulldog and apply initial values in ivd_2x2 to your print request, enter:

$ pdpr -x initial-value-document=ivd_2x2 -p bulldog quote.txt

3.4.3    Using an Attribute File

You can predefine specific attributes and initial value objects in a text file and include them with a print command. These attributes files are a convenient way to store and retrieve frequently used combinations of printing attributes and values, making it easier to express complex commands reliably. Refer to the Advanced Printing Software Command Reference Guide for more information.

For example, if you need to print five copies of a monthly report for a staff meeting and print them two sided on a printer named pawprint, then create and use the following attributes file, monthly.attr:

job-comment="wonderful monthly report"
document-format=PostScript
job-copies=5
sides=2
printer-requested=pawprint

Use the -X option to specify the attributes file. For example, if your report file is mar02.ps, enter this:

$ pdpr -X monthly.attr mar02.ps

3.5    Requesting Notification of Job Status

You can use the -Noption with the pdpr command to request notification when your job has completed printing. Notification can be via e-mail or a message written to the console window.

Valid values for the -N option are:

email[:address]

message[:address]

3.5.1    Requesting E-mail Notification

To print file inventory.txt on the default logical printer and receive an e-mail notice at your jane.doe@abc.com address after the job has printed, enter:

$ pdpr -N email:jane.doe@abc.com inventory.txt

The default value for an email address is <your username>@<your DNS domain> .

3.5.2    Requesting Console Message Notification

Specify the -N option with the message argument to send a notice to a host's console window, typically the dxconsole console in the CDE, Motif, or X Window environment. Before you can use the message method for notification, you must be running the Console Notification Daemon (/usr/pd/lib/pdconntf).

To print the file cutbacks.txt and request that a job-completion message be written to the console window on node bulldog, enter:

$ pdpr -N message:bulldog cutbacks.txt

The default address for console messages is the client hostname.

3.6    Using Preprocessor Filters

Document data frequently needs translation or modification before printing. For example, to print a simple text file on a PostScript printer, the text needs to be translated to PostScript using preprocessor filter programs. The print system supports the following kinds of filter programs:

Your system administrator can set up filters that use common UNIX utilities that read from standard input and write to standard output. The Advanced Printing Software includes a text-to-PostScript translation filter that performs the task of translating text files into the PostScript language. With help from your administrator, you can create or obtain other preprocessor filters.

Your system administrator uses the filter-definition attribute to configure preprocessing filters for the print supervisor servers. You can obtain a list of configured filters if you know the name of the supervisor server that controls the physical printers you use.

The following example show how to determine which filters are available for a given logical printer.

Translation and modification filters are displayed.

You can request that a filter be applied to documents you print by specifying the modification-filter attribute for a modification filter, or the translation-filter attribute to select a translation filter.

In the following example, the file c_supprt.c is printed on the default printer with a modification filter named listing.

$ pdpr -x modification-filter=listing c_supprt.c

3.6.1    Translating Text Files to PostScript

The text-to-PostScript translation filter (/usr/pd/bin/trn_textps) translates simple-text documents to PostScript. This filter executes whenever you send a simple text document to a printer that supports only the PostScript language.

The text-to-PostScript translation filter provided with Advanced Printing Software offers formatting options, such as number-up printing, page orientation, page length and width, and adjustable margins.

Administrators can set up the filter-definition attribute with command option substitutions that relate job and document attributes to translator options. The configuration of the text-to-PostScript translation filter is performed automatically when the administrator uses pd_get_started to setup a supervisor server..

Although translation filters are automatically applied, you can specify particular translation filters if more than one of a given type is configured on your server.

In the following example, the text file c_supprt.c is printed on the default PostScript-capable printer with the built-in text-to-PostScript filter. The supervisor filter detects that a translation filter is required to convert the text to PostScript.

$ pdpr c_supprt.c

In the following example, the file c_supprt.c is printed on the default printer with the translation-filter list-to-ps.

$ pdpr -x translation-filter=list-to-ps c_supprt.c

3.7    Printing to a Specific Physical Printer

When you submit a print job, it is sent to a logical printer that might be associated with several physical printers. The spooler schedules the request to an available physical printer most suited to the needs of the job. You can, however, send a job to a specific physical printer by using the physical-printers-requested attribute.

You can determine the names of physical printers supported by a logical printer by using the pdls command with the printer-associated-printers attribute, as in the following example:

$ pdls -c printer -r "printer-associated-printers" printmore

This command line returns a list of all physical printers associated with the logical printer printmore. To print your job on one of those physical printers, you must also specify the logical printer, either implicitly with the PDPRINTER environment variable, or explicitly with the -p option.

For example, to submit the file emily.ps to the physical printer printer1_pp that is associated with logical printer printmore, enter:

$ pdpr -p printmore \
-x "physical-printers-requested=printer1_pp" emily.ps