出口到JPG有什麼問題?您可以選擇導出頁面或對象本身。
這是我在最近的一個項目中編寫的代碼片段。希望能幫助到你。
public static function getFilePath():String {
var app:com.adobe.indesign.Application = InDesign.app;
var sel:* = app.selection, oldResolution:Number, oldColorSpace:JpegColorSpaceEnum, groupItems:Array = [], i:int = 0, n:int = sel.length;
if (!sel || !n)
{
Alert.show("Pas de selection !", "title", Alert.OK, Sprite(mx.core.Application.application));
return "";
}
for (i = 0 ; i < n ; i ++)
{
groupItems [ groupItems.length ] = sel[i];
}
sel = (sel.length > 1)? app.activeDocument.groups.add (sel) : sel[0] ;
var tempFolder:File = File.createTempDirectory();
AppModel.getInstance().jpgFolder = tempFolder;
var jpgFile:File = new File();
jpgFile.nativePath = tempFolder.nativePath + "/temp.jpg";
oldResolution = app.jpegExportPreferences.exportResolution;
app.jpegExportPreferences.exportResolution = 72;
oldColorSpace = app.jpegExportPreferences.jpegColorSpace;
app.jpegExportPreferences.jpegColorSpace = JpegColorSpaceEnum.GRAY;
sel.exportFile (ExportFormat.jpg, jpgFile);
app.jpegExportPreferences.jpegColorSpace = oldColorSpace;
app.jpegExportPreferences.exportResolution = oldResolution;
if (sel is Group)
{
sel.ungroup();
app.select (groupItems);
}
return jpgFile.nativePath;
}
也許你可以試試,如果這是Adobe Captivate中的一個選項。這是一個屏幕錄製程序,因爲它是Adobe的,所以它可能有這個擴展。但它在黑暗中雖然有點不足。 – poepje 2012-07-06 07:58:05