New capabilities for an approved interface
One component every printer-owning KDE user will come in touch with is the kprinter dialog. It pops open most of the times he clicks on the "Print" button of any new KDE application. [All long-standing kprinter-PowerUsers from KDE-2.2.x times, please note: you will need to modify your print command to include the "--stdin" option for printing from most non-KDE applications. See section on the "--stdin" option at the end of this file.]
kprinter is already well known as a print dialog from KDE 2.2. It has been extended with a lot of new abilities. Also, some of the "old", but temporarily missing features of the popular qtcups utility have come back into kprinter. qtcups in a sense is the pre-decessor to kprinter. Now that qtcups is no longer maintained, Michael Goffioul, its programmer-creator, has made kprinter inherit everything what was good about qtcups and improved upon it at many places.
kprinter is a very versatile tool. Depending on the actual features and power of the print subsystem of your computer, kprinter translates the former's abilities into a nice and easy-to-understand GUI. If your print subsystem doesn't support duplexing, kprinter will not show the option. If your print subsystem is CUPS, kprinter is at its peak shape. It will then be able to "ring every single bell and blow every whistle" of your printer (that is, if you did install the correct driver for it, which is easily done with the help of the Add Printer Wizard). You'll hardly be able to think of anything you'd like to add. (If you do, let us know -- the KDEPrint Team will consider your suggestion and maybe add any sensible feature ;-)
Expanded kprinter, "tooltip" visible: 4 print files, 4 different
MIME types
from 4 different directories combined into 1 single IPP job.
From this dialog you can...
kprinter opens automatically when you click on the "Print" icon of any KDE application. Choose your print job settings by going through the dialog and the click on the "Print" button. As in the previous version of KDE, you can start it from the commandline, by issuing the command "kprinter".
There is one important difference: previously you had to specify the printjob(s) at the start of kprinter. You had to hand the file(s) as commandline parameters, like in "kprinter /path/to/printjob". Of course you can still do this. But now you may also start kprinter on its own and choose the printfiles later. Just select the jobs from a standard KDE file selection dialog, accessible through a separate tab (labelled "Files") inside the dialog.
The mentioned "Files" tab also accepts any printjob via "drag'n'drop", f.e. taken from a Konqueror file manager window. Upon reception, the file is automatically "MIME-typed" to find out its format. This serves the purpose to feed the file, in the next step, into the correct "filter".
kprinter's input tab doesn't accept just one file at a time. It also takes multiple files, from different directories and of various types at the same time. There is no problem to send an ASCII text, a PDF document, a PNG, TIFF, GIF or JPEG image and a PostScript file at once. KDEPrint will take care of everything else.
This way kprinter turns itself into a "Print File Downloader". A Print File Downloader is a program type that is used in the Windows world of commercial printing to send PostScript, PCL, PDF and TIFF directly to the printer (which must understand to handle those formats).
kprinter can send those same filetypes away for printing -- and many other types of files too! -- and it can also send it to printers that don't understand the input types (because it takes care of the right file type conversions too). Moreover, unlike its counterparts from this other world of computer usage, it doesn't cost you a dime in licenses....
Should the file not fit into the print subsystem's (CUPS, LPRng, RLPR etc.) list of acceptable input files, KDEPrint will try to automatically find an appropriate filter. If this fails, the user is prompted to select a filter manually, or cancel the printing. (After all, even with KDEPrint you still can't print DVD videos... ;-) [OK, this one is not yet fully functional. Michael Goffioul is still working on the part which allows the manual specification of an alternate filter... ;-) ]
The "Advanced Options" tab on the expanded mode of kprinter provides a few setting which are very important for enterprise level printing, were centralized reproduction departments receive jobs in "held" state only, to release them manually, when the target printer is ready for it (it might need special paper loaded).
"Advanced Options" tab of kprinter gives access to Enterprise Level
printing features: labeling pages, attaching job billing information,
scheduled printing, job priority setting, and much more.
Printing at a scheduled time, or tagging the job with some billing or accounting information (here "Sylvia") is often equally important. Raising the job-priority to a higher level will queue the job before all others, lowering it to "1" will print it only after all others are done.
kprinter, when started from the commandline, now also supplies the handy little option to "Keep this dialog open after printing". Thus it remains ready to print the next files. Or re-print the same file, but now (after eye-checking the 1-copy proof done during the first round) with different quality settings. Or print the real "production" circulation of 100 or 1000 copies, if the first attempt (serving as a proof) was satisfying your critical eyes....
With CUPS you can easily create multiple instances of a printer. An instance represents a pre-set selection of printoptions for the printer. It allows the "One-Click-Only" selection of complicated print option profiles, which are permanently stored behind the name of the instance. kprinter can show the instances for any printer in a "tree" view of its drop-down list.
Printer "Danka_LaserJet_8100" has various "instances":
"One-Click-Selection" for complicated job options
(should we try and get a Software Patent for this invention? ;-)
If your computer is connected to a LAN you might be pleasantly surprised to see automagically appear all printers of your workgroup (and probably many more) in the drop-down menu of kprinter -- with you never-ever having installed a single printer on your computer! There might even appear some differently named "instances" of the same printer.
The explanation is: somebody else, probably your smart network administrator, has installed CUPS and is running it in "server mode". This mode broadcasts in certain time intervals all available printers to the LAN. CUPS clients pick these infos up and store them temporarily in a cache for future usage. kprinter uses the info to show the list of available printers. Should you ever print to one of them, kprinter will swiftly retrieve a current set of available print options for that target printer from the CUPS server. These options are presented on the "Properties... --> Driver Settings" tab for user selection and sent as "driver" parameters, along with the actual printfile, to the server. The "driver", i.e. the printfile conversion filters, will be used on the server side to process the job.
Thus kprinter is able to print without any local driver or printer installed...
Wouldn't you call this true "Plug'n'Play Printing"?
KDEPrint will always show at least four "Special Printers" in the drop-down menu. [NOTE: you can always use the "Filters" as available through "Properties... --> Filters" with these special printers too].
Four useful "Special Printers" shipping with KDE 3.0.
It is easy to create more of your own.
The PDF "special printer" is well configurable, providing options on a "Driver Settings" tab (it uses the PPD trick ;-) for resolution and downsampling color and grayscale images with different methods.
You can activate to print your job to a "Preview" window by ticking the checkbox of kprinter (not available when starting kprinter from the command line). The printfile (which is in PostScript format at this stage) is then shown by kghostview, after it has been processed by all the pre-filters you might have specified in the "Properties... --> Filter" tab (seen below).
kprinter, "collapsed" view, "Preview" checkbox enabled.
(Checkbox currently only available when printing from KDE
applications).
Limitation: the "Preview" option is only available from KDE applications. It needs PostScript as an input file. For a preview in not-KDE applications, print to a file (PostScript- or PDF Special Printer) and preview the saved file.-- NOTE: You can change the preview program to another one (like f.e. gv) by clicking on "System Options..." and then on "Preview".
Click on the "Properties..." button to see the available print options for the present job and printer AND for the presently selected print subsystem. With CUPS, you will see a dialog with six tabs:
Printjob driver settings are smart enough to warn you with a red alarmist color, in case you select options that are not allowed in this combination. In the case of the above screenshot, you can't draw A3 paper from the selected media source Tray 2. Selecting the another tray resolves the conflict.
The "Driver Settings" tab is specific to each printer. Some print-subsystems, however, are not able to show up any settings of their own. For them, you'll only get the KDEPrint-Pre-"Filters" tab.
Driver Settings tab provides printer specific job options. Red color
highlights
contradictory user selection. (Here specified "A3" paper is not loaded into
selected "Tray 2").
Essentially, the options on the "Driver Settings" tab are extracted from the target printer's "PPD"-file (PostScript Printer Description). [NOTE: this tab will not be present with a CUPS "raw printer" selected. A Raw Printer is one with no PPD associated. It serves the purpose to spool remote or local jobs unchanged/unfiltered, such as jobs from Windows clients using their own platform-specific vendor driver.]
You don't need to see the many options at all times? Just "Collapse" the dialog by clicking on the button in the lower left corner. Next time, and in future, kprinter will appear in a "reduced" version. Should you ever need to access its advanced features again, just click the "Expand" button any time.
Are you working in an environment where you tend to "see" way too many CUPS printers in the drop-down list, automatically announced by several remote servers? Choosing a printer is always a pain? Then the "filtered" view is made for you. Select once those printers, which you always want to see. Then never be bothered again by the devices in the other floors or the next building at your workplace.
To limit amount of visible printers, use this dialog to choose relevant ones
only.
Left: unfiltered view on all available printers. (Having to select amongst 36
automatically detected printers can be confusing to users.
Right: button (with "funnel" icon) pressed, filtered view shows only 2
personal printers.
Enable filtered view: click on button with "funnel" icon. Disable filtered view: click button again. If you have not configured "filtered view", you will get an "empty" list (i.e. no printer other than "Special Printers" will be visible). To setup "filtered view" (list of desired printers), select "System Options... --> Filter". Select printers you want to see from complete list on the left and move them to the right.-- NOTE: you can also use a regular expression to show all printers with a matching entry in their "Location" description. This can be used by smart administrators to prepare the easy filtering of only the "own" printers of every workgroup by putting the appropriate string into the Location description for all printers.
Did you start kprinter prematurely? You was so keen to explore its features that you did start the kprinter dialog without having installed a printer beforehand? Never mind -- you can start the "Add Printer Wizard" from the kprinter dialog itself. (The wizard button is right besides the "funnel" filter icon.) No need to postpone or give up your already selected printfiles. After finishing the steps (the Wizard guides you through), the files are still there and can safely be sent to the newly installed printer.
Are you a power user, having two or more different print subsystems configured on your printer? kprinter does a good job to recognize automatically the active print subsystem. But it also lets you dynamically switch from one to the other. Linux Mandrake users have it prepared for them by their distribution -- they can comfortably alternate in between jobs from CUPS to LPRng and back again if they like and if they did choose to install both systems at the same time. (Other distributions will expect their users to choose one of the two for installation and configuration.)
Switch print subsystem "on-the-fly" in between jobs.
kprinter is automatically used by most KDE applications when clicking the "Print" button or icon or selecting the "File --> Print" menu item. It is so much a standard component for KDE, that most application programmers don't need to think about printing at all. They only need to use a call to kprinter in their code -- and this is all!
Some KDE applications insert "customized tab" into kprinter dialog.
Left: kcron special print options. Right: konqueror browser special print
options.
However, KDE application programmers have a further option. They are given the possibility to extend the standard kprinter dialog options by their own customization, if they want. Konqueror, for example, has an extra tab for HTML-print settings (allowing to prevent the printout of background colors and images). Kcron also uses this mechanism to provide the possibility (to root only) to print the whole lot of the kcron jobs (instead of the default settings, which allows to only print the user's own kcron jobs).
So you start to like kprinter so much that you want to use it in non-KDE applications too? To setup kprinter as your favorite print command for any third party program, just find out if and where you can change its pre-configured "print command". The power of KDEPrint is not limited for use within KDE only.
The external program must just allow for a configurable print command. StarOffice, OpenOffice, WordPerfect 2000, Netscape, Mozilla, Galeon, Acrobat Reader, gv and all GNOME applications are known to work with kprinter. There is some detailed advice to be found in the KDEPrint FAQ.
kprinter is a perfect tool for non-KDE-applications too. Here it is
configured to work for StarOffice.
However, there is one important change to be made in most cases, compared to its usage in KDE 2.2.x: instead of the sole "kprinter" command, with KDEPrint-3.0 in most cases you need to use the "--stdin" parameter. This had to be changed, to be able to differentiate if the printfile is taken from stdin or if it is selected only at the second stage (i.e. after kprinter has been started from the commandline, using drag'n'drop or the standard file selection dialog).
You don't want to have the kprinter dialog pop up for every printjob you are starting ? You have done the job settings for your printer once and for all and saved them? Then the "--nodialog"-option is what you're looking for.
If you set f.e. the Netscape print command to "kprinter -P danka_infotec_IS2027 --stdin --nodialog", this browser will happily send quietly its printfiles to the printer danka_infotec_IS2027. It will happen in the background, with no dialog popping up, using the default printer settings. Default settings are those, which once were pre-configured or saved by you, while the dialog was open. There will only appear a dialog (containing a warning or an error message), if something goes wrong.
If you want the error messages to appear on the konsole or xterm you used to start kprinter from, use "-j console". The full command is "kprinter -P danka_infotec_IS2027 -j console --nodialog". If you want even to suppress the console error messages, use the "-j none" switch.
"kprinter --help" will show all commandline options for kprinter in a condensed form.
Do you want to print to a CUPS server that is not "broadcasting" its printers? kprinter is able to connect to and query directly any remote (or local) CUPS daemon. For this it uses a direct call to the CUPS API (Application Programming Interface).
Just click on "System Options", and choose the icon "CUPS server" on the next dialog. Fill in IP address or server name and for authentication the account information (often it will be "root" and the appropriate password). Once you're authenticated, you'll get access to the remote server's printers. The printers will automatically show up in the drop-down list of kprinter.
Log into remote CUPS server for printing (f.e in case CUPS browsing is not
enabled): click "System Options..., select "CUPS
server"...
You'll then be able to print to all of them without installing a single driver for a 'unknown' remote printer locally! -- You don't believe this? Then we can't help but advice you to set up not just one, but at least two KDE/CUPS computers in your environment and find out yourself ;-)
This feature is also extremely useful to reach a server behind a router or gateway, whose printer information broadcasts are not able to cross the boundary between two LANs. (Of course this will only work if you selected CUPS as your printing system in kprinter in the first place...)
CUPS and kprinter work together seamlessly to exchange all informations about available job options with no further user action. Click on the "Properties" button to get displayed all possible driver settings of the printer. They can be found on the "Driver Settings" tab. (The other tabs provide general print options, not dependent on the target printer.)
To see which CUPS server kprinter is momentarily connected to (default is localhost), click the "System Options..." button and go to the CUPS server item. (As this is still a bit too uncomfortable and long-winded, an improvement is being developed to make the current connection always visible at a prominent place, like the window title bar or similar.)
Communication between CUPS server and CUPS client is always defaulting to IPP. A CUPS client sending a job to a printer on a CUPS server, which was "discovered" automagically, will do so using the Internet printing protocol. The server then passes the job to the actual output device using an appropriate "backend" -- one of the USB-, serial, parallel, or networking protocols. Amongst the supported networking protocols to speak to printers are: IPP (of course), LPR/LPD, AppSocket (a.k.a. "HP JetDirect") and SMB/CIFS (a.k.a. "Samba")
Locally defined printers need of course to be "installed" on the local computers prior to printing. These printers may be attached to the computer via USB, serial, parallel or a network connection (in this other sense being "remote" printers then). Network connection can be over IPP, LPR/LPD, AppSocket (a.k.a. "HP JetDirect") and SMB/CIFS (a.k.a. "Samba").
A local computer, having defined and installed all printers itself, is "its own server". It needs to have the server and the client components of CUPS installed. (Some Linux distributions rip the original CUPS software apart and spread it over several packages).
By providing a complete GUI frontend to CUPS, KDEPrint is bringing to the light of graphical dialogs all the gems of this still-underestimated printing system These features have been present inside CUPS already for quite a while. But many useful controls and commands were so far mostly hidden in obscure commandline options or seldom-read man pages.
The KDEPrint team is proud to present to the world its new printing system. It is firmly basing itself on the new IETF-declared standard network printing protocol, the IPP (Internet Printing Protocol), by using CUPS, its most mature implementation. At the same time we provide enough backward compatibility to support legacy printing systems. Its modular design will also support future print system developments, should they happen. We hope to promote this way both CUPS and the IPP....