# &kdeprint;'s Highlights

The new &kdeprint; system includes more than one highlight. Having worked in a not exactly sophisticated environment as far as printing is concerned, in previous years, have a look at some of the goodies that come with &kdeprint;

## The Add Printer Wizard

&kdeprint; has an Add Printer Wizard. The Add Printer Wizard helps you adding and configuring a new printer. Of course, you may do this manually as well.

&kdeprint; helps you discover printers. It is able to scan the environment for available devices and queues. This works for network connections against TCP (AppSocket, aka &HP; JetDirect, or IPP) or SMB/Samba (shared &Windows;) printers and partially for directly attached printers over parallel, serial, or USB connections.

A screenshot of the new Add Printer Wizard
Here's a screenshot of the Add Printer Wizard (this one is not very exciting yet; but...)

The wizard makes the installation and handling of the drivers a snap. Selecting, configuring and testing should be easy as never before on any &Linux;-like system.

## Full Print Job Control

The Print Job Viewer is automatically started by &kprinter;. It may be docked into the &kde; panel (in the system tray). The Print Job Viewer allows full job management, if supported by the print subsystem.

You can:

- Hold and release jobs,

- Move pending jobs to another printer,

- Cancel pending or processing jobs.

A screenshot of the &kdeprint; PrintJob Viewer shows the info you get: Job-ID, target printer, job name, job owner, job status and job size. In the next &kdeprint; release you will also see information about the number of pages (as &CUPS; calculates it; see chapter on page accounting for more info about its merits and limitations).

A screenshot of the &kdeprint; PrintJob Viewer
Here's a screenshot of the &kdeprint; PrintJob Viewer.

A screenshot of the &kdeprint; PrintJob Viewer.

