File conversion

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 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.