Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

A fix for Illustrator CS' 'Save as PDF' script Apps
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...]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[13,512 views]  

A fix for Illustrator CS' 'Save as PDF' script | 7 comments | Create New Account
Click here to return to the 'A fix for Illustrator CS' 'Save as PDF' script' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
A fix for Illustrator CS' 'Save as PDF' script
Authored by: Lunkus on Wed, Apr 7 2004 at 12:10PM PDT
Adobe makes the same error in the script "Export Open Documents As Flash" that is, it does not change the file name in the save file repeat loop but merely saves the first document repeatedly. As in the "Save as PDF" script, change the occurences of "document 1" to "document i" and it should work as expected.

[ Reply to This | # ]
A fix for Illustrator CS' 'Save as PDF' script
Authored by: Lapo on Wed, Apr 7 2004 at 5:24PM PDT
In Photoshop CS, there is an automatic process to compile opened images into a unique PDF file. Each image becomes a page in the final PDF presentation.

This behaviour is more interesting, and I guess this must be the idea behind "Save open documents as PDF" in Illustrator...


[ Reply to This | # ]
A fix for Illustrator CS' 'Save as PDF' script
Authored by: alternatekev on Thu, Apr 8 2004 at 12:21PM PDT
Well, actually, I end up using Combine PDFs (a RealBASIC application) to combine the resultant PDFs into one. I'd love to redistribute this script with GhostScript of some other PDF-making support so that you can combine the PDFs without an extra end-user step, but I seem to be a little too busy these days to write all the AppleScript/Shell script combinations I've thought of lately.

[ Reply to This | # ]
picky
Authored by: JayBee on Thu, Apr 8 2004 at 8:46AM PDT
by the way, it's CS's, not CS'. The possessive s is only dropped after a pluralising s, so for example:

The busses' wheels were all flat, causing a major headache for Ross's wife, the bus company manager...

I'll stop being a pedant now...

[ Reply to This | # ]
picky
Authored by: imageworx on Thu, Apr 8 2004 at 10:25AM PDT
Funny. Let me contribute.

<WARNING- Severe RANT below!!!>













Actually, CS stands for " (censored) Sucker". Its the term Adobe secretly applies for those that continually support their products by spending hundreds of dollars each year for an upgrade (that they think they, the CS, need). This upgrade merely changes what you've read in dozens of support books you've invested in as Adobe would rather support some author that can conveniently explain what that new feature really does, than provide useful documentation.
(ie. count the number of books released for each product)

Unfortunately, Adobe lacks the insight to recognize that it can't teach you anything about design.

Finally, Adobe has yet to rewrite its code to FULLY take advantage of 64bit processing. I expect the Linux versions to get better support than the Mac OS X patched ones (aka plugin for Photoshop).

Ooops. Sorry for my rant. One of those mornings...

---
To BeOS or Not to BeOS

[ Reply to This | # ]
A fix for Illustrator CS 'Save as PDF' script
Authored by: Dustcloud on Wed, Aug 4 2004 at 10:00AM PDT
Is there any way to make the pdf script also outline the text?

[ Reply to This | # ]
A fix for Illustrator CS' 'Save as PDF' script
Authored by: Spartacus on Wed, Apr 19 2006 at 3:54AM PDT
Has anybody managed to make Illustrator CS honour the PDF preset option? When I use it, the options have nothing to do with what's in my preset (e.g. it turns view pdf on and embed ICC off).

[ Reply to This | # ]