Expand my Community achievements bar.

reading JPEG metadata

Avatar

Level 1

Is it possible to read the metadata from an imported JPEG or a JPEG selected with Image Field during execution?

4 Replies

Avatar

Level 10

Hi,

I don't believe that this is possible. See discussion here: http://forums.adobe.com/message/2316002#2316002.

Maybe someone else would have an update.

Niall

Avatar

Level 1

It is possible to get quite a bit of information from imported files via DataObjects, but I can't seem to get my existing description/metadata/EXIF data. Below is a code snippit showing that path and size work correctly but description does not.

'Code for Get Data Object Button Click

var myDoc = event.target;

var count = 0;

var sFile = "myFile" + count;

myDoc.importDataObject({cName: sFile});

var myDataObject = myDoc.getDataObject(sFile);

var sFileName = myDataObject.path;

count = count + 1;

'Code to display each attached files name/size on Button Click

var myDoc = event.target;

var d = myDoc.dataObjects;

for (var i = 0; i < d.length; i++)

{

    app.alert("Data Object[" + i + "]=" + d[i].path + "    and the file size is: " + d[i].size);

    app.alert(d[i].description); 'Does not work to pull metadata/EXIF   

}

Avatar

Level 10

Hi,

That script relates to file attachments and I would not expect it to work for images in an ImageField.

Niall

Avatar

Level 1

You are correct that the script only relates to file attachments. This fact makes no difference to my current project bacause images are not the only type of files I am looking to read metadata from. If you happen to know a way to get metadata information from a file such as Author/Title/Subject/Keywords/Comments please help.