
ps2pdf Service Menu
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
An update of CL Hong's ps2pdf service menu that addresses some of its problems and limitations. In particular, this version handles multiple filenames, saves PDFs in a sensible location, and responds correctly to "Cancel".
I've also changed the menu options substantially. There is now an option simply to convert FILE.ps to FILE.pdf (bypassing the "save as..." dialog).
A simple install script is included for installation.
The .desktop file and shell script must be installed into ~/.kde/share/apps/konqueror/servicemenus/, as the location of the shell script had to be hardcoded into the desktop file. If, for some reason, you wish to install the script into a different location, or if for some other reason your OS does not parse this properly, you will need to change the path in the desktop file.
You need to have ps2pdf in your path.
Translations welcome.
14 years ago
0.1: Initial release
0.2, stopped using `dirname %k` to find the script location, because %k is too unreliable. The downside is that the location of the script now has to be hard-coded.
14 years ago
0.1: Initial release
0.2, stopped using `dirname %k` to find the script location, because %k is too unreliable. The downside is that the location of the script now has to be hard-coded.
BorgQueen
14 years ago
Report
rgheck
14 years ago
Report
BorgQueen
14 years ago
Could not find the program '`dirname'
I've checked and its in my /usr/bin, so it should find it.
Report
rgheck
14 years ago
Further testing has revealed an occasional problem with how I was trying to find the location of the script file. I've made a change that should prevent this problem. Let me know if it doesn't work for you.
By the way, if you do have this kind of problem (with this script or a different one), the way to debug it is to start Konqueror from a terminal. You'll get more informative error messages there whenever something goes wrong.
Report
BorgQueen
14 years ago
Could not find the program '~/.kde/share/apps/konqueror/servicemenus/ps2pdf.sh'
Report
rgheck
14 years ago
If the shell script is in the correct location, then some other error is causing the shell script itself to fail. As I said, you get the "program not found" message on any failure. It would be nice if Konqueror provided a little more information, but it doesn't, so we'll have to sort this out some other way.
One way is to run the shell script manually. So find yourself a PS file and run something like:
#~/.kde/share/apps/konqueror/servicemenus/ps2pdf.sh /path/to/my.ps
and see what happens. What ought to happen is that you get /path/to/my.pdf.
The other option is to start Konqueror from a terminal and then try using the service menu. You'll get better diagnostics that way.
Let me know what happens.
Report
BorgQueen
14 years ago
So the script works, its the ps2pdf.sh that seems to have the problem.
Report
BorgQueen
14 years ago
Report