Specifications

6-20
Guide to Printers and Printing
match output types to input types in this way, thus passing a file through a series of filters,
until the file reaches a printer that accepts it.
Example: HP DeskJet 500
In this example, the user Chris has run a spreadsheet program and has generated a file
containing a copy of a spreadsheet. Chris now wants to print this file using the print service.
You have only HP DeskJet 500 printers on your system. Fortunately, the spreadsheet
application understands how to generate output for several printers, and Chris knows it is
necessary to request output that can be handled by the HP DeskJet 500. When Chris
submits the file for printing, the print service queues it for one of the printers; no filter is
needed.
Example: Tektronix 4014 Output
In this example, the user Marty created a graphic image that can be displayed on a
Tektronix 4014 terminal. Marty now wants to print this image, but all of the printers are
PostScript printers. Fortunately, your system provides a filter called posttek that converts
Tektronix type files to PostScript. Because you set the printer type to PostScript, the print
service recognizes that it can use the posttek filter to convert Marty’s output before printing
it.
Task 2: Handling Special Modes
Filters can handle special printing modes. Each filter you add to the filter table can be
registered to handle special modes and other aspects of printing, such as:
Special modes
Printer type
Character pitch
Line pitch
Page length
Page width
Pages to print
Character set
Form name
Number of copies
A filter is required to handle the special modes and printing of specific pages; the print
service provides a default handling for the rest. However, it may be more efficient to have a
filter handle some of the rest, or it is possible that a filter has to know several of these
aspects to fulfill its other roles properly. A filter may need to know, for example, the page
size and the print spacing if it is going to break up the pages in a file to fit on printed pages.
As another example, some printers can handle multiple copies more efficiently than the print
service, so a filter that can control the printer can use the information about the number of
copies to skip the print service default handling of multiple copies.
Task 3: Detecting Printer Faults
Just as converting a file and handling special printing modes is a printer–specific role, so is
detecting printer faults. The print service attempts to detect faults in general, and for most
printers it can do so correctly. The range of faults that the print service can detect by itself,
however, is limited. It can check for hang–ups (loss of carrier, the signal that indicates the
printer is online) and excessive delays in printing (receipt of an XOFF flow–control character
to shut off the data flow, with no matching XON to turn the flow back on). However, the print
service cannot determine the cause of a fault, so it cannot inform you what to look for.
A well–designed filter can provide better fault coverage. Some printers are able to send a
message to the host describing the reason for a fault. Others indicate a fault by using