An alternative way to looking at the same info (and having the same amount of control is through the &kcontrolcenter; going to System Printing Manager. If you don't see the Printer Information, right click onto the window background and select View Printer Informations. Then go to the Jobs tab to see this:

Here's a screenshot of the &kdeprint; PrintJob Viewer.

## Modules for different print subsystems

&kdeprint; uses different modules to realize the interface to the possible print subsystems. Not all the modules are yet developed fully, but you will have basic printing functionality with:

- LPD (BSD style)

- LPRng (&RedHat;, if you just use it's BSD style subset),

- RLPR (a command-line LPR utility, which doesn't need a `printcap` file.

- external print commands (&Netscape; like).

Most importantly, full support for &CUPS; is already there. Modules for other print subsystems, such as PLP, PPR and PDQ may be available later.

&kdeprint; makes &kde; much more flexible. It gives freedom of choice to &kde; 2.2 users. To use different available print subsystems, these must, of course, be installed independently from &kde;. In former versions, users were stuck with the old LPD style print subsystems. Now they can even use &CUPS;. In the future, there will be easy integration of new subsystems, as they might appear on the scene.

## More &kdeprint; Goodies

Benefitting all Print SubSystems.

Some specific features of &kdeprint; depend on the chosen print subsystem. This dependency might exist because those features are only implemented there; remember, &kdeprint; is an intermediate layer between &kde; applications, and the print subsystem, but it's no replacement for any print subsystem by itself. Such dependency may exist for another reason: that &kdeprint; has not yet implemented an interface to all the features of all the subsystems.

Other features include goodies from &kdeprint; that are independent of the chosen print subsystem, and are available with every one. At present there are special or virtual printers, and some generic pre-filters.

Print Preview

  From the Print Dialog, you can select to look at a preview. For this the print file is sent through filters which make it fit for display on screen by &kghostview;.

Special Printers

  Amongst these additional &kdeprint; features are a few special or virtual printers:

  These special printers may:

  Print to PDF

    Convert our document into a PDF with the help of an external program.

  Print to email

    Send your document as an email attached PDF file.

  Print to PS file

    Save your document as a &PostScript; file.

  Print to Fax

    Send it through an available backend, such as Hylafax as a fax.

  These special printers appear in the user print dialog just like normal printers. They are entirely configurable on a per-user basis.

Generic Pre-Filtering

  &kdeprint; provides you with a framework to define and configure your own pre-filters. These pre-filters may take effect before they are passed to your print subsystem for further processing, but after the (&PostScript; or text or other) print files have been generated by your application.

  There are a few useful filters already predefined. These are:

  - The multiple pages per sheet filter,

  - the enscript text filter,

  - and three filters to help print pamphlets.

  You may create your own filters based on any third party program that is able to process &PostScript;, text, or image files, and output any one of those formats.

  Those filters are configured through XML files. This makes an extension of the concept very easy for experienced geeks, but end-user configuration is also done through an intuitive graphical user interface. So, fear not, you don't need to learn XML because of &kdeprint;!.

  Multiple Pages Per Sheet Filter

    This is a predefined filter that installs with &kdeprint;. It allows you to create a modified &PostScript; output, from &PostScript; input, that prints 1, 2, or 4 logical pages on a single sheet of physical paper.

  Enscript Text Filter

    This is a predefined filter that installs with &kdeprint;. It allows you to create &PostScript; output from any text file input, that includes syntax highlighting for program listings, pretty-print, and nice configurable page frames and headers.

  Pamphlet Printing Filters

    If your printer is able to produce duplex output, using either one-pass or two-pass technology, you may be able to use one or a combination of the pamphlet filters.

    For duplexing printers, make sure to use the duplex option that turns the output along the short paper edge. Folding the output along the middle turns your document into a nice pamphlet.

    If you are stuck to using a simplex-only device, you can do the same, using two different filters and a few additional steps.

    Depending on your model, first use the filter for printing the odd pages, then insert the paper in the correct order back into the paper tray to get the even pages printed on the reverse side. Finish by folding.

## &CUPS; Support: the Most Important Module in &kdeprint;

&kdeprint; contains a module for &CUPS;. &CUPS;, the Common UNIX Printing System (http://www.cups.org/), is the most advanced, powerful and flexible of all print subsystems on &UNIX; and other &Linux; like operating systems. It is still quite new on the horizon, but is based on IPP, the Internet Printing Protocol, the newly emerging standard for the future of network printing. &CUPS; is clearly the print system of choice for Michael Goffioul, the principal &kdeprint; developer.

Experienced &kde; users may already be familiar with Michael's utilities qtcups and kups (co-developed with Jean-Eric Cuendet). These were up until now the graphical &GUI; front ends for &CUPS; with a strong relation to &kde;.

### qtcups and kups — The Predecessors

Both utilities are probably still in wide usage. For those not familiar with them, here are short explanations.

qtcups was a graphical front end for the `lp` or `lpr` print commands as installed by &CUPS;. Using qtcups opened a dialog. This dialog let you comfortably select your printer and the print job options. qtcups worked from the command line, or from within applications, when the application in question had a configurable print command.

kups was a graphical wrapper to do the administration tasks for your &CUPS; server, and the &CUPS; daemon at the heart of it. You could add, delete, modify, configure, start, and stop printers. You could cancel, delete, move, stop and restart print jobs, and you could change the settings of the daemon, start, stop, and restart it.

### &kdeprint; — The Heir

The &CUPS; Module in &kdeprint; now contains all (and more) functions that were provided by qtcups and kups in former &kde; versions.

Instead of `qtcups` you now can use the `kprinter` command. And in place of `kups` you will in future probably use `kcmshell printmgr`.

The &kdeprint; module for &CUPS; also lets you fully administer the print subsystem, just like kups did before. It can start, stop and configure your &CUPS; daemon. It also can stop, start, add and delete printers (&ie; printer queues) and printer instances. Printer instances are printer queues that point to the same physical output device but with a different default setting of print options.

### &kprinter; — Graphical Print Command

&kdeprint;'s &CUPS; module gives you access to a graphical print command, like qtcups did before.

Use &kprinter; in any application, even non &kde; application that lets you configure your print command. Examples of this are &Netscape; and StarOffice, but not most pre-&kde; 2.2 programs.

A screenshot how to use the new `kprinter` print command instead of the old-fashioned `lpr`... (Of course you need to have `kprinter` in your $`PATH` for this short version; otherwise give the full path in the dialog once, &eg; ``/opt/kde/bin/kprinter``. &Netscape; will remember this and from now on you always get the `kprinter` dialog to configure your printouts.

A screenshot of the `kprinter` print command in action.
Here's a screenshot how to use the new `kprinter` print command instead of the old-fashioned `lp` or `lpr` in &Netscape;.

You can also use `&kprinter;` from the commandline and see the resulting dialog box pop up:

Screenshot of `kprinter` command
Screenshot of using the `kprinter` command from the commandline.

Just make sure you give at least the file to be printed from the commandline as well: ``kprinter` `/usr/share/doc/packages/cups/sam.pdf``. This will hand over the &CUPS; Software Administrator Manual to the `kprinter` dialogue, which then pops up with the default printer pre-selected.

To pre-select a specific printer from the commandline, use it like ``kprinter` `-d DANKAcolorC2000` `/home/kurt/linuxtag2001-paper.ps``. You can still de-select the printer `DANKAcolorC2000` and choose a different one.

You cannot however call ``kprinter`` without a print file and hope to open a file selection dialog box from the kprinter window. This is a feature that will be implemented only in the next version.

Through `kprinter` your are able to ring all the bells and blow all the whistles of your printer. You will need a device-specific so-called &PPD; (&PostScript; Printer Description) to enable &CUPS; to make this nice tandem team do this for you. Read more about this in .

## Plans for Future Development

What you have now is the first, already very feature-rich version of &kdeprint;. This version is, of course, fully usable for printing. >You might even think, that it never was so easy (not even back in the dark days you had to use &Microsoft; &Windows;.

In the future, &kdeprint; will become even better. It will do a better job of detecting your installed print subsystem itself. Already &kdeprint; is doing quite well in automatically sensing if you have &CUPS; on your system. But in many cases you will have to tell &kdeprint; what you are using, if you want to keep a legacy print system.

The most important improvement in the near future will be a completion of the LPRng plugin. This at present is still very basic. It is restricted to the pure classical LPD part of LPRng.

Also, you may be able to add printers directly from the print dialog to your system just in time, without going to &kcontrol; first.

Some smaller improvements already planned are:

- add a file selection dialog from the kprinter window to allow for combining additional files to the present printjob

- add a history button to the KJobViewer window and also a column to show the number of pages &CUPS; calculates for the job.

Finally, there will be an IO slave that will give you access to your print subsystem, via &konqueror; for example. With this you will soon be able to browse your print subsystem from &konqueror; through a &URL; like shortcut such as `print://printers/printername`. A KPart will add a virtual folder to the services section of the &konqueror; sidebar, giving a nice integrated way to browse and manage your print system via the &URL; `print:/manager`.

Please contact Michael Goffioul at goffioul@imec.be with any further user or developer suggestions.