Specifications

1-3
Printing Overview
some instances, you might have to submit print jobs one file at a time or concatenate
files before submitting them as a print job. The
primary spooler command is the enq command. Although you can invoke this
command directly to queue a print job, three front–end commands are defined for
submitting a print job: the lp, lpr, and qprt commands. A print request issued by one
of these commands is first passed to the enq program, which then places the
information about the file in the queue for the qdaemon to process. The queue is the
/var/spool/lpd/qdir directory.
If the job is not a file (that is, pipe output of a command to enq), a real file is created
in /var/spool/qdaemon that contains the data to be printed. The information in the
/var/spool/lpd/qdir file points to the file in /var/spool/qdaemon.
printer backend
A collection of programs called by the spoolers qdaemon process to manage a print
job that is queued for printing. The printer backend performs the following functions:
Receives a list of one or more files to be printed from the qdaemon process
Uses printer and formatting attribute values from the database,overridden by flags
entered on the command line
Initializes the printer before printing a file
Runs filters as necessary to convert the print data stream to a format supported by
the printer
Provides filters for simple formatting of ASCII documents
Provides support for printing national language characters
Passes the filtered print data stream to the printer device driver
Generates header and trailer pages
Generates multiple copies
Reports printer error conditions, including out–of–paper and intervention–required
errors
Reports problems detected by the filters
Cleans up after a print job is canceled
Provides a print environment that a system administrator can customize to address
specific printing needs The
mkvirprt command defines a virtual printer to the printer backend. The set of
predefined attributes for the particular type of printer is copied to create a customized
set of attributes. The customized attributes can be listed with the lsvirprt command
and changed with the chvirprt command, with the Web–based System Manager
(type wsm, and then select Devices ), or with SMIT ( Change / Show Print Queue
Characteristics option). Each time the mkvirprt or chvirprt command is used, a
digest utility ( piodigest command)is automatically run to construct a memory image
of the attribute values and lookup tables that are to be read in and used during the
printing process. The
qdaemon command calls the piobe command (the Print Job Manager) and passes
the flag options and the names of one or more files to be printed. The only flag
options not passed are the spooler flag options removed by the enq command,
because the qdaemon command has already opened the printer device and
redirected standard output to the printer. A status file provides communication
between the qdaemon and the backend.
If a header page is needed, the piobe command retrieves a header page pipeline
that generates the header page. The header page pipeline is passed to a shell. In the
pipeline, the standard output from the header page filter becomes the standard input