Specifications

3-14
Guide to Printers and Printing
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.
As shown in the following figure, the formatter filter is made up of the following 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 fewer 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 base operating system 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 is 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 run time,
pioformat dynamically loads, links, and drives the device–dependent formatter. The
following figure depicts this relationship.
Figure 3. The Formatter Filter
The pioformat command expects to be able to call, if necessary, five subroutines;
pioformat by itself does not contain these subroutines. The subroutines exist in the
device–dependent formatter and are supplied to pioformat at runtime when the loading and
linking of the device–dependent formatter by pioformat occurs.