[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4


qprt Command

Purpose

Starts a print job.

Syntax

qprt [ -a PreviewOption ] [ -A Level ] [ -b BottomMargin ] [ -B Value ] [ -c ] [ -C ] [ -d InputDataType ] [ -D "User" ] [ -e EmphasizedOpt ] [ -E DblHigh ] [ -f Filter ] [ -F Name ] [ -g Begin ] [ -G Coord ] [ -h "Header" ] [ -H "HostName" ] [ -i Indent ] [ -I FontPath ] [ -j Init ] [ -J Restore ] [ -k Color ] [ -K Condense ] [ -l Length ] [ -L LineWrap ] [ -m Message ] [ -M MessageFile ] [ -n ] [ -N NumberCopies ] [ -O PaperHand ] [ -p Pitch ] [ -P Queue [ :QueueDevice ] ] [ -Q Value] [ -q Quality ] [ -r ] [ -R Priority ] [ -s NameType ] [ -S Speed ] [ -t TopMargin ] [ -T "Title" ] [ -u PaperSrc ] [ -U Directional ] [ -v LinesPerIn ] [ -V Vertical ] [ -w PageWidth ] [ -W DblWide ] [ -x LineFeed ] [ -X CodePage ] [ -y DblStrike ] [ -Y Duplex ] [ -z Rotate ] [ -Z FormFeed ] [ -# { j | H | v } ] [ -= OutputBin ]{ File | - } ...

Description

The qprt command creates and queues a print job to print the file specified by the File parameter. To print a file from standard input, specify a - (dash) instead of a file name. If you specify multiple files, then they all together make up one print job. The qprt command prints the files in the order you specify them.

To print a file, you must have read access to it. Using the -r flag you can remove a file after printing it. To remove a file, you must have write access to the directory that contains it. If you want the qprt command to notify you when a print job completes, specify the -n flag.

You can use the -B flag in conjunction with the -D, -H, and -T flags to customize burst pages. Burst pages mark the beginning, end, or both of a print job. To mark the beginning and end of a print job with burst pages, use the -B aa flag.

All flags are optional and you can specify them in any order. The qprt command ignores spaces between a flag and its argument. You can group flags without arguments after a single - (dash). All flags and their arguments must precede the File parameter.

You can use the Printer Queues application in Web-based System Manager (wsm) to change printer characteristics.

You could also use the System Management Interface Tool (SMIT) smit qprt fast path to run this command.

Some of the flags and arguments listed in this command are invalid for particular printer types. If you experience problems using an option, you can use SMIT to preview a qprt command statement. See the "System Management Interface Tool (SMIT): Overview" in AIX 5L Version 5.1 System Management Guide: Operating System and Devices. Alternatively, consult your printer manual to find out what options your printer supports.

Flags


-#{j|h|v} Specifies a special functionality. The possible values for the Value variable are:

j
Displays a job number for the specified print job.

H
Queues the print job but holds it in a HELD state.

v
Validates the specified printer backend flag values. As part of the validation process, the command performs legality checking for illegal flag values, type checking, range checking, list checking, and other types of validation. Typically, the validation of backend flag values is useful because illegal flags are identified when the print job is submitted rather than at a later stage when the print job is processed.
-= OutputBin Specifies the output bin destination for a print job. If you do not specify this flag, it uses the default value from the printer driver. This flag applies to AIX 4.2 or later.

The possible values for OutputBin are:

0
Top printer bin.

1 - 49
High Capacity Output (HCO) bins 1 - 49.

>49
Printer specific output bins.

Note: Valid output bins are printer dependent.
-a PreviewOption Previews parameter values for a print job without actually printing any files. You can specify a 0 or a 1 for the PreviewOption variable. If you specify 0, the qprt command preview displays normal print processing. If you specify a 1, the command returns a list of the flag values and the filter pipeline that would be used to convert the input data type to the data type expected by the printer. These flag values are the default command line flag values from the configuration database, overridden by any flag parameters specified on the command line.

Only flags that are valid for the InputDataType variable specified (or defaulted) for the -d flag are shown. Flag values related only to the spooling of your print job, instead of the actual printing, are not shown. The default values for the spooling flags are included with the flag descriptions. The flag values are not checked to verify that they are supported by the printer.

The pipeline of filters shows the filter commands (and the flag values passed to the filter commands) that would process the data from your print files before it is sent to the printer. You can review the description for each of the filter commands to determine the type of filtering that is performed.

-A Level Sets the level of diagnostic output. Diagnostic output is useful for diagnosing errors encountered by a filter pipeline that is processing a print file, a header page, or a trailer page. Diagnostic output is mailed to the user who submitted the print job. You can specify one of the following levels:

0
Discards any standard error output produced.

1
Returns flag values, the standard error output, and the complete pipeline that produced any standard error output.

2
Returns the flag values, standard error output (if any), and complete pipelines, regardless of whether an error is detected. If an error is detected, the print job is terminated.

3
Similar to a value of 2, except that the file is not printed.

A value of 1 is recommended. A value of 0 is useful if a filter in a pipeline produces output to standard error, even if no error is encountered (for example, status information). A value of 2 or 3 is useful for diagnosing a problem, even if the problem does not cause any output to standard error.

-b BottomMargin Specifies the bottom margin, the number of blank lines to be left at the bottom of each page.
-B Value Prints burst pages. The Value variable consists of a two-character string. The first character applies to header pages. The second character applies to trailer pages. The following values are valid:

a
Always print the (header or trailer) page for each file in each print job.

n
Never print the (header or trailer) page.

g
Print the (header or trailer) page once for each print job (group of files).

For example, the -B ga flag prints a header page at the beginning of each print job and a trailer page after each file in each print job.

Note: In a remote print environment, the default is determined by the remote queue on the server.
-c Copies each print file and prints from the copy. Specify this flag if you plan to modify the print file or files after the qprt command is issued, but before the print job completes.

If this flag is not specified and the print job is printed on the same node where it was submitted, copies of the print file or files are not made. Printing occurs directly from the file or files you specified with the File parameter.

-C Mails messages generated by your print job to you, even if you are logged in. By default, the qprt command displays messages on the console.

The -C flag only applies to local print jobs. If you want to be notified when a job sent to a remote printer is completed, use the -n flag to receive a mail message.

Note: You cannot redirect certain messages from the qdaemon and the printer backend in any way. They are sent directly to the /dev/console file.
-d InputDataType Identifies the input data type of the file or files to print. Based on the input data type and the data type expected by the printer, the print files are passed through filters (if necessary) before being sent to the printer. You can specify any of the following input data types:

a
Extended ASCII

c
PCL

d
Diablo 630

g
Hewlett-Packard GL

p
Pass-through (sent to printer unmodified)

s
PostScript

If the printer you select does not support the specified input data type, and if filters are not available to convert the data type of your print file or files to a data type supported by the printer, the print job terminates with an error message.

-D "User" Labels the output for delivery to User. Normally the output is labeled for delivery to the user name of the person issuing the qprt command request. The value of User must be a single word meeting the same requirements of a regular user ID.
-e EmphasizedOpt Sets emphasized print to one of the following:

+
Use emphasized print.

!
Do not use emphasized print.
-E DblHigh Sets double-high print to one of the following:

+
Use double-high print.

!
Do not use double-high print.
-f Filter Identifies the filter to pass your print files through before sending them to the printer. The identifiers are similar to the filter flags available with the lpr command. The available filter identifiers are p, which invokes the pr filter, and n, which processes output from the troff command.
-F Name Specifies the list of X font files containing the image of characters to be used for printing. Items in the list must be separated by commas. The Name parameter value can be full path names, font alias names, or XLFD names. The -F Name flag is effective only for MBCS printer queues.
-g Begin Sets the page number to begin printing. This flag is recognized only if the print files are to be formatted (for example, with the -d a flag). It is not recognized for pass-through (the -d p flag), PostScript (the -d s flag), and other types of data that are already formatted.
-G Coord Indicates how to print pages on laser printers that cannot print to the edge of the paper. Use one of the following for the Coordinate variable:

+
Whole page coordinate system

!
Print page coordinate system
-h "Header" Specifies the header text for use by the pr command when the -f p flag is also specified. If this flag is not specified, the pr command uses the print file name as the header.

This flag is useful if you also specified the -c flag. With the -c flag, the print file name used by the pr command as the default header is the name of a temporary file generated by the spooler, instead of the file name you specified with the qprt command.

-H "HostName" Sets the host name on the header page.
-i Indent Indents each line the specified number of spaces. You must include the Indent variable in the page width specified by the -w flag.
-I FontID (uppercase i) Specifies a font identifier. Specifying a font identifier overrides the pitch (the -p flag) and type style (the -s flag). The -IFontID command is effective for single byte code set print queues only.
-IFontPath (uppercase i) Specifies the comma-separated list of font paths required for the -F flag when the font files are designated with a font alias name or an XLFD name. The FontPath flag is effective only for MBCS printer queues.
-j Init Initializes the printer before each file is printed. You can specify any of the following:

0
No initialization

1
Full initialization

2
Emulator selection only
-J Restore Restores the printer at the end of the print job. You can specify one of the following:

+
Restore at the end of the print job.

!
Do not restore at the end of the print job.
-k Color Specifies the print color. Typical values are black, red, blue, green, and so on. Consult your printer manual for colors supported and the ribbon position assigned to a particular color.
-K Condense Sets condensed print to one of the following:

+
Use condensed print.

!
Do not use condensed print.
-l Length (lowercase L) Sets the page length. If the Length variable is 0, page length is ignored, and the output treated as one continuous page. The page length includes the top and bottom margins and indicates the printable length of the paper.
-L LineWrap Sets line wrap for lines wider than the page width to one of the following:

+
Wrap long lines to the next line.

!
Truncate long lines at the right margin.
-m "Message" Displays the specified message on the console when the print job is assigned a printer and is ready to begin printing. The print job does not proceed until the message is acknowledged at the console.
-M MessageFile Identifies a file containing message text. This text is displayed on the console when the print job is assigned a printer and is ready to begin printing. The print job does not proceed until the message is acknowledged at the console.
-n Notifies you when the print job completes. If the -D "User" flag is also specified, the specified user is notified as well. By default, you are not notified when the print job completes.
-N NumberCopies Specifies the number of copies to print. If this flag is not specified, one copy is printed.
-O PaperHand Sets the type of input paper handling to one of the following:

1
Manual (insert one sheet at a time)

2
Continuous forms

3
Sheet feed
-p Pitch Sets the number of characters per inch. Typical values for Pitch are 10 and 12. The actual pitch of the characters printed is also affected by the values for the -K (condensed) flag and the -W (double-wide) flag.

If you are printing an ASCII file on a PostScript printer, this flag determines the character point size. You can specify positive numbers greater than or equal to 1.

-P Queue[:QueueDevice] Specifies the print queue name and the optional queue device name. If this flag is not specified, the following conditions occur:
  • If the LPDEST environment variable is set, the qprt command uses the queue name specified by the LPDEST variable. If set, this value is always used, even if the PRINTER variable is also set.
  • If the PRINTER variable is set and no LPDEST variable is set, the qprt command uses the queue name specified by the PRINTER environment variable. Any destination command-line options override both the LPDEST and PRINTER environment variables.
  • If neither the LPDEST nor the PRINTER variable is set, the qprt command uses the system default queue name. (The system default queue name is the name of the first queue defined in the /etc/qconfig file.) If the QueueDevice variable is not specified, the first available printer configured for the queue is used.

    Note: If multiple printers are configured for the same print queue and one or more of the printers is not suitable for printing your files, you should use the QueueDevice variable. Otherwise, the spooler assigns the first available printer.
-q Quality Sets the print quality to one of the following:

0
Fast font

1
Draft quality

2
Near letter quality

3
Enhanced quality

300
300 dots per inch (dpi)

600
600 dpi
-Q Value Sets the paper size. The Value for paper size is printer-dependent. Typical values are: 1 for letter-size paper, 2 for legal, and so on. Consult your printer manual for the values assigned to specific paper sizes.
-r Removes the print files after the print job completes. If this flag is not specified, the print files are not removed.
-R Priority Sets the priority for the print job. Higher values for the Priority variable indicate a higher priority for the print job. The default priority value is 15. The maximum priority value is 20 for most users and 30 for users with root user privilege and members of the system group (group 0).

Note: You cannot use this flag when requesting remote print jobs.
-s NameType Specifies a type style with the NameType variable. Examples are courier and prestige. The particular type style choices differ depending on the printer type.
-S Speed Sets high-speed printing to one of the following:

+
Use high-speed printing.

!
Do not use high-speed printing.
-t TopMargin Sets the top margin, the number of blank lines left at the top of each page.
-T "Title" Specifies a print job title with the Text variable. If this flag is not specified, the first file name on the qprt command line is used as the print job title. The print job title is displayed on the header page and on responses to inquiries about queue status.
-u PaperSrc Sets the paper source to one of the following:

1
Primary

2
Alternate

3
Envelopes
-U Directional Sets unidirectional printing to one of the following:

+
Use unidirectional printing.

!
Do not use unidirectional printing.
-v LinesPerIn Sets the line density to a number of lines per inch. Typical values for the LinesPerIn variable are 6 and 8.
-V Vertical Sets vertical printing to one of the following:

+
Use vertical printing.

!
Do not use vertical printing.
-w PageWidth Sets the page width in number of characters. The page width must include the number of indention spaces specified with the -i flag.
-W DblWide Sets double-wide print to one of the following:

+
Use double-wide print.

!
Do not use double-wide print.
-x LineFeed Specifies automatic line feed or automatic carriage return:

0
Do not change line feeds, vertical tabs, and carriage returns.

1
Add a line feed for each carriage return.

2
Add a carriage return for each line feed and each vertical tab.
-X CodePage Provides the code page name. Valid values for the CodePage variable are 850, IBM-850, and ISO8859-1 through ISO8859-9, IBM-943, IBM-eucJP, IBM-eucKR, and IBM-eucTW. The code page in the user's locale definition is the default.
-y DblStrike Sets double-strike print to one of the following:

+
Use double-strike print.

!
Do not use double-strike print.
-Y Duplex Sets duplexed output. Duplexed output uses both the front and back of each sheet of paper for printing. You can set one of the following:

0
Simplex

1
Duplex, long edge binding

2
Duplex, short edge binding
-z Rotate Rotates page printer output the number of quarter-turns clockwise as specified by the Value variable. The length (-l) and width (-w) values are automatically adjusted accordingly.

0
Portrait

1
Landscape right

2
Portrait upside-down

3
Landscape left
-Z FormFeed Sends a form feed to the printer after each print file. You can specify either of the following:

+
Send a form feed command.

!
Do not send a form feed command to the printer. Use this option carefully since it can result in the next print job beginning on the last output page generated by this print job. Printers printing on continuous forms cannot determine the top of the form for subsequent pages.

Examples

  1. To queue the myfile file to print on the first available printer configured for the default print queue using the default values, enter:

    qprt myfile
    
  2. To queue a file on a specific queue, to print the file without using nondefault flag values, and to validate the flag values at the time of the print job submission, enter:
    qprt -f p -e + -P fastest -r -n -C -#v somefile
    This command line passes the somefile file through the pr command (the -f p flag) and prints it using emphasized mode (the -e + flag) on the first available printer configured for the queue named fastest (the -P fastest flag). The -#v flag verifies that all flags associated with this command are valid before passing the print job to the printer backend. After the file is printed, it is removed (the -r flag), and the user who submitted the print job is notified (the -n flag) by mail (the -C flag) that the print job completed.
  3. To print myfile on legal size paper, enter:


    qprt -Q2 myfile

  4. To enqueue the myfile file and return the job number, enter:

    qprt -#j myfile
    
  5. To queue MyFile and hold it, enter:

    qprt -#H MyFile
    

Files


/etc/qconfig Contains the queue and queue device configuration file.
/usr/bin/qprt Contains the qprt command.

Related Information

The enq command, lp command, lpr command,pr command, qadm command, qcan command, qchk command, qpri command,smit command, troff command.

The /etc/qconfig file.

Printer Overview for System Management, Spooler Overview for System Management, Printer Specific Information, Virtual Printer Definitions and Attributes, Initial Printer Configuration, Starting a Print Job (qprt Command) in AIX 5L Version 5.1 Guide to Printers and Printing.

How to Print from a Remote System and How to Print to a Remote System in AIX 5L Version 5.1 System User's Guide: Communications and Networks.

For information on installing the Web-based System Manager, see Chapter 2: Installation and System Requirements in AIX 5L Version 5.1 Web-based System Manager Administration Guide.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]