[kde] Printing via Konqueror

James Richard Tyrer tyrerj at acm.org
Sat Mar 20 23:58:05 GMT 2004

Des Dougan wrote:
> In that other OS, I can select files, right click and select "Print"
> (with the default application). Can I do this in Konq? I can't see a
> menu option to allow me to do this.

Please disregard previous ideas that don't work.

Having researched this a little, I did get it to work with OpenOffice.

Place this file in: "$HOME/.kde/share/apps/konqueror/servicemenus/"

[Desktop Entry]

[Desktop Action Print_OO]
Name=Print file
Exec=$HOME/OpenOffice.org1.1.0/soffice -p %F


{make any minor changes to the path in the: "Exec" line.

This does work on my system.

Note that if you wish to print other OpenOffice file types, just add the 
needed MIME types to the: "ServiceTypes=" (use ";" as the delimiter -- NO 

Printing a PDF file is a much different issue.

I don't think that AAR will do this and you don't need it to do it.

In any case, you need to add a similar "*.desktop" file to your global 
"servicemenus" directory: "$KDEDIR/share/apps/konqueror/servicemenus/":

[Desktop Entry]

[Desktop Action Print_PDF]
Name=Print file
Exec=<command> %F


I hope that you can see a patten here.  The names must be unique and the 
MIME type must be the correct MIME type.  The only question is what to use 
as the <command>.

NOTE: I think that KDE should have this capability built in and you might 
want to file a wish request for it:


There appear to be two possible ways to do this.

1.	The print filter could be setup to directly print PDF files.  Yours
	might be able to do this, but I find that the one on my system
	(GNUlpr) isn't.  If it was, you could just use the printer command
	(e.g. "lpr") for <command>.

2.	You can write a shell script that will print the PDF file directly.
	Use GhostScript to convert the file to PS and then print it, and
	use the script name (e.g. "print_pdf") as the command.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

More information about the kde mailing list