I have an AppleScript that opens an Illustrator file, does some things to it, then saves it in a new location. I want to embed ICC profiles, but when I do that, I get an error, either “Can’t get document 1” or, if I don’t specify Document 1, “can’t continue save.”
This fails:
save document 1 in filePath as Illustrator with options {class:Illustrator save options, embed icc profile:true}
This succeeds, but doesn’t solve my problem:
save document 1 in filePath as Illustrator
Does anyone know if there’s some incompatibility with embed ICC profiles?
Even selecting embed ICC profiles:false fails.
I’ve tried listing all Illustrator save options, but no luck. Taking them away one by one, this was the only one with an issue. I’ve tried Illustrator 2023 and 2024, and I’m working to get a copy of Illustrator 2020, which I know used to work for this script. I’ve also tried restarting and running it on a different computer. No luck.
I’m running macOS 14.5 and Illustrator 28.5 or 27.1.1
@ionah, when I do that, the script succeeds but the ICC profile is not embedded. I have verified that the source file being opened has an embedded ICC profile, and once the file is saved via the script, then reopened, the ICC profile is no longer embedded. Illustrator gives me this dialog upon opening: