• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
re: ps2pdf -->strange behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: ps2pdf -->strange behavior


  • Subject: re: ps2pdf -->strange behavior
  • From: Bastiaan Boertien <email@hidden>
  • Date: Fri, 14 Jan 2005 16:31:34 +0100

Op 14-jan-05 om 15:32 heeft Barry Wainwright het volgende geschreven:

On 14/1/05 2:15 pm, "Bastiaan Boertien" <email@hidden>
wrote:

Hello list

I've installed Ghostscript on my PowerBook to make a PDF file from a
postscript file from quark.

If I do this:

set theFolder to POSIX path of "Macintosh HD:"
set PSFile to "<thefile>.ps"
set PDFFile to "<thefile>.pdf"


do shell script "cd " & (POSIX path of theFolder) & "; ps2pdf -r72 " &
(PSFile) & " " & (PDFFile)

then the script will return this:

tell current application
do shell script "cd /; ps2pdf -r72 <thefile>.ps <thefile>.pdf"
"sh: line 1: ps2pdf: command not found"

When I copy "cd /; ps2pdf -r72 <thefile>.ps <thefile>.pdf" and paste it in a
new terminal window, ps2pdf will work and i will get an pdf.

Does anyone know this problem? Or know how to solve this problem?

Greetings Bastiaan


'do shell script' uses a different shell to the terminal. It is likely that
these two shells have different $PATH variables set up. Easiest bet is to
call the script with the full path of ps2pdf.

--
Barry



Hello Barry and list

I have already tried it like this:

set PSFile to POSIX path of "Macintosh HD:<thefile>.ps"
set PDFFile to POSIX path of "Macintosh HD:<thefile>.pdf"


do shell script "ps2pdf -r72 " & (PSFile) & " " & (PDFFile)

and still the same error

tell current application
do shell script "ps2pdf -r72 /<thefile>.ps /<thefile>.pdf"
"sh: line 1: ps2pdf: command not found"

When I put a wrong input file it will return "No such file or directory" so I don't think that the shell fail because of the path.

Greetings Bastiaan
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • re: ps2pdf -->strange behavior
      • From: Richard Smykla <email@hidden>
  • Prev by Date: Re: resize artboard in Illustrator CS
  • Next by Date: The Pope of Applescript is at Macworld- last day today
  • Previous by thread: ps2pdf -->strange behavior
  • Next by thread: re: ps2pdf -->strange behavior
  • Index(es):
    • Date
    • Thread