Illustrator save options—cannot embed ICC profiles

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

I’m a long-time user; first time poster. Thanks in advance for any help! :slight_smile:

There’s no need to specify the option class:

save document 1 in filePath as Illustrator with options {embed icc profile:true}

@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:

1 Like

Make a test with a new document in Illustrator:

  • create a rectangle with any fill color,
  • save it as Adobe Illustrator(ai) (see screenshot for options)
  • set the profile “manually” (menu Edit>Assign color profile)
  • save

Then run this script:

tell application id "ART5"
	save document 1 in "~/Desktop/" as Illustrator with options {embed icc profile:true}
end tell

Tell us if it succeeds.

I followed every step, but it did not succeed. The file saved via the script does not have the ICC embedded, while the file I saved via the GUI does.

Thank you @kyle03674 It is really helpful :slightly_smiling_face:

1 Like

Then I recommend to submit this bug here:

Also, try to post the same question on the Illustrator forum on (unless you already did ) - maybe users there have more info.

Thanks, @leo_r

I’ll update this post later if I have any helpful updates.