Myreader.co.uk  
uk news, chat and community
   home   |   control panel login   |   archive   |  
 
comp
graphics.flash
homebuilt
home-networking
misc
os.linux
peripherals.misc
sys.laptops
sys.mac
sys.palmtops
sys.sun
training
vendors
  
 
date: Mon, 9 Jun 2008 15:03:00 +0100,    group: uk.comp.os.linux        back       
PS to PDF   
Last year, when I was running Mandriva with KDE, I had a menu item when
right-clicking in konqueror on a .ps file along the lines of "convert to
PDF", which I assume is a KDE encapsulation of ps2pdf. 

Now, using Debian Etch, I'm not seeing that entry. Has anyone any idea on
how to enable it, please?

-- 
Tony van der Hoff       | mailto:news_0711@vanderhoff.org
Buckinghamshire, England
date: Mon, 9 Jun 2008 15:03:00 +0100   author:   Tony van der Hoff

Re: PS to PDF   
In article ,
Tony van der Hoff   wrote:
>Last year, when I was running Mandriva with KDE, I had a menu item when
>right-clicking in konqueror on a .ps file along the lines of "convert to
>PDF", which I assume is a KDE encapsulation of ps2pdf. 
>
>Now, using Debian Etch, I'm not seeing that entry. Has anyone any idea on
>how to enable it, please?

I don't know if there's a package with the option in, but you
can create your own context menus pretty easily.  In this case
you just need the following in a .desktop file, something like
.kde/share/apps/konqueror/servicemenus/ps2pdf.desktop
and then "Print to PDF" will appear under the Actions context menu for
all Postscript files:

[Desktop Entry]
ServiceTypes=application/postscript
Actions=Print to PDF

[Desktop Print to PDF]
Name=Print to PDF
Icon=kpdf.png
Exec=ps2pdf %F

Nick
-- 
Serendipity: http://www.leverton.org/blosxom (last update 6th June 2008)
        "The Internet, a sort of ersatz counterfeit of real life"
                -- Janet Street-Porter, BBC2, 19th March 1996
date: Mon, 9 Jun 2008 20:04:27 +0000 (UTC)   author:   Nick Leverton

Re: PS to PDF   
On 9 Jun at 21:04 Nick Leverton  wrote in message
<g2k2cb$rks$1@leverton.org>

> In article , Tony van
> der Hoff   wrote:
> > Last year, when I was running Mandriva with KDE, I had a menu item when
> > right-clicking in konqueror on a .ps file along the lines of "convert to
> > PDF", which I assume is a KDE encapsulation of ps2pdf.
>>
> > Now, using Debian Etch, I'm not seeing that entry. Has anyone any idea
> > on how to enable it, please?
>
> I don't know if there's a package with the option in, but you can create
> your own context menus pretty easily.  
[snip]

Woo, that's clever! I knew KDE was good, but that's brilliant! Thanks very
much for the tip, Nick.

>
> [Desktop Print to PDF] 

Minor criticism, Should be: [Desktop Action Print to PDF]

Thanks again,
-- 
Tony van der Hoff       | mailto:news_0711@vanderhoff.org
Buckinghamshire, England
date: Tue, 10 Jun 2008 10:37:10 +0100   author:   Tony van der Hoff

Re: PS to PDF   
In article ,
Tony van der Hoff   wrote:
>On 9 Jun at 21:04 Nick Leverton  wrote in message
><g2k2cb$rks$1@leverton.org>
>> I don't know if there's a package with the option in, but you can create
>> your own context menus pretty easily.  
>[snip]
>
>Woo, that's clever! I knew KDE was good, but that's brilliant! Thanks very
>much for the tip, Nick.

You're welcome !  I find .desktop files are very handy for little
repetitive tasks in the file browser but which aren't worth writing a
script for, with the need to remember its name and parameters each time.

If you want to create system-wide context menus for all users, you can
put them in /usr/local/share/apps/konqueror/servicemenus/ and then set
KDEDIRS=/usr/local in /etc/environment (or other place where it will be
set before KDE is loaded).

Or of course put them straight into
/usr/share/apps/konqueror/servicemenus/ but then they are harder to find a
year down the line, and at risk of getting lost when rebuilding machines.

>> [Desktop Print to PDF] 
>
>Minor criticism, Should be: [Desktop Action Print to PDF]

