作为我工作的一部分,我的老板希望我在Illustrator CS6中将成千上万的.pdfs转换成.ai格式,而不必打开每个单独的文件(在数千个文件中),并将每个pdf保存为.ai。我需要通过几个简单的步骤来转换数千个文件。
使用Illustrator CS6时,我尝试使用批处理选项,将相同的操作应用于多个文件,(2)。我为输入和输出选择了两个文件夹。我从中获取.pdfs的源和.ai格式的转换后的pdfs的目的地被放置。
虽然转换成功,但多个文件(在本例中为2个)在Illustrator中单独打开,我不得不初步保存它们。
这不是我想要的。我需要能够自动转换成数以千计的pdf到.ai的,而不必打开和保存每一个。
我该怎么做呢?
发布于 2013-08-28 16:32:11
您可以使用此脚本作为起点。它立即适用于单个页面的.pdf文件。对于多页文件,您必须对其进行更多的调整
(function(thisObj){
main();
function main(){
var pdffiles = File.openDialog ('select one or more pdf files', '*.pdf', true);
if(pdffiles === null){
return;
}
for(var f = 0; f < pdffiles.length;f++){
var pdf = pdffiles[f];
//~ alert(pdf);
var doc = app.open (pdf);
var namepattern = pdf.path + "/" + pdf.name + ".converted.ai";
var newai = null;
if(!(File(namepattern).exists)){
newai = new File(namepattern);
}else{
newai = File(namepattern);
}
doc.saveAs(newai);
doc.close (SaveOptions.DONOTSAVECHANGES);
}
}
})(this);https://stackoverflow.com/questions/18455940
复制相似问题