Indesign for JPG
This is similar to the Applescript task. You can write applescript that uses the Indesign Applescript dictionary and then wrap your applescript with Cocoa and Objective C.
Cocoa in the Applescript bridge
Not sure how to make Cocoa a wrapper around applescript? The Developer Code Examples contains the code examples that ship with Xcode.
This can be useful AppleScript and Cocoa: top to bottom.
source to share
Export PDF and then export as JPEG. To export as PDF, check out this thread: http://objectmix.com/adobe-indesign/238509-newbie-question-how-batch-export-multiple-indd-pdf-files.html
source to share
I doubt this is really what you want, but this JavaScript InDesign can help you. It will export each page of an open document to a separate 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);
}
source to share
Here is the Indesign (CS3) Applescript Guide (pdf). It will detail the actions that can be scripted.
Alternatively, you might want to consider Automator, which is essentially a GUI for Applescript. Here are some Automator Actions specifically for Indesign .
And guidance on document from Adobe using Automator and Indesign . It has information on what to do in Xcode.
source to share