[Desktop_architects] Printing dialog and GNOME

Michael Sweet mike at easysw.com
Fri Dec 16 05:14:40 PST 2005


Martin Konold wrote:
> ...
> It is a bad design decision for an application to directly link to the cups 
> client library (ABI concerns,...) but it is much better to use a protocol 
> based interface to use the full potential of CUPS. 

I strongly disagree with this, mainly because the CUPS API (and
associated ABI) is very stable and will remain so largely because our
CMP demands it and Apple wants it that way... :)

There is also the PAPI interface which can be used in lieu of the
direct CUPS API, and PAPI is printing-system agnostic, supporting
CUPS, Solaris LP, and generic LP/LPR implementations.  PAPI exposes
*most* of the CUPS functionality, but not all - mainly you have no
way to do custom operations including administration stuff, but for
the purposes of a print dialog it supports everything that is
needed.

That said, when an application uses a high-level toolkit to provide
printing services (GNOME, KDE, FLTK, whatever), it should use those
services.  If those high-level toolkits then try calling out to RUDI,
great, but in many cases applications want to provide previews and
other application-specific options in the print dialog.

Thus, we have a need for a basic print API without UI that
applications and toolkits can use, a platform print dialog
(provided by the toolkit via RUDI), a generic print dialog
(provided by the toolkit), and a customizable print dialog
(provided by the toolkit) that specialized apps can use.

The following ASCII block diagram may be useful:

     +--------------------------------+
     |          Application           |
     +--------------------------------+
     +------------------+ +-----------+
     |     Toolkit      | | Print API |
     |       +----------+ |           |
     |       | +--------+ |           |
     |       | |  RUDI  | |           |
     +-------+ +--------+ |           |
     +--------------------+           |
     |                                |
     +--------------------------------+
     +--------------------------------+
     |         Printing System        |
     +--------------------------------+

*Most* applications should use a toolkit-supplied helper API
("open platform print dialog") which first calls out to RUDI and
then falls back to the toolkit-supplied generic print dialog.

RUDI will be locally configured to use a generic print dialog
supplied by the user's environment toolkit of choice, e.g. the
GNOME or KDE (or whatever) print dialog.

Specialized apps will use the toolkit-supplied custom print dialog
and/or use the print API (PAPI, CUPS API, whatever) as appropriate
for that application.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com



More information about the Desktop_architects mailing list