Specifications
4-150
Guide to Printers and Printing
Filters
Virtual printer definitions contain predefined and open (undefined) filter attributes. For
example, an AIX Version 4 ASCII queue on an IBM 4029 LaserPrinter offers the following
filter attributes:
• f1, f2, f3, f4, and f5 – open, user–defined filters
• fb – bidi filter for Hebrew/Arabic.
• fc – cifplot filter
• fd – TeX (DVI) filter
• ff – FORTRAN filter
• fg – plot filter
• fl – passthru filter
• fn – ditroff filter
• fp – pr filter
• fv Raster image filter
• fc, fd, ff, fg, fl, fn ,ft, fv – open, user–defined filters
• fp – pr filter
Filters are the first programs in the input data stream processing pipeline set up by the
piobe command that have an opportunity to selectively manipulate the data stream. A
particular filter can be selected from the command line on a per–job basis, or permanently
selected by modifying the virtual printer definition.
The qprt command uses the –f flag to select a particular filter on a per–job basis. The
argument to the –f flag is the second letter of the two letters that name the filter attribute in
the virtual printer definition. For example, to select the pr filter for a job on an ASCII queue
named asc on an IBM 4029 LaserPrinter, you could issue this command:
qprt –Pasc –fp /etc/motd
The filter attribute that selects the pr filter is named fp, so the argument to the – f flag is just
p, the second letter.
To permanently select the pr filter, use the lsvirprt command to edit the virtual printer
definition and set the value of the _f attribute to p. The _f attribute selects a filter that will be
used to pre–process any job submitted to the queue associated with this virtual printer
definition.
Because lp, lpr, and qprt are all just front ends to the enq command, the true entry point to
the spooler, you would suppose that enq must support the –f flag. If you issue the enq
command with the –f flag, however, you will receive an error message; enq does not
support the –f flag. This is a situation where the previously described technique ( Spooler
Data Flow (enq Command) on page 3-10) of mounting /bin/echo over /bin/enq proves
useful.
The root user can issue these commands from a shell prompt:
1. mount /bin/echo /bin/enq
2. qprt –Pasc –fp /etc/motd
3. umount /bin/enq
After the second command is issued, the following appears in the display element defined
by your TERM environment variable: