# &kdeprint;'s Highlights

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

## The Add Printer Wizard

&kdeprint; has an Add Printer Wizard. The Add Printer Wizard helps you with 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 using 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 information 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 information 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 information (and having the same amount of control is through the &kcontrolcenter; selecting System Printing Manager. If you don't see the Printer Information, right click on the window background and select View Printer Information. 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 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 benefits from &kdeprint; that are independent of the chosen print subsystem, and are available with all of them. 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 passed through filters which make it suitable for displaying on screen using &kghostview;.

Special Printers

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

  These special printers may:

  Print to PDF

- Convert your document into a PDF file 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;, plain 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;, plain text or image files, and output any one of those formats.

  These filters are configured through XML files. This makes an extension of the concept very easy for experienced developers, 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 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-printing, 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 you use the duplex option that turns the output along the short paper edge. Folding the printed paper along the middle turns your document into a nice pamphlet.

  If you are stuck with 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. These can then be folded to make a pamphlet.

## &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 &UNIX;-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 widely used. For those not familiar with them, here are brief 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 can now use the `kprinter` command. And in place of `kups` you will probably use `kcmshell printers` from now on.

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 can also start, stop, 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 a non-&kde; application, that lets you configure your print command. Examples of these 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`, or give the full path in the dialog; ⪚ ``/opt/kde/bin/kprinter``. &Netscape; will remember this and with further print jobs you will get the `kprinter` dialog to configure your printouts.

A screenshot of the `kprinter` print command in action. Here's a screenshot showing 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 command line and see the resulting dialog box pop up:

Screenshot of the `kprinter` command Screenshot showing use of the `kprinter` command from the command line.

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

To pre-select a specific printer from the command line, use the `-d` option, ⪚: ``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.

Using `kprinter` you 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 ppd-files.

## 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 was never so easy (not even back in the days when 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 combining of 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; navigation panel, giving a nice integrated way to browse and manage your print system via the &URL; `print:/manager`.

Please contact Michael Goffioul at kdeprint@swing.be with any further user or developer suggestions.