Indeed it should, and not sure why I posted wrongly as it's correct in
the trial desktop file I created.  Must have copied it to the clipboard
at an "intermediate" state of editing i.e. before it worked !  I hope
it didn't cause you too much trouble to find that out.

Nick
-- 
Serendipity: http://www.leverton.org/blosxom (last update 6th June 2008)
        "The Internet, a sort of ersatz counterfeit of real life"
                -- Janet Street-Porter, BBC2, 19th March 1996
date: Tue, 10 Jun 2008 12:36:36 +0000 (UTC)   author:   Nick Leverton

Re: PS to PDF   
On Tue, 10 Jun 2008 12:36:36 +0000 (UTC), 
   	       	    Nick Leverton  wrote:
> In article ,
> Tony van der Hoff   wrote:
>>On 9 Jun at 21:04 Nick Leverton  wrote in message
>><g2k2cb$rks$1@leverton.org>
>>> I don't know if there's a package with the option in, but you can create
>>> your own context menus pretty easily.  
>>[snip]
>>
>>Woo, that's clever! I knew KDE was good, but that's brilliant! Thanks very
>>much for the tip, Nick.
>
> You're welcome !  I find .desktop files are very handy for little
> repetitive tasks in the file browser but which aren't worth writing a
> script for, with the need to remember its name and parameters each time.

It is probably a little better to write a wrapper script around ps2pdf
so that the output PDF is in the same directory as the postscript input.
I don't like things being dumped in my home directory.  Whilst doing
that it is fairly easy to add conversion of multiple files as well.

I think the following will give you the bare bones of such a script.

#!/bin/bash

for IN in $@; do
   OUT=${IN%.*}.pdf
   ps2pdf $INFILE $OUTFILE
done



-- 
Andy Leighton => andyl@azaal.plus.com
"The Lord is my shepherd, but we still lost the sheep dog trials" 
   - Robert Rankin, _They Came And Ate Us_
date: Tue, 10 Jun 2008 08:29:54 -0500   author:   Andy Leighton

Re: PS to PDF   
On Tue, 10 Jun 2008 08:29:54 -0500, Andy Leighton  wrote:
> #!/bin/bash
>
> for IN in $@; do
>    OUT=${IN%.*}.pdf
>    ps2pdf $INFILE $OUTFILE
> done

Stupid, stupid, Andy.  Change the penultimate line to
ps2pdf $IN $OUT

That is what happens when you get a phone call in the middle of writing
a reply.

-- 
Andy Leighton => andyl@azaal.plus.com
"The Lord is my shepherd, but we still lost the sheep dog trials" 
   - Robert Rankin, _They Came And Ate Us_
date: Tue, 10 Jun 2008 08:35:09 -0500   author:   Andy Leighton

Re: PS to PDF   
On 10 Jun at 14:29 Andy Leighton  wrote in message


> On Tue, 10 Jun 2008 12:36:36 +0000 (UTC),
>   	       	    Nick Leverton  wrote:
> > In article , Tony
> > van der Hoff   wrote:
> > > On 9 Jun at 21:04 Nick Leverton  wrote in message
> > > <g2k2cb$rks$1@leverton.org>
> > > > I don't know if there's a package with the option in, but you can
> > > > create your own context menus pretty easily.
> > > [snip]
>>>
> > > Woo, that's clever! I knew KDE was good, but that's brilliant! Thanks
> > > very much for the tip, Nick.
>>
> > You're welcome !  I find .desktop files are very handy for little
> > repetitive tasks in the file browser but which aren't worth writing a
> > script for, with the need to remember its name and parameters each time.
>
> It is probably a little better to write a wrapper script around ps2pdf so
> that the output PDF is in the same directory as the postscript input. I
> don't like things being dumped in my home directory.  Whilst doing that it
> is fairly easy to add conversion of multiple files as well.
>
I achieved this effect with a small modification to Nick's original
.desktop:

Exec=ps2pdf %F %F.pdf

[snip]


-- 
Tony van der Hoff       | mailto:news_0711@vanderhoff.org
Buckinghamshire, England
date: Tue, 10 Jun 2008 15:41:02 +0100   author:   Tony van der Hoff

Google
 
Web myreader.co.uk


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us