For some unknown reason, Adobe Illustrator CS includes a really handy script menu, with a really handy script -- Save Open Documents as PDF. Except for the fact that this script doesn't work. My assumption would be (based on its name) that it is to take every document open in AI and save a version of that document as a PDF, without the hassle of going into each open doc and clicking "Save as...", selecting PDF, clicking all the requisite buttons, closing the doc, going to the next one... etc.
What this supposedly useful script actually does is similar, with the exception that it only saves the top-most window's document as a PDF, leaving the others untouched. This is useless. I've amended the included script to fix the errors involved (they loop on the number of documents in the original script, but only save window 0 and its name.. so if you have nine windows open, the script will save the top-most document nine times ... neat.)
My included script turns off the "Preserve Illustartor Editing Capability," because this option makes PDFs that are much larger than they should be and is almost useless, as you still have to have the AI file to edit. If you want this to be turned back on, there's a line that says preserve editability:false; just change that to true.
-- Get a location for the exported files
set targetFolder to choose folder with prompt ¬
"Location for exported files"
set targetPath to targetFolder as string
tell application "Illustrator CS"
-- Turn off user interaction so dialogs don't
-- cause the script to get stuck
set user interaction level to never interact
-- Count the open documents
set documentCount to count documents
display dialog documentCount as string
-- Export each open document
repeat with i from 1 to documentCount
-- Get the document's name to use for creating
-- a file path to save to
set documentName to name of document i
-- Perform the save
save document i in file (targetPath & documentName) as pdf ¬
with options {class:PDF save options, preserve editability:false}
end repeat
end tell
[robg adds: I don't have Illustrator, so I can't test this one...]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040405130649644