KDE Printing in Mozilla

Once again, this information isn't mine and I am just putting it in here to keep it handy.

Please note: I can say for a fact that the following works with Mozilla, Red Hat Linux 8.0, & KDE. However, your mileage may vary.

If you try to print using Mozilla, it only prints to the default printer. If you've only got one printer, this isn't really a big deal. But if you're like me, and you use a laptop with several printers defined, this can be a pain. You either have to (1) print to a Postscript file in Mozilla, and then open the Postscript file & print that (or convert the Postscript file to PDF and then open the PDF & print that), or (2) open the Red Hat printer chooser, make a different printer the default, & then print using Mozilla (& then remember to change the default back later). Either way is too much work.

Contrast the above with the way that KDE applications print. All KDE apps pass along the print request to Kprinter, which is a really nice front end for printing. You can choose any of the printers you've defined already, or print directly to Postscript or PDF, or print to PDF & have Kmail email the resulting PDF, and many other neat things.

kprinter.gif: Kprinter, the printing manager for KDE

Fortunately, you can have the best of both worlds. You can configure Mozilla to pass along its print jobs to Kprinter, which gives you a lot more options when printing. Here's what you do:

1. Open Mozilla & go to a page you'd like to print. Go to File > Print.

2. In the Print dialog box, click on the Properties... button.

3. In the Printer Properties dialog box, change the Print Command from "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}" to "kprinter --stdin" (without quotation marks).

4. Click OK to close Printer Properties dialog box, & then click Print to close the Print dialog box.

5. You'll see Mozilla 'printing', & then Kprinter should open up. Make the appropriate choices, & then click Print. Your page should print.

Now you've got a fantastic Web browser and a great printing system. Enjoy!

[url=http://www.granneman.com/webdev/browsers/mozillanetscape/linuxspecific/kdeprintinginmozilla/]Original Article[/url]