Skip to main content
Participant
March 10, 2020
Question

Change XMP Metadata on activeDocument

  • March 10, 2020
  • 1 reply
  • 1143 views

Hi There,

 

I'm writing a script to export e file to different formats at once.

Before exporting i would like to set the Metadata DC.Description and DC.rights to predefined variables.

 

My code so far for changing the data is:

//XMP scripting API für die Metadaten importieren
// load the library
if (ExternalObject.AdobeXMPScript == undefined) {
    ExternalObject.AdobeXMPScript = new 
    ExternalObject("lib:AdobeXMPScript");
    };

//TheCaption = Window.prompt ("Enter a caption for the photos.");


xmp = new XMPMeta(); // object initialized with xmp packet as string
xmp.setProperty(XMPConst.NS_DC, "description", "Falafel description");
xmp.setProperty(XMPConst.NS_DC, "rights", "Falafel Copyright-HInweis");
xmpStr = xmp.serialize();

 

but how do i write this back into my app.activeDocument?

 

Thank you very much,

Jens

    This topic has been closed for replies.

    1 reply

    Ten A
    Community Expert
    Community Expert
    March 11, 2020