KDEPrint FAQ
(by Kurt Pfeifle, Author of KDEPrint Handbook, and Michael Goffioul, KDEPrint developer)
Questions
General
Installation Generalities
- How do I set/change the print spooler in use?
- I have CUPS installed, but I can't select CUPS as print spooler in KDEPrint
Filters, pseudo-printers and instances
- What is a filter?
- What is a pseudo-printer?
- What can I do with filters/pseudo-printers?
- Can I create new filters/pseudo-printers?
- What is a printer instance?
- How do I modify/create an instance?
- How do I create a global instance accessible to all users?
Using KDEPrint outside KDE
- Is KDEPrint for KDE usage only?
- Can I use KDEPrint together with GNOME?
- How do I use KDEPrint in Netscape?
- How do I use KDEPrint in Galeon?
- How do I use KDEPrint in Mozilla?
- How do I use KDEPrint in StarOffice 5.2?
- How do I use KDEPrint in the Gimp?
- How do I use KDEPrint in Acrobat Reader?
- How do I use KDEPrint in gv?
- How do I use KDEPrint in GNOME?
- I am currently a GNOME-only user, but now I want to use KDEPrint, without having to do a full KDE-2 installation: What are the minimum installation requirements if I want to take advantage of your new utilities?
Troubleshootings
- I am using CUPS as a backend and I'm sure there are printers installed in CUPS, but they don't appear in kprinter. What is wrong?
- I always get the message "print daemon cannot be contacted". What can I do?
- Why doesn't the enscript filter work?
- I'm using LPR (or similar) and my printers are shown with aliases and/or garbage data from the printcap file. Why?
- I'm using a NIS server to get my printers. Is it supported?
Answers
General
What is KDEPrint
KDEPrint is the new print framework for KDE since version 2.2.0. Basically, it is a programming layer between any KDE application and an underlying print spooling system like CUPS, LPR, GNUlpr, ... It is intended to provide a high flexibility as well as a full control on the print job and the print options through a comprehensive graphical user interface.
What is included in KDEPrint
KDEPrint consists of different modules to perform various printing tasks:
- a print dialog with a printer properties dialog
- a print management tool integrated into KControl
- a job management tool started automatically when a print job is created using KDEPrint
- a lpr-like print interface to KDEPrint, to print any file
- other various tools like a fax interface, a print system browser plugin for Konqueror, an "Add Printer Wizard" working for the CUPS and RLPR plugins, a scanning tool to find network printers, and more...
Where can I download KDEPrint
KDEPrint is included into the official KDE release since version 2.2.0. It is part of the kdebase package.
Installation Generalities
How do I set/change the print spooler in use?
On the first use, KDEPrint will try to automatically detect the print spooler and determine the best print plugin to use. However you can still change that setting later, either from the print manager (KControl -> Peripherals -> Print Management) or from the print dialog. In both cases, there's a selection widget at the bottom of the window to change the current print spooler.
I have CUPS installed, but I can't select CUPS as print spooler in KDEPrint
Having CUPS installed is not sufficient to have KDEPrint using it. You also need the KDEPrint plugin for CUPS installed. To determine if you have it, check the existence of the files:
- $KDEDIR/lib/kde3/kdeprint_cups.la
- $KDEDIR/lib/kde3/kdeprint_cups.so
- $KDEDIR/share/apps/kdeprint/plugins/cups.print
If those files are not installed on your system, then the possible reasons are:
- either the kdelibs package wasn't compile with CUPS support and you'll need to recompile kdelibs (or ask your Linux Distribution for updated packages),
- or the cups plugin has been packaged separately (for example kdelibs-cups).
Filters, pseudo-printers and instances
What is a filter?
A filter is an object that is built around an external program and used by KDEPrint to process the print data before sending it to the printer. Filters can be chained, but the output format of one filter should be supported as input by the following one. In KDE-3, a type checking mechanism will be included to avoid type mismatch between 2 filters. The filters are configured in a tab of the printer properties dialog. Examples of filters are enscript, psnup, ...
What is a pseudo-printer?
A pseudo-printer is pretty similar to a filter except that it acts like a printer within the KDEPrint framework. That means that a pseudo-printer is also an object built around an external program that is fed up with the final (filtered) print data as if it was a regular printer. Pseudo-printers appear along regular printers in the print dialog. Presently supported pseudo-printers are:
- "Mail PDF file"; uses KMail to send the file as a PDF-converted attachment to an e-Mail address
- "Print to File (PDF/Acrobat)"; uses ghostscript to save the file as a PDF-conversion to disk
- "Print to File (PostScript)"; saves the file as a PostScript output to disk
- "Send to Fax"; uses an installed fax backend like HylaFax or efax to send a fax from the file-to-be-printed
What can I do with filters/pseudo-printers?
You can perform various tasks with this mechanism. Virtually, any command-line processing utility can be turned into a filter or pseudo-printer. Examples are an enscript filter used to convert a text file into PostScript, or a psnup filter to put several pages on a single sheet of paper. An example of pseudo-printer is the PDF file writer (distiller) built around the ps2pdf ghostscript utility.
Can I create new filters/pseudo-printers?
Yes, filters and pseudo-printers are entirely configurable on a user base. You can create new pseudo-printers using the print management tool. Filters are not yet graphically configurable, but it should be implemented for KDE-3. You can still add new filters by creating and adding the needed files into $KDEDIR/share/apps/kdeprint/filters. Each filter is defined using a desktop file for general informations, and a XML file to describe the configurable options for that filter.
What is a printer instance?
A printer instance is the association of a real (physical) printer and a set of predefined print options. Printer instances are shown along regular printers in the print dialog. Using instances, you are able to define different flavours of printing for a single printer, and access them easily from the print dialog. This is an extension of the instance concept from CUPS.
How do I modify/create an instance?
You can modify a printer instance from the print dialog. Edit the printer/instance properties. make the changes you want, and then click on Save to save the settings. Note that those changes are only effective for the current user. To create a new instance (or to modify an existing one), start the print manager from KControl, be sure to view the printer information area (from the toolbar or the right-mouse-button menu), and go to the Instances tab.
How do I create a global instance accessible to all users?
When modifying/creating an instance, settings are saved to the local file $HOME/.lpoptions and are thus only valid for the current user. In KDE-3, a global file /etc/cups/lpoptions is also used, allowing to create instances available to all users. However, there's no way at this moment to create that file directly from KDEPrint. So to create global instances, just do as if you were handling local instances, and when finished, simply copy your local instance file to the global location. The syntax of instance file is line-based, so it's also easy to merge 2 existing files. When the same instance exists in the global and local file, the local instance overrides the global one.
Using KDEPrint outside KDE
Is KDEPrint for KDE usage only?
No. You may use it in any non-KDE program that allows you to specify a "print command".
Can I use KDEPrint together with GNOME?
Yes. We even know some GNOME developers who use the "kprinter" utility on a day-to-day basis for their printing needs...
How do I use KDEPrint in Netscape?
Click on the "Print" icon (or select File... --> Print... from the menue bar -- or hit the [Alt]+[P] shortcut.) In the opened print dialog you'll see the presently active print command.
Edit it to read "kprinter" (maybe you need to use the full path, f.e. /opt/kde2/bin/kprinter). Click [Print]. This will pipe the Netscape-generated PostScript-output into "kprinter", which will then open its dialog box. Choose your settings. Then print.
Netscape will remember this. Next time "kprinter" will automatically be called. If you have many printers you can pre-select the "Netscape default printer" by adding the "-d"-option to the kprinter print command. (i.e. entering as the print command f.e. "/opt/kde2/bin/kprinter -d infotec4700MF" will bring up my infotec4700MF printer preselected in the kprinter dialog for every print from Netscape. I could still easily select another model from there if I need to...)
How do I use KDEPrint in Galeon?
Click on the "Print" icon (or select File... --> Print... from the menu bar -- or hit the [Ctrl]+[P] shortcut.) In the opened print dialog you'll see a line with the presently active Printer:.
Edit it to read "kprinter" (maybe you need to use the full path, i.e. /opt/kde2/bin/kprinter). Complete your other necessary settings (like your paper size, etc.). Click [Print]. This will pipe the Galeon-generated PostScript-output into "kprinter", which will then open its dialog box. Choose your settings. Then print.
Galeon will remember this. Next time "kprinter" will automatically be called, if you want to print from Galeon. If you have many printers you can pre-select the "Galeon default printer" by entering the print command with the "-d"-option; i.e. "/opt/kde2/bin/kprinter -d digimaster9110".
How do I use KDEPrint in Mozilla?
Click on the "Print" icon (or select File... --> Print... from the menu bar -- or hit the [Ctrl]+[P] shortcut.) In the opened print dialog you'll see the presently active print command.
Edit it to read "kprinter" (maybe you need to use the full path, i.e. /opt/kde2/bin/kprinter). Click [Print]. This will pipe the Mozilla-generated PostScript-output into "kprinter", which will then open its dialog box. Choose your settings. Then print.
Mozilla will remember this. Next time "kprinter" will automatically be called. If you have many printers you can pre-select the "Mozilla default printer" by entering the print command with the "-d"-option; f.e. "/opt/kde2/bin/kprinter -d danka5000color".
How do I use KDEPrint in StarOffice 5.2?
Start StarOffice's Printer Administration Tool spadmin as root. (On my system it is located at /opt/office52/program/spadmin.) This opens the dialog box for printer administration. Click on [Connect...].Edit the dialog box to achieve a resulting command line of
default_queue=/opt/kde2/bin/kprinter
Maybe you need to select the "Generic Printer" first from the list of "Installed Printer Drivers" in the lower half of the dialog window. This printer is generating PostScript.
At the end of your clicks and keyboard hits, there should be visible a Generic Printer on Queue default_queue=/opt/kde2/bin/kprinter amongst the list of "Configured Printers". Click on [Default Printer] to make it your default. Click on the "Print" icon (or select File... --> Print... from the menu bar -- or hit the [Alt]+[P] shortcut.) In the opened print dialog you'll see the presently active print command.
Edit it to read "kprinter" (maybe you need to use the full path, f.e. /opt/kde2/bin/kprinter). Click [OK]. This will pipe the StarOffice-5.2-generated PostScript-output into "kprinter", which will then open its dialog box. Choose your settings. Then print.
How do I use KDEPrint in the Gimp?
First off: We do not recommend to sidestep the Gimp-Print drivers! (But sometimes you might have no other choice. Read on.)
If you print from the latest Gimp-Print plugin (Version 4.2 has just been released [Nov. 2001] and might not yet be part of your Gimp installation), this plugin has direct support for more than 130 printers (and nearly 300 through emulations, see the list of gimp-print-driven models on www.linuxprinting.org). Read the Gimp-Print User Manual for the exact settings and how to proceed if you want to use the Gimp-Print drivers from within the print-plugin.
Inside the plugin, all data are prepared in a "final" format so they can be digested directly by the printer: They therefor need to be sent as "raw". Sending this to the kprinter command would simply not result in pages printed...
There is, however, a case to leave this above re-commended method to print from within the Gimp print-plugin: that is...
- ...if your printer is not directly supported by the print-plugin, or
- ...if you are using another driver/filter package for this printer (i.e. the Shareware "TurboPrint" driver package or the proprietary Lexmark filters for some of their "Z31",..."Z53" series).
In this case, proceed as described below. In the print-plugin dialog (right-click on your file opened in the Gimp, select File... --> Print...), you need to follow these steps:
- select the tab "Printer Settings"
- choose the target printer in the drop down menue "Printer Name:"
- click on "Setup Printer..."
- choose as the "Printer Model:" from the drop-down menue the "PostScript Level 2" model
- type in the field "Command:" the "kprinter" command (probably a full path like "/opt/kde2/bin/kprinter" is needed)
- delete any "PPD File:" that might be selected in the fileld underneath the "Command:"
- click [OK]
- go to the Gimp print-plugin tab called "Image / Output Settings"
- select your needed options (those depend on the printer)
- save your printer settings by clicking on [Save Settings]
- selecting [Print] will pipe the Gimp-generated PostScript into the "kprinter" dialog, where you can now choose another one of your printers and also select some settings, specific to your printer or to the KDEPrint framework...
(Note: this is the description for the Plugin-version 4.2 which everybody is recommended to use, because it has great drivers that produce photographic quality on many inkjet models... Older plugins will vary, but still you'd need to select the "PostScript Level 2" printer and then edit the print command as indicated above.)
How do I use KDEPrint in Acrobat Reader?
Click on the "Print" icon (or select File... --> Print... from the menu bar -- or hit the [Ctrl]+[P] shortcut.) In the opened print dialog you'll see the presently active Printer Command.
Edit it to read "kprinter" (maybe you need to use the full path, f.e. /opt/kde2/bin/kprinter). Check or choose the other settings offered in this dialog. They will determine the PostScript generated by Acrobat Reader. Then click [OK]. This will pipe the Acrobat Reader-generated PostScript-output into "kprinter", which will then open its dialog box. Choose your printer-specific settings there (like duplex, staples etc.). Then print.
Acrobat Reader will not remember this. After your next re-start of Acrobat Reader your newly set print command "kprinter" for this application will be lost.
[QUESTION: Is there anybody who can tell me how you can make this setting permanent?]
How do I use KDEPrint in gv?
Start gv (for those of you who don't know: it is a PostScript- and PDF-Viewer that also allows you to print...). Click on State --> Setup Options.... A window opens with a big range of configurable gv settings. Lokk fokr the field named "Print Command". Edit it to read "kprinter" (possibly you might need to use the full path, f.e. /opt/kde2/bin/kprinter). Then click [Apply], [Save] and finally [Dismiss] to close this dialog box.
How do I use KDEPrint in GNOME?
All GNOME applications I have used so far let you edit the print command they use. So you can always insert "kprinter" there (maybe you need to use the full path, f.e. /opt/kde2/bin/kprinter). Check or choose the other settings offered in the original GNOME dialog. For example, choose the margins and the papersize there, as it is determining the PostScript file that is generated by the GNOME app and then handed over to "kprinter" for the other settings.
I am currently a GNOME-only user, but now I want to use KDEPrint, without having to do a full KDE-2 installation: What are the minimum installation requirements if I want to take advantage of your new utilities?
Install the two packages kdelibs and kdebase. This should be all. -- Be prepared, due to the nature of KDE and KDEPrint, that quite a few KDE Libraries need to be loaded in order for "kprinter" to run and work. But we are sure you will enjoy its features...
Troubleshootings
I am using CUPS as a backend and I'm sure there are printers installed in CUPS, but they don't appear in kprinter. What is wrong?
Make sure that the "CUPS" backend is the current selection in the drop-down widget that allows for this selection. For doing this, in the main window of kprinter, expand the "Options" dialog section and look for the "Print system currently used". Make sure "CUPS" is selected.
I always get the message "print daemon cannot be contacted". What can I do?
Check that you have the files $KDEDIR/lib/kde3/kded_kdeprintd.so and $KDEDIR/share/services/kded/kdeprintd.desktop installed on your system, it seems that some RPM packages for SuSE are missing the second one. Otherwise, logout, go to console mode (Ctrl+Alt+F1) and check that you don't have any garbage KDE process running (dcopserver, kdeinit). Kill them if necessary. Then login and try again.
Why doesn't the enscript filter work?
It seems that the enscript filter is broken in KDE-2.2.x. This should be fixed in KDE-3.
I'm using LPR (or similar) and my printers are shown with aliases and/or garbage data from the printcap file. Why?
These problems appear if you're using the plain LPR plugin of KDEPrint. Try with the "Generic UNIX LPD" plugin, these problems shouldn't appear.
I'm using a NIS server to get my printers. Is it supported?
Not yet. KDE-3 will contain some very basic NIS support for the LPRng system.
[ Edit ]
KDEPrint Homepage