访问 Adobe InDesign 文件
我需要针对以下问题的一些指导:
我有很多 InDesign 文件,并且必须设置一个进程来跟踪某个段落或文本块在文件的不同版本之间是否已更改。如果文本块已更改,我想以“便携式”格式(html、pdf、txt)提取该文本块。
- 有 Adobe 产品可以做到这一点吗?
- 是否有任何公共 API 可以访问 InDesign 文件?
- 是否可以将 InDesign 导出为 html 等格式?
I need some directions for the following problem:
I have a lot of InDesign files and i have to setup a process that will track if a certain paragraph or text block has changed between diferent versions of the file. If the text block has changed i want to extract that text block in a "portable" format (html, pdf, txt).
- Is there an Adobe product that would do that ?
- Is there any public API to access an InDesign file ?
- Is there the posibility to export InDesign to, say, html ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 JavaScript、AppleScript(仅限 Mac)或 VBScript(仅限 Win)在“Adobe ExtendScript Toolkit”(或任何其他编辑器,尽管 ExtendScript 将为您提供代码提示和有关可用对象的帮助等内容)中编写脚本。除了语法之外,所有三种语言都提供对 InDesign 对象的相同访问。
使用脚本,您几乎可以“手动”完成所有可以做的事情。因此,您可以简单地查找正确的文本对象并从中提取文本。脚本还允许跨多个文件工作,因此您也可以比较文件的两个版本。
请参阅 InDesign 脚本教程(有关 CS5)的更多信息、示例和参考。
Write a script in “Adobe ExtendScript Toolkit” (or any other editor, although ExtendScript will give you things like code hinting and help about what objects are available) using either JavaScript, AppleScript (Mac-only) or VBScript (Win-only). Apart from syntax all three languages offer the same access to the InDesign objects.
With scripts, you can nearly do everything you could do “by hand”. So you can simply look for the correct text object and extract the text from it. Scripts also allow to work across multiple files, so you can as well compare two versions of a file.
See the InDesign Scripting tutorial (here for CS5) for more information, examples and references.
是的,Adobe 提供 InCopy,用于编辑 Indesign 文档中的文本。您还可以为 InDesign 编写一个插件(也可以在 InCopy 中使用)来管理文件中的文本更新和更改。
可以导出 INX 文件,据我所知,该文件是 XML,因此您应该能够解析它。除非您为 InDesign 本身编写插件,否则没有公共 API。您确实有 XML 导出功能,但要使其正常工作,您需要标记文档并将其线性化(确定与 XML 文本顺序相关的文本块的顺序)。
然而,如果你不是完全疯狂,你应该避免学习 ADM 和所有 Adobe C++ 的东西,而尝试 Javascript,它在最近的 Creative Studios 中已经变得很不错了。这可能相关:http://oreilly.com/catalog/9780596528171
Yes, Adobe makes InCopy available which is for editing text inside Indesign documents. You can also write a plugin for InDesign (which will ALSO work in InCopy) which will manage text updates and changes in the file.
There is a possibility to export an INX file which, as far as I remember, is XML so you should be able to parse it. There is no public API except if you write a plugin for InDesign itself. And you do have XML export but for it to work properly you will need to tag your document and linearize it (determine the order of text chunks with relation to the XML text order).
However, if you are not completely crazy you should avoid learning ADM and all the Adobe C++ stuff and try Javascript which in recent Creative Studios has become decent. This might be relevant: http://oreilly.com/catalog/9780596528171
据我所知,没有用于访问 InDesign 文件的框架,但如果您愿意的话,有很多用于 PDF 的框架。
您可以将 InDesign 文件导出为 PDF,然后使用 PHP 和 PDFLib 编写跟踪脚本 ( http://www.php.net/manual/en/ref.pdf.php )
As far as I know there are no frameworks for accessing InDesign files, but there are plenty for PDF if you'd like to go that route.
You could export your InDesign files to PDF, then write a tracking script using PHP and the PDFLib ( http://www.php.net/manual/en/ref.pdf.php )
如果您在 Mac 上,您可以编写可以打开 indesign 文件的 Apple 脚本,读取指定的文本字段,然后将它们比较并处理为文本文件或其他内容。
if your on a mac you could write and apple script that could open the indesign files read the specified text fields and compare and process them into text file or something.