Acrobat Distiller をコマンドで起動
Mac OS X Mountain Lion で Acrobat XI Pro を使用しています。
Acrobat Distiller をコマンドラインで起動する方法を Acrobat Web で検索して
AcroDit.exe /o inFile.ps outFile.pdf
を見つけたのですが、Windows 用です。Mac 用が見つからない。
(質問1)
/Applications/Adobe Acrobat XI Pro/Acrobat Distiller.app がありますす。
例えば AcroDit /o inFile.ps outFile.pdf のような形でコマンドラインで起動する方法をお教えねがいます。
(質問2)
goodle で検索しところ次が見つかった。
http://www.tug.org/pipermail/macostex-archives/2010-February/042766.html
これに従ってファイルを作った。
acrodist.scpt
-------------
on run argv
with timeout of (8 * 60) seconds
tell application "Acrobat Distiller"
Distill sourcePath item 1 of argv
end tell
end timeout
end run
-------------
acrodist
------------
#! /bin/sh
osascript ~/bin/acrodist.scpt $1
------------
実行結果
satouy$ ./acrodist
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/osascript) is code signed with entitlements
/Users/satouy/bin/acrodist.scpt:92:140: execution error: Can’t get item 1 of {}. (-1728)
エラーが発生します。解決方法を教えていただけないでしょうか?
AppleScript は初めてなのでよろしくお願いします。
Mac Pro (Mid 2012), OS X Mountain Lion (10.8.2)