2015-11-18 74 views
0

我正在使用InDesign Server和基於soap的應用程序通過服務器進行通信。用於將idml導入到indd文檔的InDesign腳本

我能夠獲得所有在indd文檔中使用的表單的字段,並且能夠替換它的文本/值。

現在,我正在尋找獲取indd文檔中使用的所有圖像,並在我的應用程序中提供上傳圖像選項,並能夠用用戶選擇的圖像替換圖像。任何人都可以提供腳本來識別和替換圖像。

其次,爲了向後兼容,我有一個indd文檔的idml。現在如何導入或打開此idml並通過腳本將其轉換爲indd文檔。

第三,如何將pdf轉換爲indd文檔。

請幫我使用這些腳本。

回答

0

要將IDML文件到.indd文件,只需打開它,將它保存

set theIDMLFile to "Macintosh HD:Users:me:Desktop:someidmlfile.idml" 

tell application "InDesignServer" 
    set convertedIDMLDoc to open alias theIDMLFile 
    tell convertedIDMLDoc 
     save to ((characters 1 thru -6 of theIDMLFile) & ".indd") as string 
    end tell 
end tell 
相關問題