Skip to main content
Known Participant
November 10, 2010
Question

Finding version (compatibility) of current .ai document

  • November 10, 2010
  • 1 reply
  • 3078 views

Is there a way in Javascript to retrieve an information showing in which Adobe Illustrator format was the currently open document saved?

Thanks

franK

This topic has been closed for replies.

1 reply

Muppet_Mark-QAl63s
Inspiring
November 10, 2010

You can read this info from the filehead without opening the file… Should that be your wish…

fklatilAuthor
Known Participant
November 10, 2010

I'm not sure what you mean by "filehead".

I'm on Windoze XP and when I move a mouse pointer over the file, it tells me that the file is Type: Adobe Illustrator Artwork 14.0, but I know for a fact that it's not in CS4 format. When I open this file in CS4 and resave, it asks me if I really want to save in a legacy format. So, I guess, the info about the type only means that the file type is associated with Illustrator 14.

So, my question is if there is a way in JS to retrieve this kind of info about the file's compatibility mode.

Thanks

franK

CarlosCanto
Community Expert
Community Expert
November 11, 2010

you can select the file in Bridge and look at the Application property in the Metadata panel

and taken from majorLaser's on this post http://forums.adobe.com/message/2036802#2036802

#target illustrator

//To use the XMP objects, you must load the XMP library as an ExtendScript ExternalObject. To avoid

//loading multiple instances of the library, use code like the following:

// load the library

if (ExternalObject.AdobeXMPScript == undefined) {

ExternalObject.AdobeXMPScript = new

ExternalObject("lib:AdobeXMPScript");

}

//Create an XMPMeta object from the active documents XMPString:

var myXmp = new XMPMeta(app.activeDocument.XMPString);

// retrieve property

prop = myXmp.getProperty(XMPConst.NS_XMP, "CreatorTool");

alert("Document Created in " + prop);