User`s guide
3-15
Spooler Overview
Virtual Printers and Formatter Filters
When the spooler queue backend is piobe, the formatter filter is normally the next–to–last
process in the pipeline of filters processing the print job. The formatter filter is composed of
two pieces of code.
A formatter filter provides the capability of either formatting the input print file or passing it
through unmodified, based on an input parameter. Even if the formatter passes the input file
unmodified, it still sends printer commands to initialize the printer before the input file is
printed and restores the printer after printing is complete.
The formatter filter is made up of two components:
• A device–independent formatter driver
• A device–dependent formatter
The first is the device–independent formatter driver, pioformat. The second is a
device–dependent formatter, of which there are less than 20. Code is device–independent
when its execution is in no way dependent upon specific hardware, such as a certain
physical printer. Similarly, code is device–dependent when its execution is dependent upon
specific hardware, again such as a certain printer. In the AIX spooler’s formatter filter, it is
the device–dependent formatter that contains code designed to handle all of the properties
of a particular physical printer or class of printers, including supported data stream, escape
sequences, and control codes unique to that printer or printer class.
The device–independent pioformat is called a formatter driver because that it precisely
what it does. When pioformat is set into execution, it expects several arguments. One of
these arguments is the full path name to a device–dependent formatter. At runtime,
pioformat dynamically loads, links, and drives the device–dependent formatter. The
Formatter Filter figure, on page 3-15 depicts this relationship.
Formatter Driver Formatter
(Device Independent) (Device Dependent)
pioformat
Formatter from
/usr/lib/lpd/pio/fmtrs
Load/Link the Formatter
setup ()
initialize
passthru()
OR
lineout()
restore()
(Housekeeping)
(Initialize Printer)
(Pass-Through)
OR
(Line-by-Line)
(Restore Printer)
piogetvals()
piogetopt()
piocmdout()
piogetstr()
piomsgout()
pioexit()
(Database Values)
(Flag Processing)
(Command Output)
(Get Database String)
(Message Output)
(Formatter Error Exit)
Digested
Config
Database
Formatter Filter