我有一个AppleScript,它将InDesign中的活动文档导出到桌面上的PDF。
--this script exports all opened InDesign document as PDFs
set my_destination to (path to desktop) as string
tell application id "com.adobe.InDesign"
activate
--next line collects all current PDF export presets
set my_pdf_export to get the name of every PDF export preset
--next line makes you choose which preset to use for ALL opened InDesign documents
set my_pdf_choice to (choose from list my_pdf_export) as string
--loop starts here
repeat with this_doc in (active document)
--next line gets the name of the active InDesign document
set doc_name to get name of this_doc
--next 3 lines perform the actual PDF export
tell this_doc
export format PDF type to my_destination & (characters 1 thru -6 of doc_name) & ".pdf" using my_pdf_choice without showing options
end tell
end repeat
end tell在导出之前,脚本提示输入PDF预置选择。
我希望脚本只导出活动文档的活动页面。
我尝试过一些事情,比如用active页面替换"active document“,但是我对AppleScript不太了解。
有什么想法吗?
发布于 2014-02-11 15:21:58
看起来您是从这个麦切斯特的问题获得代码的,代码已经在脚本中了。您只需设置InDesign的page range‘s PDF Export Preferences
tell PDF export preferences
set page range to "1, 3-5"
end tell只需确保将其设置在末尾,因为这是一个持久的应用程序设置。
tell PDF export preferences
set page range to all pages
end tellhttps://stackoverflow.com/questions/21629877
复制相似问题