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.
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 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 submits report.txt and table.txt to the printer named pawprint.
%
pdpr -p pawprint report.txt table.txt
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.
There are several ways to specify more than one attribute in a print request. You can bundle them together inside quotes, following the -x option; you can specify each attribute with its own -x option; or you can store the attributes in an attribute file and specify that file with the -X (capital X) option.
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
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 copies 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 specify a different number of copies of documents in a job, use the copy-count attribute. The following example prints two copies of slides.ps and three copies of handout.ps.
%
pdpr -x copy-count=2 slides.ps -x copy-count=3 handout.ps
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:
%
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 -x sides=2 budget99.txt
The print job goes to the printer that can print two-sided copies. If the printer doesn't have a value for sides-supported, then you cannot use the sides attribute for your job. The printer prints the document according to control instructions inside the document, 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.
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
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 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.
Another way of selecting printing media is to use pdpr 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.
You can specify the output bin for your print job by using pdpr 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
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:
%
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
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
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.
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:
%
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.
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 a job print after 5:00 pm on March 2, 1999, use the following examples:
%
pdpr -x "job-print-after=02:03:1999:17:00:00" budget99.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 budget99.txt pending 0
Then use the pdmod command to specify a new time (like 7 PM), using the job identifier as the command operand.
%
pdmod -x "job-print-after=02:03:1999:19:00:00" dogear_spl:1517
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 like this:
%
pdmod -x "job-retention-period=60" dogear_spl:27
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 budget99.txt 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=28:02:1999:17:00:00" budget99.txt
The printing system supports two kinds of objects that supply an initial set of attributes for jobs and documents:
initial-value-job objects, which contain a set of job attributes that are applied to all documents in a job.
initial-value-document objects, which contain a set of document attributes that are applied to individual documents in a job.
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:
Administrators can apply initial value objects to a logical printer by setting the logical printer's printer-initial-value-job and printer-initial-value-document attributes. Jobs you submit to the logical printer inherit the attributes contained in the initial value object.
You can apply initial value objects to a job or document by specifying them in print requests with the initial-value-job and initial-value-document attributes.
Every site is unique so check with your administrator for details on your installation's use of such objects.
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
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 document called 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
You can predefine specific attributes and initial value objects in a text file and include them in a print command. These attribute files serve as 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 attribute 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 mar98.ps, enter this:
%
pdpr -X monthly.attr mar98.ps
You can use the -N option 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]
To print a file named inventory.txt on the default logical printer and receive an e-mail notice at your end-user@paper-jam.com address after the job has printed, use the following example:
%
pdpr -N email:end-user@paper-jam.com inventory.txt
Specifying -N with the message argument sends notices to a host's
console window, typically dxconsole 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),
and you must give the server host permission to write messages to the notified
host's X server.
Use the
xhost
command to determine
whether the print system server host is listed among those in the xhost list.
If it is not, you can add it with the
xhost +
nodename
command.
For example, if your print system server is running on host dogear, you would enter the following command to allow messages to be sent to your console:
%
xhost +dogear
You can verify that the print server host is added by again entering
the
xhost
command without any arguments.
To print a file named cutbacks.txt and request that a job-completion message be written to the console window on node bulldog, use the following example:
%
pdpr -N message:bulldog cutbacks.txt
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:
Translation filter - a filter that translates one document format to another, typically one supported by a printer. An example of a translation filter is one that translates a file from TIFF to PostScript. The print system automatically invokes a translation filter whenever the document format of your file does not match the native printer language of the target physical printer.
Modification filter - a filter that modifies the document data stream but does not change the document format. One example is a program that inserts line numbers and page headers in a text file. To use a modification filter, you must specify it in the pdpr command.
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 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 examples show how to determine which filters are available for a given logical printer. First, you need to determine which physical printers are associated with the logical printer.
%
pdls -c printer -r printer-associated-printer bulldog
printer-associated-printers --------------------------- bulldog1_pp bulldog2_pp
Use one of the reported physical printer names to request the name of its associated server, a printer supervisor:
%
pdls -c printer -r associated-server bulldog1_pp
associated-server ----------------- dogear_sup
Now you can request the list of filter definitions available to that printer supervisor:
%
$ pdls -c server -r filter-definition dogear_sup
All filters, translation and modification, 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
The text-to-PostScript translation filter 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.
Administrators can set up the filter-definition attribute with command option substitutions that relate print system attributes to translator options. The configuration of the text-to-PostScript translation filter is performed automatically when the server software is set up for the first time.
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 next example, the file c_supprt.c is printed to the default printer with translation-filter list-to-ps performing the translation from text to PostScript.
%
$ pdpr -x translation-filter=list-to-ps c_supprt.c
The text-to-PostScript translation filter provided with Advanced Printing Software offers many formatting options, such as number-up printing, page orientation, page length and width, and settable margins.
When you submit a print job, it is sent to a logical printer that may 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 a pdls command with the printer-associated-printers attribute, as in the following example:
%
pdls -c printer -r "printer-associated-printers" printmore
That command returns a list of all physical printers that are 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, use the following command:
%
pdpr -p printmore \ -x "physical-printers-requested=printer1_pp" emily.ps