Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Explorer ,
Jul 30, 2025 Jul 30, 2025

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?

TOPICS
UXP Scripting
425
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Mentor , Jul 30, 2025 Jul 30, 2025

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

Better use InDesign's own API.

 

DirkBecker_0-1753896072453.png

 

Translate
Mentor , Jul 31, 2025 Jul 31, 2025

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.

Translate
Mentor ,
Jul 30, 2025 Jul 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/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 30, 2025 Jul 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.

 

DirkBecker_0-1753895103641.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 30, 2025 Jul 30, 2025

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

Better use InDesign's own API.

 

DirkBecker_0-1753896072453.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 31, 2025 Jul 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 ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 31, 2025 Jul 31, 2025
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 31, 2025 Jul 31, 2025

Thank you, sir I appreciate your help!
But when I try using
XMPMeta.registerNamespace()
it doesn’t show

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 31, 2025 Jul 31, 2025

Again, you are NOT working on the active InDesign document.

You are working on a separate XMP object.

The other examples are how Bridge or any other program would work on external files with XMP - images, PDFs, anything you would place in InDesign. In principle you can also modify a closed InDesign document that way, but as you have it open in InDesign better change it through the metadataPreferences.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines