Specifications

6-19
System V Printer Configuration
Providing Filters
A filter is a program that you can use for the following purposes:
To convert a user file from one data format to another so that it can be printed correctly
on a given printer
To handle the special modes of printing that users may request with the –y option to the
lp command (such as two–sided printing, landscape printing, draft or letter–quality
printing)
To detect printer faults and notify the print service of them, so that the print service can
alert you
Not every filter can perform all three tasks. Given the printer–specific nature of these roles,
the print service has been designed so that these roles can be implemented separately. This
separation allows you or a printer manufacturer (or another source) to provide filters without
having to change the print service.
A default filter is provided with the print service to provide simple printer fault detection. It
does not convert files or handle any of the special modes. It may, however, be adequate for
your needs.
You can use the print service to manage the use of filters as described in the following
topics:
Defining a Filter on page 6-21
Adding a Filter to the Print Service on page 6-27
Removing a Filter on page 6-27
Examining a Filter on page 6-27
Restoring Factory Defaults for Filters on page 6-27
Note: Adding, changing, or removing filters can cause print requests that are still
queued to be canceled. This is because the print service evaluates all print requests still
queued to see which are affected by the filter change. Requests that are no longer
printable, because a filter has been removed or changed, are canceled (with notifications
sent to the users who submitted them). There can also be delays in the responses to
new or changed print requests when filters are changed, due to the many characteristics
that must be evaluated for each print request still queued. These delays can become
noticeable if there is a large number of requests that need to be filtered.
Because of this possible impact, make alterations to filters during periods when the print
service is idle.
Task 1: Converting Files
For each printer (local or remote), you can specify what file content types it can print. When
a user submits a file to print on any printer and specifies its content type, the print service
finds a printer that can handle files of that content type. Because many applications can
generate files for various printers, this is often sufficient. However, some applications
generate files that cannot be printed on your printers.
By defining and creating a filter that converts such files into a type that your printers can
handle, you can support more applications in the print service. (The print service provides a
few filters for converting various types of files into PostScript.) For each filter you add to the
system, you must specify one or more types of input it can accept and the type of output it
can produce (usually only one).
When a user specifies (by executing lp –T) a file content type that no printer can handle, the
print service tries to find a filter that can convert the file into an acceptable type. If the file to
be printed is passed through a filter, the print service then matches the output type of that
filter with a printer type or the input type of another filter. The print service continues to