Technical OverviewThis chapter aims to give a technical overview of &kdeprint; which
non-programmers can comprehend.&kdeprint; is a new and revolutionary tool to give easy access to
printing services for both &kde; users and &kde; developers.A Brief Description of &kdeprint;You can access the functions of &kdeprint; in different ways:
through the Printing Manger in the &kcontrol;, through the
kprinter command or through the dialog that pops up
if you want to print.What it is not&kdeprint; is not a replacement for the
printing subsystem itself. &kdeprint; does not
therefore give provision for spooling, and it does
not do the basic processing of &PostScript; or
other print data.What it is&kdeprint; is an intermediate layer between the spooling and the
data processing print subsystem (as installed), and the application that
seeks to print. &kdeprint; provides a common interface for &kde;
developers and &kde; users, to various supported print subsystems. At
the same time, it is customizable, and highly configurable.&kdeprint; is easy to use for both &kde; developers and end-users.
Developers can port their applications, with minimal changes, to use
&kdeprint; instead of the old &Qt; print system. Users
can easily choose and configure their print subsystem.For a reference to new &kde; users: &Qt; is the basic library and
graphical toolkit, which is used by all &kde; applications; &Qt; is
developed by TrollTech, a Norwegian software company.&kdeprint; -- Different Usage for Different People&kdeprint; has different faces for different people.What users and administrators can do with &kdeprint;&kdeprint; allows users and/or administrators, depending on their
rights, access to printing subsystems (∪︀, LPD,
RLPR, LPRng,
PDQ &etc;) through a &kde; graphical user
interface (&GUI;). Using &kdeprint;, they can print, administer jobs,
printers and the printing daemon, all in a comfortable manner.Experienced users will like the capability to plug any working
filter for the print data between the output of their application and
the input, into the chosen print subsystem. Some examples for this
already ship with plain vanilla &kdeprint;. Read
on.What &kde; developers can do with it...If a &kde; developer needs printing access for his application, he
does not code the printing functions from scratch. Before &kde; 2.2 this
service was provided by the QPrinter class, a
library function of the &Qt; Toolkit. The
QPrinter class relied on the out-moded
Line Printer Daemon (LPD). The
&kdeprint; library bases itself firmly on the more modern Common &UNIX;
Printing System (∪︀), while at the same time keeping backward
compatibility with LPD and other legacy, or less
elaborate, print systems. It also leaves the door open
for any new development that might occur.For &kde; developers to use the new &kdeprint; class in their
applications, they require only minimal changes to their code: for every
call of QPrinter, they just need to change this to
KPrinter. Replacing one (!) letter in a few
spots, and automatically they are done; their application can then use
all of the features of the new &kdeprint; library.More ambitious developers, or ones with special requirements, can
do more: despite &kdeprint;'s feature-rich framework, they are still able
to customize the print dialog of their application
by creating an additional Tab, where their
extensions to the standard &kdeprint; will feel right at home.This last mentioned feature has not been used widely inside
&kde; so far, as developers are not yet fully aware of &kdeprint;'s
power. Expect more of this in the near future. One example I
discovered is the &kcron; application. It lets you edit the crontab
through a &GUI;. The developers have implemented a printing feature
that lets you (or root)
choose if you want to print the whole of crontab (for all users) or
just the part that is marked. You can see the effects on &kdeprint;
in the following screenshots.This shot shows a sample from the &kcron; utility.
&kcron; utility: a small sample of a system's cronjobs as
shown through the &kde; GUI&GUI;.The &kcron; developers let you choose to print the whole of the
cron table or just the marked part of it.The dialog to configure &kcron;'s printing options: the
additional tab titled Cron Options is from inside
&kcron;, not &kdeprint;; it is a special extension added by the
&kcron; developers for printing purposes, not originating from, but
executed by &kdeprint;. Developers of other applications are free
to implement their own goodies, if they feel need for it.&kcron;'s addition to the &kdeprint; dialog.&kcron;'s addition to the &kdeprint; dialog.
&kcron;'s addition to the &kdeprint; dialog.
What &kdeprint; offers to everybody...&kdeprint;'s easy-to-use interface for all supported print subsystems
of course does not eliminate basic traditional weaknesses of some of
those systems. But it smooths some rough edges. Different users may use
different printing systems on the same box. A user is free to even
switch on the fly, from the print dialog, the print
subsystem to be used for the next job. (This is possible if different
systems are installed in a way that they don't get in each
other's way.)Most &UNIX; users are used to
LPD printing. LPD provides only
basic printing functions, is very inflexible and does not utilize the
many options of more modern print systems like ∪︀. While also
working remotely over any distance (like every TCP/IP based protocol),
LPD lacks bi-directional communication,
authentication, access control and encryption support.&kdeprint; can use ∪︀ to support:Querying the LAN for available printers,Basic, Digest, and Certificate Authentication,Access Control based on IP addresses, net
addresses, netmasks, host- and domain names,and 128-Bit TLS or SSL3 encryption of print data, to prevent
eavesdropping, or at least make it much more difficult.This makes &kdeprint; a much more robust and reliable solution
than using the venerable LPD.How to access &kdeprint; You get access to &kdeprint;, or parts of it, in four different
ways:through your applications: if you call the printing
dialog (either FilePrint...) or the button with the
little printer icon on it; this opens the printing
dialog.through the typed command kprinter
in a terminal or a &konsole; window or from
the Run Command... mini-CLI
window: this also opens the printing dialog.from the button, starting &kcontrol;, and then go to
SystemPrinting
Manager. This opens the &kdeprint;
administration which is part of the &kcontrolcenter; and also lets
you switch to other parts of the &kcontrol;from a command line (&konsole; or
mini-CLI) type kcmshell.
This opens just the &kdeprint; part of &kcontrol; to change your settings
&kprinter; dialog to be started from Run Command... windowStarting the &kprinter; dialog from
a Run Command... window.
Starting the &kprinter; dialog from a Run
Command... window.
Here is a
&kivio; drawing of the &kprinter; dialog as it pops up after being
started... You can always add a new printer by clicking on the small
Wizard button (marked red/yellow in this
drawing).&kprinter; dialog started (&kivio; draft drawing)
&kprinter; dialog started (&kivio; draft drawing)