【发布时间】:2017-06-02 12:55:13
【问题描述】:
我目前在 macOS Sierra 上使用 Adobe Acrobat Pro DC 2015.23。 我的目标是创建执行此类操作的 AppleScript:
- 打开 PDF 文件
- 将此文件保存为 pdf-x 格式
- 关闭文件
我创建了 AppleScript,它完成了所有步骤,但我找不到任何文档如何选择 PDF 标准以在保存时使用。
如果我想手动执行此操作,请执行以下步骤:
- 在 Adobe Acrobat 中打开 PDF
- 选择 PDF 标准菜单
- 单击(另存为 PDF/X)
- 按保存
问题是如何在保存的同时设置 PDF/X 标准。
我的脚本
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
set theFiles to choose file with prompt "Select the files" of type {"pdf"} with multiple selections allowed
set aaRunning to is_running("Adobe Acrobat")
tell application "Adobe Acrobat"
repeat with theFile in theFiles
open theFile without dialogs
save active doc to theFile
close active doc
end repeat
if not aaRunning then
quit
end if
end tell
【问题讨论】:
标签: pdf automation applescript acrobat