Created
June 1, 2010 17:39
-
-
Save kanemu/421213 to your computer and use it in GitHub Desktop.
[indesign][extendscript]開いているドキュメント全てをPDFX/1aで書き出して閉じる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileOverview 開いているInDesignドキュメントを順番にPDFX/1aで保存して閉じます。<br> | |
* <b>使い方</b>:<br> | |
* (1)InDesignドキュメントを複数開き(必ず保存して下さい)スクリプトを実行します。<br> | |
* (2).inddファイルと同階層にPDFを保存し、閉じます。<br> | |
* (3)開いているファイルがすべて閉じたら、「pdfを書き出しました」というアラートが表示されます。<br> | |
* | |
* @author Kanemu | |
* @version 0.1 | |
*/ | |
#target "InDesign" | |
(function(){ | |
var docs=app.documents.everyItem().getElements(); | |
if(docs.length===0) return; | |
while(docs.length>0){ | |
var doc=docs.shift(); | |
var fullName=doc.fullName.absoluteURI; | |
var pdfName=fullName.slice(0,fullName.lastIndexOf('.'))+'.pdf'; | |
doc.exportFile(ExportFormat.pdfType, File(pdfName), false, '[PDF/X-1a:2001 (日本)]'); | |
doc.close(SaveOptions.NO); | |
}; | |
alert('pdfを書き出しました'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment