2

我需要在我的可可应用程序中使用 Objective C 将 Indesign CS3 和 Quark 文件的每一页保存为 JPEG ......

有人可以建议我吗?

谢谢你

4

5 回答 5

2

这听起来像是 Applescript 的任务。你可以编写一个使用 Indesign Applescript Dictionary 的 applescript,然后用 Cocoa 和 Objective C 包装你的 applescript。

Indesign 和 Applescript

Cocoa 到 Applescript 的桥

不确定如何围绕 AppleScript 做 Cocoa 包装器?Xcode 附带的开发者工具代码示例中有一些代码示例。

这可能很有用AppleScript 和 Cocoa: from Top to Bottom

于 2009-08-28T10:34:26.003 回答
1

导出 PDF,然后导出为 JPEG。要导出为 PDF,请查看此线程: http: //objectmix.com/adobe-indesign/238509-newbie-question-how-batch-export-multiple-indd-pdf-files.html

于 2011-04-23T09:45:21.363 回答
1

我怀疑这真的是你想要的,但这个 InDesign JavaScript可能会对你有所帮助。它将打开文档的每一页导出为单独的 jpeg。

var myFilePath, myFile,myDoc, myPages, myPage, myPageNum;

app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;
app.jpegExportPreferences.exportResolution = 200;
app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.EXPORT_RANGE;

myDoc = app.activeDocument;
myPages = myDoc.pages;
for (var i = 0; i < myPages.length; i++) {
    myPage = myPages[i];
    myPageNum = myPage.name;
    myFilePath = "~/Desktop/exported_jpegs/" + myDoc.name.replace(/indd$/, "") + " page " + myPageNum + ".jpg";
    myFile = new File(myFilePath);
    app.jpegExportPreferences.pageString = myPageNum;
    myDoc.exportFile(ExportFormat.jpg, myFile, false);
    } 
于 2016-07-25T03:44:13.793 回答
0

不就是文件 > 导出,然后选择 Jpeg 吗?

于 2009-08-26T11:41:42.903 回答
0

这是Indesign (CS3) Applescript 指南(pdf)。它将包含可以编写脚本的操作的详细信息。

此外,您可能会考虑 Automator,它本质上是 Applescript 的 GUI 前端。这里有一些专门针对 Indesign 的 Automator 操作

以及来自 Adob​​e 的使用 Automator 和 Indesign 的工作流程指南。它有一些关于在 Xcode 中做什么的信息。

于 2009-08-29T01:16:33.317 回答