KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    Linux42.org    OpenSkillz.com   


- Content .- Fans  .- Knowledge Base  . 

ps2pdf service menu


KDE Service Menu

Score 50%
ps2pdf service menu

Link:  http://
Minimum required   KDE 3.2.x
Downloads:  1484
Submitted:  Nov 9 2004
Updated:  May 6 2005


This is a service menu for converting postscript files to acrobat pdf files. It make use of the program ps2pdf. It has been tested to work on KDE 3.2.3 on Debian Sarge. Also tested on KDE 3.4
in Ubuntu (Kubuntu) Hoary 5.04
Dependency: ps2pdf , available in most ghostscript packages (gs-common in debian).

To use this file, simply unzip this file and put into the directory /home/username/.kde/share/apps/konqueror/servicemenus

(substitute username with your own username)

Inspired by Aaron J. Seigo,'s article on howto create a service menu,
and the service menu of pdftk (a tool for combining multiple pdf files) http://www.accesspdf.com/pdftk/

Limitation: Only converts 1 file at a time, Cancel does not work with kdialog, pdf file still saved in home folder


version 0.1: initial public release
version 0.2: file dialog save to extension *.pdf
version 0.3: support for long filename with spaces

Send to a friend
Other  Apps  from clhong
Report inappropriate content


 No File Dialog Box

 by assfaceJackson2 on: Feb 17 2005
Score 50%

If you have genital warts like me and you don't want to have to select a filename to convert the file to pdf, can you replace the Exec action to the following:

Exec=ps2pdf %U `echo "%u" | sed -e 's/.ps/.pdf/g'`

Reply to this


 Re: No File Dialog B

 by Yama on: Mar 14 2005
Score 50%

Here's a better version:

ps2pdf "%u" "`echo "%u" | sed -e 's/.ps/.pdf/g'`"

This version has some benefits over the one in the parent post and the original version. Firstly, it works with long filenames (the parent post doesn't).

Secondly, like the parent version it is totally automatic. There is no prompting for a filename; the original name is kept but the extension changes to pdf. Since we're in KDE, renaming the new file is easy (there's no need to prompt). This feature also allows many PDF files to be created at once. Just select as many .ps files as you want and run this service on them. Easy.

Reply to this


 Re: Re: No File Dialog B

 by tyrerj on: Mar 31 2005
Score 50%
JRT Engineering

IIUC the output file name is optional.

So, all you need is:

ps2pdf %F


Reply to this


 Re: Re: Re: No File

 by ncarver on: Jul 15 2006
Score 50%

While ps2pdf with one argument works as desired on the command line, it fails for me in a service menu (KDE 3.4.2).

The sed-based versions work fine, but neither one appears to be quite correct. The first problem is that the substitute command takes a regexp as its first argument. This means that the "." in the pattern means to match any single char--not to literally match a dot. Try running this on a file with a name like testps.ps and see what happens! To fix this, you need to escape the dot like this:
sed -e 's/\.ps/.pdf/'

The second problem is that the "g" option means to apply the substituation globally, so multiple substitutions may take place--probably not what you want.

The final possible problem is that correcting the "." will still not necessarily limit this to being applied to an extension which is what you might want. This can be accomplished by using a "$" in the regexp to denote that the .ps must be at the end of the filename:
(need to protect the $ inside of double quotes, but \ didn't work for some reason, though doubling the $'s did--not sure why).

Now I wanted something more complex to happen with filenames, so that a final .ps would get changed to .pdf, but also: (1) if there were no extension a .pdf would be added and (2) if the .ps "extension" was not final it would get changed to .pdf (e.g., test.ps.save would become test.pdf.save). To accomplish this I ended up with:
Exec=ps2pdf %f "`echo %f | sed -e 's/\.ps$$/.pdf/p' -e '/\.pdf$$/ d' -e 's/\.ps\./.pdf./p' -e '/\.pdf\./d' -e 's/$$/.pdf/'`"

(Translation: if .ps is at the end of the filename, replace it with .pdf, if .pdf was put at end then done, else look for first .ps. in filename and replace with .pdf., if .pdf. inserted then done, else add .pdf to end of filename. If there is a simpler way to do this with sed I didn't see it!)

Reply to this


 Re: No File Dialog B

 by clhong on: Apr 26 2005
Score 50%

This doesn't work in KDE 3.4 in Ubuntu 5.04 , so I changed version 0.3 without file dialog box back to version 0.2 with file dialog box. I know it is a bit of hassle but hey you just need to click SAVE, or press ENTER in the keyboard a number of times if you select to convert a few files at the same time. Plus you get to choose where to save the pdf file and the filename as well.

Reply to this

Add commentBack

How do you like Plasma 5?
 The best KDE Desktop ever.
 Definitely a nice improvement.
 Not decided yet. Haven't tried it yet.
 I do not like some of the changes.
 KDE is taking the wrong way.
 I am still sticking with KDE 3.5.
 I have no opinion, but wanted to vote anyway.

 Who we are
More about us
Frequently Asked Questions
Updates on identi.ca
Updates on Twitter
Content RSS   
Events RSS   

Add App
Public API
About KDE-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Sponsor us
Report Abuse

Copyright 2003-2016 KDE-Apps.org Team  
All rights reserved. KDE-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.