Skip to main content
Inspiring
September 26, 2022
Question

Export Embedded file's binary to a File

  • September 26, 2022
  • 1 reply
  • 314 views

Hey guys,

 

I have an Illustrator file that contains an embedded item which has it's file property missing, like:

embedded.file
There is no file associated with this item

Is there a way to obtain the binary file that's embedded in Illustrator as a file on the File System?

 

For example, if I were to embed a File in the Illustrator, is there a way to obtain the same exact binary file through Illustrator's scripting API?

 

I know that the embedded.file.copy(new File(newDestination) would work and I've tested this. But I do not work with .ai files that have embedded files which have the file property populated.

This topic has been closed for replies.

1 reply

m1b
Community Expert
Community Expert
September 26, 2022

Hi @JSuX, this might not be what you need but, just in case, have a look at my "Unembed Raster Item" script I posted here. It attempts to save embedded, file-less images as .psd files.

- Mark

JSuXAuthor
Inspiring
September 27, 2022

Thanks for the reply @m1b,

 

Duplicating a layer to a new Document within Illustrator and exporting it using any of the Export*Options is something we're trying to avoid, we know that it will work. We're after obtaining the exact same binary that was embedded.

m1b
Community Expert
Community Expert
September 27, 2022

Yep I expected as much. I don't think you'll get much further with ExtendScript. Maybe look into the SDK? Good luck.

- Mark