Hi Martin,
Martin DeMello said:
Thanks, I'll dig into that. Is it guaranteed that ghostscript will make
a registry entry when it's installed, do you know?
Assuming that the installation procedures get properly executed,
yes, I am reasonably sure that the registry entry will be there.
I'm optimistic about this because cutepdf
[
http://www.acrosoftware.com/Products/CutePDF/writer.asp]
says it'll autodetect a ghostscript installation; I just didn't know how it was
done.
Don't know how they do it but thanks for the link. Will check it out.
I meant that the installation does not seem to add the component to
the path so the end-user has to do it manually. And any time there is
manual intervention, things be messed up ;-)
So, in my case, for example I have installed GS but did not add it to
the path. OTOH, you may add it to the path and then uninstall GS.
Relying on the PATH environment variable will be risky.
I don't get this bit. What I meant was, need a solution depend on gs
being in the path, and test directly if I can run ps2pdf or if it
returns an error.
Again, if you run ps2pdf and the test comes back with error it does
NOT imply that the s/w is not installed.
Hope I'm not missing the point.
Coming along very nicely, and yes, it's doing pdfs too (once I figured
out I had to call "ps2pdf.bat" rather than "p2spdf"). Right now it relies
^^^^^^^^^
He he, saw your tip on this a while back ;-)
on the fact that both ps2pdf.bat and gswin32.exe are in my path, which
from the point of view of a non-techie user is suboptimal; I'm looking
into autodetecting the ghostscript install and adding it to ENV['PATH']
before calling system().
Then registry is the way to go ... but still "guaranteed" is too strong a
word.
You can see the code and sample output at
http://zem.novylen.net/ruby
Cool ! Thanks will check it out.
-- shanko
PS> Did not know your IITB (sorry IITM) lineage