首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >将活动页面导出到PDF (AppleScript + InDesign)

将活动页面导出到PDF (AppleScript + InDesign)
EN

Stack Overflow用户
提问于 2014-02-07 14:09:59
回答 1查看 3K关注 0票数 0

我有一个AppleScript,它将InDesign中的活动文档导出到桌面上的PDF。

代码语言:javascript
运行
复制
--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不太了解。

有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-02-11 15:21:58

看起来您是从这个麦切斯特的问题获得代码的,代码已经在脚本中了。您只需设置InDesign的page range‘s PDF Export Preferences

代码语言:javascript
运行
复制
tell PDF export preferences
    set page range to "1, 3-5"
end tell

只需确保将其设置在末尾,因为这是一个持久的应用程序设置。

代码语言:javascript
运行
复制
tell PDF export preferences
    set page range to all pages
end tell
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21629877

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档