Hi there,
in my job i need to convert a lot of Adobe Illustrator files to EPS and then distill these EPS’s to PDF using the acrobat distiller. I wondered if it would be possible to automate this mind numbing job and Applescript semmed the answer. Problem is, I succeed in producing the EPS but distilling it doesnt work. I can’t find the correct instructions or combination of instructions for distiller. Saving the file as PDF using Illustrator is no option.
What the script needs to do is
Open all AI files in a folder in Illustrator
Save all these files as EPS in a (or the same) folder
Distill all EPS files using Acrobat Distiller with default joboptions.
Can anyone take a look at my script and help me out? It’s my second script ever after reading the tutorial PDf found ont this site
THX in advance
Floris
on run
tell me to open {choose folder}
end run
on open droppedItems
set destFolder to choose folder with prompt "Destination Folder?"
repeat with anItem in droppedItems
tell application "Finder"
set filelist to (every file of anItem whose name extension is "ai")
end tell
SaveFilesasEPS(filelist, destFolder)
tell application "Finder"
set EPSList to (files of anItem whose name extension is "eps")
end tell
DistillPDF(EPSList, destFolder)
end repeat
end open
on SaveFilesasEPS(filelist, destFolder)
set destPath to destFolder as string
repeat with aFile in filelist
tell application "Finder" to set filename to name of aFile
set newFilepath to destPath & filename & ".EPS"
tell application "Adobe Illustrator"
open aFile
save current document in file newFilepath as eps with options {class:EPS save options, compatibility:Illustrator 11, preview:color Macintosh, PostScript:level 2}
close current document saving no
end tell
end repeat
end SaveFilesasEPS
on DistillPDF(EPSList, destFolder)
set destPath to destFolder as string
repeat with aFile in EPSList
tell application "Finder" to set filename to name of aFile
set PDFFilepath to destPath & filename & ".PDF"
tell application "Acrobat Distiller 7.0"
end tell
end repeat
end DistillPDF
Model: Mac G5
AppleScript: AppleScript N1-1.9.3
Browser: Safari 312.6
Operating System: Mac OS X (10.3.9)