Save as older Illustrator EPS

Post Reply
User avatar
Terkelsen
Advanced member
Posts: 242
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Save as older Illustrator EPS

Post by Terkelsen » Mon Mar 02, 2020 8:05 am

I'm looking for a script that can save a PDF as an Illustrator EPS but in an older Illustrator version than the one installed. Anyone?

jan_suhr
Advanced member
Posts: 336
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Save as older Illustrator EPS

Post by jan_suhr » Mon Mar 02, 2020 8:19 am

Try this in Switch as a Save As Script for Illustrator, it will save it as AI8 but that can easily be changed to something else..

Code: Select all

// Save as Ai 8
var dest = $outfolder + "/" + $filename + ".ai";
var originalInteractionLevel = userInteractionLevel;
var saveName = new File ( dest );

userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

saveOpts = new IllustratorSaveOptions();
saveOpts.compatibility = Compatibility.ILLUSTRATOR8; 
saveOpts.generateThumbnails = true; 
saveOpts.preserveEditability = true;
$doc.saveAs( saveName, saveOpts );
$outfiles = [dest];

Or save it as an EPS from Ai8

Code: Select all

// Save as Ai8 EPS
var dest = $outfolder + "/" + $filename + ".eps";
var originalInteractionLevel = userInteractionLevel;
var saveName = new File ( dest );

userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

saveOpts = new EPSSaveOptions();
saveOpts.compatibility = Compatibility.ILLUSTRATOR8; 
saveOpts.generateThumbnails = true; 
saveOpts.preserveEditability = true;
$doc.saveAs( saveName, saveOpts );
$outfiles = [dest];
Or for Ai CS6

Code: Select all

// Save as Ai 8
var dest = $outfolder + "/" + $filename + ".ai";
var originalInteractionLevel = userInteractionLevel;
var saveName = new File ( dest );

userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

saveOpts = new IllustratorSaveOptions();
saveOpts.compatibility = Compatibility.ILLUSTRATOR16; 
saveOpts.generateThumbnails = true; 
saveOpts.preserveEditability = true;
$doc.saveAs( saveName, saveOpts );
$outfiles = [dest];

Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

User avatar
Terkelsen
Advanced member
Posts: 242
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Save as older Illustrator EPS

Post by Terkelsen » Mon Mar 02, 2020 9:18 am

Thanks a lot, Jan. This seems to work perfect for all versions prior to 17 (the first CC version). Do you also know how to change it to work with the CC-versions?

jan_suhr
Advanced member
Posts: 336
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Save as older Illustrator EPS

Post by jan_suhr » Mon Mar 02, 2020 9:30 am

Just change "ILLUSTRATOR16" to a later version number I think the latest is 19
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

User avatar
Terkelsen
Advanced member
Posts: 242
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Save as older Illustrator EPS

Post by Terkelsen » Mon Mar 02, 2020 12:08 pm

That's how I thought it would work, but if I change Compatibility.ILLUSTRATOR16 to Compatibility.ILLUSTRATOR19, Switch will give this error:

Error 1320: Invalid enumeration value
Line: 40
-> saveOpts.compatibility = Compatibility.ILLUSTRATOR19; (5001)

jan_suhr
Advanced member
Posts: 336
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Save as older Illustrator EPS

Post by jan_suhr » Mon Mar 02, 2020 1:01 pm

Maybe there is something with the Configurator.

According to documentation it should work with Compatibility.ILLUSTRATOR19

I can only get it to work up to Compatibility.ILLUSTRATOR16 with my Switch 2019 Fall and Illustrator 2020

https://illustrator-scripting-guide.rea ... patibility

Adobes latest Scripting documentation is for 2017.

Check with Enfocus Support
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

Post Reply