1.算法程序
Adobe InDesign是Adobe公司的一个桌面出版 (DTP) 的应用程序,主要用于各种印刷品的排版编辑。InDesign可以将文档直接导出为Adobe的PDF格式,而且有多语言支持。采用脚本语言自动化编码,在学习中的一个重要功能是多页PDF导入功能,以下源代码仅用于学习交流,请勿用于商业用途和其它非法用途。源代码如下所示:
//Select the file you want to place. var myFile = File.openDialog("Select the file you want to place", ""); //Create a dialog. var myDialog = a({name:"PDF多页面导入",canCancel:true}); with(myDialog){ //Add a dialog column. wi()){ //Create First border panel. wi()){ wi()){ ({staticLabel:"导入PDF从第1页到第n页:"}); } wi()){ //Create a number entry that this uses editvalue //rather than editerText (as a textBox would). var LastPagesNumField = realEdi({editValue:5}); } } //Create Second border panel. wi()){ wi()){ ({staticLabel:"PDF页面左上角定位于X坐标(mm):"}); } wi()){ //Create a number entry that this uses editvalue //rather than editerText (as a textBox would). var TopLeftXField = realEdi({editValue:0}); } } //Create Third border panel. wi()){ wi()){ ({staticLabel:"PDF页面左上角定位于Y坐标(mm):"}); } wi()){ //Create a number entry that this uses editvalue //rather than editerText (as a textBox would). var TopLeftYField = realEdi({editValue:0}); } } } } //Display the dialog box. i() == true){ //Get the LastPagesNum from the LastPagesNumField. LastPagesNum = La; TopLeftX=To; TopLeftY=To; var myDocument = a; myDocument.viewPre = Mea; myDocument.viewPre = Mea; Locat = [TopLeftX, TopLeftY]; a; myDocument.documen = LastPagesNum; for (i=0; i<LastPagesNum; i++) { a = i+1; curPage=a.pages[i]; curPage.place(File(myFile),Locat); } } else{ //Remove the dialog box from memory. myDialog.destroy(); }
2.作者答疑
如有疑问,请留言。
提示: 作者知了-联系方式1
提示: 作者知了-联系方式2