Indesign for JPG

I need to save every page of Indesign CS3 and Quark file as JPEG in my cocoa application using Objective C ...

Can anyone suggest me this?

Thank you

+2


source to share


5 answers


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.

Indesign and Applescript

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.

+2


source


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



+1


source


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);
    } 

      

+1


source


Isn't it just File> Export and then select Jpeg?

0


source


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.

0


source







All Articles