tell application "Adobe Illustrator"
tell document 1
save in ("" & ((path to current user folder) & ":Desktop:test.pes")) as eps with options {compatibility:Illustrator 8, PostScript:level 1}
end tell
end tell
Have you tried just taking off the PostScript: level line off? It may default to level 1. Level 1 just gives me an “Invalid enumeration” error whenever I use it no matter what Illustrator version is made compatible.
I’ve not dabbled in Javascript, but from what I gather, there may be more options with it than AppleScript. Maybe one of the other Illustrator scripters knows how to make sure it is a level 1. I’ll continue to play with it as I get a chance.
I looked at that option to and so far as I can tell I can only get to PS level 2 but I haven’t been able to test that yet as I haven’t figured out how to run the javascript from the ExtendScript Toolkit
if anyone has a sample of how that works it may be helpful
the graphic will be imported in to indesign or Quark then made into an eps or PDF in the case of a PDF the PS level will not matter. In some rare cases the client gets the native layout and supporting files.
Im only just strating to play with some JavaScript for things that are not available to Applescript. You don’t actually need anything more than text edit to write the script. Just make plain text then when saving the file set the file name extension to .js or .jsx and choose don’t append button. The script can be saved in presets or use “Comm+F12” and point to script file. Here is some sample java for you to check. It should give you number of path points in selection.
if (documents.length > 0 && activeDocument.pathItems.length > 0){
mySelObj = activeDocument.selection;
myObjNum = mySelObj.length;
count = 0;
for ( i = 0; i < myObjNum; i++ ){
pntNum = mySelObj[ i ].pathPoints.length;
for ( j = 0; j < pntNum; j++ ){
if( mySelObj[ i ].pathPoints[ j ].selected == PathPointSelection.ANCHORPOINT ){
count++;
}
}
}
alert( "The number of points : " + count );
}
BTW here is a neat trick that may come in handy with your scripting of illustrator. Add “Shift+Alt” to the above keys and you now have illustrators internal object model if you have active selections they are in bold. You can quick reference lots of stuff this way. Have fun.
Ok well… tried the same thing using JS and go the same result “Invalid enumerator value” I think Abobe may have maid a mistake in there dictionary saying that PS level 1 is valid for Illustrator 8 compatible files
I have had clients complain that the design wont go through their RIP if the graphic is not saved at PS level 1. I’m assuming they are running older RIPs that can’t handle the higher levels of PS …