Re: Creating PDFs with Ghostscript
Re: Creating PDFs with Ghostscript
- Subject: Re: Creating PDFs with Ghostscript
- From: Simon Topliss <email@hidden>
- Date: Sat, 01 Feb 2003 10:51:24 +0000
Thanks to all who replied, on and off-list.
So to summarise, in case anyone else has the same issue, Alexander
Sauer-Budge's suggestion looks the most concise:
do shell script "PATH=/usr/local/bin:$PATH; ps2pdf13 file.ps file.pdf"
His assumption being "...that 'do shell script' is using 'bourne shell', sh,
which has different syntax than the c-shell, csh."
Chris Nebel's reply has the same approach:
>
See <http://developer.apple.com/technotes/tn2002/tn2065.html>, question
>
#1. However, that doesn't address the full problem (yet; I'm revising
>
it); you've got a script that you don't control (i.e., ps2pdf13) that's
>
relying on a redefined PATH, so specifying the full path to ps2pdf13
>
only gets you past one hurdle.
>
>
In this case, you'll need to redefine PATH for this command. There are
>
a few ways to do this, but probably the easiest is to use a feature of
>
sh:
>
>
do shell script "PATH=
>
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/
>
X11R6/bin: ps2pdf13"
>
>
The stuff before "ps2pdf13" redefines PATH for that one command. (The
>
same technique works for any variable; see the sh man page for more
>
details.
The suggestions clearly illustrate that the solution is to define the PATH
before using the command in the 'do shell script' (and to read the tech
notes and man pages before posting questions to the list!).
A couple of people suggested trying MacGhostView (and its 'ps2pdf' droplet),
which is what got me started on my quest to work out for myself how to
create PDF's using Ghostscript. At only $20, I'd recommend it to anyone who
just needs simple solution for one user. I'm writing an internal solution
for 100+ users, so if I can find a free way to create PDF's, it's worth me
spending some time working it out.
Thanks again,
Simon
"Some are bourne to unix, others have unix thrust upon them." - me.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.