Skip to main content
Inspiring
July 30, 2025
Answered

Custom XMP Metadata Not Showing in InDesign File Info Panel (Using UXP)

  • July 30, 2025
  • 2 replies
  • 604 views

Hi Adobe Community,

I'm trying to custom XMP metadata into an InDesign file using uxp scripting 

 

Here is the code I'm using  

let { XMPMeta, XMPConst } = require("uxp").xmp;
let meta = new XMPMeta();
meta.setProperty(XMPConst.NS_XMP, "Name", "vkumarg");
let prop = meta.getProperty(XMPConst.NS_XMP, "Name");
console.log(prop.namespace); // xmp namespace
console.log(prop.options);
console.log(prop.path); // Name

This sets the property  xmp:Name  vkumarg  /xmp:Name under the standard XMP namespace (http://ns.adobe.com/xap/1.0/).

However, after saving and reopening the file in Adobe InDesign, and going to:

File → File Info → Advanced → Raw Data

"The xmp:Name tag and value are not shown."


Is this the correct way to write custom XMP metadata using UXP in InDesign?
Why is the value not being shown in the rawInput section?

Correct answer Dirk Becker

How to register this two namespace
xmlns:stMfs="http://ns.adobe.com/xap/1.0/sType/ManifestItem#"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"

I have use xmpMetaObject
XMPMeta.registerNamespace(namespaceURI, suggestedPrefix)

XMPMeta.registerNamespace(
"http://ns.adobe.com/xap/1.0/sType/ManifestItem#",
"stMfs"
);
XMPMeta.registerNamespace(
"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",
"stRef"
);
My reference is from the official Adobe documentation:
 https://extendscript.docsforadobe.dev/scripting-xmp/xmpscript-object-reference/#xmpmeta-object
File → File Info → Advanced → Raw Data not show why ?


Just came across the ExtendScript example translated to UXP, in the Photoshop docs.

Rewritten to use UXP file system calls.

https://developer.adobe.com/photoshop/uxp/2022/uxp-api/reference-js/Modules/uxp/XMP/getting-started/

Better don't attempt that on your open InDesign document.

2 replies

Legend
July 30, 2025

I'm also missing file operations along these (taken from ExtendScript), your script sounds like you're working on a detached XMP object. The XMP library does not know that you have an active document. The same script could be running in Photoshop, and still deal with an InDesign document.

 

 

Legend
July 30, 2025

Yep, your script is working on a blank XMP packet.

Better use InDesign's own API.

 

 

Inspiring
July 31, 2025

How to register this two namespace
xmlns:stMfs="http://ns.adobe.com/xap/1.0/sType/ManifestItem#"
xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"

I have use xmpMetaObject
XMPMeta.registerNamespace(namespaceURI, suggestedPrefix)

XMPMeta.registerNamespace(
"http://ns.adobe.com/xap/1.0/sType/ManifestItem#",
"stMfs"
);
XMPMeta.registerNamespace(
"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",
"stRef"
);
My reference is from the official Adobe documentation:
 https://extendscript.docsforadobe.dev/scripting-xmp/xmpscript-object-reference/#xmpmeta-object
File → File Info → Advanced → Raw Data not show why ?

Legend
July 30, 2025

Might be a bug, considering that uxp xmp should also work from other programs.

Is that an official tag, though? Maybe some validation taking place.

Retry with "CreatorTool" (mentioned in ExtendScript XMP docs)

If you're in InDesign anyway, also have a look at doc.metadataPreferences.

https://developer.adobe.com/indesign/dom/api/m/MetadataPreference/