[LWN Logo]
[LWN.net]
From:	 Michael Goffioul <goffioul@imec.be>
To:	 "Michael J. Hammel" <mjhammel@graphics-muse.org>
Subject: Re: printing Q's on KDE/GNOME for LWN.net (fwd)
Date:	 Wed, 30 May 2001 10:46:58 +0200

Hi,

I would be glad to help as much as I can. However I don't know exactly where
to start. First let me tell you that my main print experience is about CUPS,
I started to cde tools for that system. Now I develop the new KDE printing
system which is globally a kind of integration of QtCUPS/KUPS into KDE, but
in a generic way (meaning it support other print system than CUPS as well).
Let me also tell you that I don't use GNOME so I don't know anything about
its printing architecture, existing tools, ...

Let's start with a short explaination of existing tools (I know):
- CUPS: you already know what it is
- XPP: graphical print dialog based on FLTK, to be used as a replacement of
       lpr, for CUPS.
- QtCUPS: conceptually the same as XPP but using Qt library. It also provides
          a library to easily integrate CUPS and QtCUPS dialog into Qt/KDE
          applications (http://cups.sourceforge.net/qtcups/, but rather
          outdated, latest version is 2.1).
- KUPS: KDE graphical CUPS management tool, allows to add/remove/configure
        printers/classes using powerful, complete and user-friendly dialogs,
        also includes a graphical CUPS server configuration tool. You can
        find some infos at http://cups.sourceforge.net/kups/, but the site
        is outdated. Latest KUPS version is 1.1 (only available in Mandrake
        distro).

The best would be that you give those tools a try. You can find RPM packages
in Mandrake distros (and source RPM that you probably can recompile, however
you'll need KDE-2.x).

As you said, printing under Linux is a complex topic, the main reason being
there exist various print systems. All these systems uses different configuration
mechanism, file syntax, ...Moreover these print systems doesn't provide decent
easy-to-use management tools, which makes printing configuration a hard task
for a newbie (except for CUPS which comes with a web interface). So it's up
to developers to write configuration tools: but these tools are only made for
a particular system, and sometimes for a particular Linux distro (like RH 
printtool).

Now, I'm developing a new printing system for the KDE environment, which try
to address these problems. I'm trying to reinvent the wheel, in the sense that
this KDE print architecture is not a "print system" like CUPS, but it's an
abstract layer between KDE and an underlying existing print system (CUPS,LPR,...)
for the developer (using a common API) as well as for the user (using the
same configuration tools, whatever the real print system is). So this print
architecture is based on a set of core libaries that define an abstract API
and print tools based on it, and on the other side you have a set of plugins
that implement the real print operations.

The graphical interface is heavily based on my previous work QtCUPS/KUPS. It
mainly consists of a powerful print dialog (like QtCUPS) which is now used by
default by all KDE apps, and of a control module for print management (like
KUPS). Everything is now included in KDE-2.2alpha, so if you have time, you
might want to give it a try (you only need kdelibs and kdebase). I'll try
to give here a short summary of main features of these tools (note that all
these features doesn't exist in all plugins, but well in the CUPS plugin):

- provides a complete control of the printer option when it's possible (like
  in CUPS): collate, nup, duplex, orientation, + all driver options
- powerful add printer wizard: easy to use, and provides a lot of features like
  network scanning for network printers, local printer auto-detection (not 
  implemented yet) with driver auto-selection, ...
- easy printer configuration and modification
- print job management (hold, cancel, move to another printer, ...)
- print server configuration (when possible, like CUPS)
- extension of the instance/destination concept from CUPS to any print
  system
- implementation of a generic filter mechanism allowing to process data before
  sending it to the printer. You can then graphically plug and configure filters
  like "psnup", "enscript", "imagetops", ... New filters are easily added as
  they are defined in external XML files
- recently I added the new concept of "special" printer, in contrast to a
  "regular" printer. A special printer is not a real printer, but the print 
  data (usually PS) is sent to a third party program instead of the underlying
  print system: examples are "print to file", "write PDF" (uses ps2pdf), 
  "fax it" (using a graphical fax program like kdeprintfax, provided with
  the new print system). Those special printers appear along with regular printers
  in the print dialog, and like before everything is graphically configurable
  inside the control module. Those special printers are saved on a user basis,
  so any user can add/remove/modify special printers.
- provides a job viewer automatically started when a print job is sent, which
  docked itself into the KDE panel (like M$).

If I would have to summary this print system, I would say:
- usability: use the most comprehensive GUI, moreover use the same GUI whatever
             the underlying print system is.
- flexibility: make everything graphically configurable
- genericity: try to support as many systems as possible, so that it can be
              used in any situation

Now let's enumerate the existing plugins with they main features. All plugins
allows at least to print (from the print dialog), management need still to
be implemented in some cases.
- CUPS: the most complete one, support all described operations
- LPR(BSD): printer management (RH-printtool-compatible) is partially
            implemented, no job management
- LPD: this is generic plugin to be used as default. It is not intended for
       management. It simply list all available printers in many UNIX system
       (Linux-LPD, BSD-LPD, Solaris, HP-UX, IRIX), and so allow to print in
       these systems. Actually it provides the same functionality as the Qt 
       print mechanism.
- RLPR: plugin based on rlpr. Provides easy printer and basic job management.
- EXT: this the most flexible plugin. Allows to specify a print command, like
       in netscape. This plugin can probably be used in any situation where
       the others can't be used. Of course it does not provide any printer
       management, but still provide basic job management (actually you control
       the child print process).

OK, I think that's all I wanted to say. Unfortunately I can't point you to any
site for this new print system. The best is to try it. If you need it, I can
provide you some screenshots, just tell me what you would like to see. Feel free
to contact me if you need more informations. But pay attention I'm on european
time.

-- 
------------------------------------------------------------------
Michael Goffioul		IMEC-DESICS-MIRA
e-mail: goffioul@imec.be	(Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510		Kapeldreef, 75
Fax:    +32/16/28-1515		3001 HEVERLEE, BELGIUM
------------------------------------------------------------------