Document Filter requirements
Author Jan Holesovsky <kendy@suse.cz>
Id $Id: spec_filter.html,v 1.1.1.1 2002/06/27 08:53:19 jsrain Exp $

Introduction

Printing is processed via spooling utility, commonly lpd. It reads its configuration from /etc/printcap. In this file, you can specify filters to use when printing.

Filters

Filters basically provide three functions:

  1. Converting of various file types into PostScript.
  2. Converting of PostScript files to printer specific format (for non-PostScript printers).
  3. (Optionally) Sending of files in printer-specific format to programs which print over network.

Currently, in SuSE distribution, filter apsfilter is used. It can manage only first two functions. Its configurator can configure parallel, serial and remote printers. As you can see in document "Possible printer connection", it is not enough in these days.

The future

With the new printer configurator, the following must change:

  1. The filter must cooperate with the new Configurator. It must be able to read its configuration files. It is currently done using .upp files stored in /etc/gs.upp.
  2. The support of network printing must be added.

The Printer Database

A printer database should be provided. In it, each printer should have a record that consists of this info:

Of course, the database should contain the Generic printer and Ghostscript driver (the user is free to define everything by himself) sections.

Configuration Files

There are two configturation files for each configured printer. The first one is for the apsfilter. It is a /etc/gs.upp/y2prn_printername.upp file. This one contains the apsfilter and ghostscript switches.

The second one is /etc/gs.upp/y2prn_printername.y2. It contains the complete information about the configured printer (connection type, printer manufacturer and model, even the ghostscript switches and their possible values). This one is used as the source for the *.upp file.

The Filter Setup Tool

The Filter Setup Tool should:

  1. Read the printer configuration file /etc/gs.upp/y2prn_printername.y2.
  2. Create the dialog where the user can change these settings. Each choice has a default value read from the configuration file.
  3. When the user wishes to print a sample page, write a temporary /etc/gs.upp/y2prn_printername.upp, print the sample page and restore the original one.
  4. In the end, write the new configuration file.