InDesign Scripting: Accessing XMP for unsaved (open) file

Community Beginner ,
Jul 22, 2020

Copy link to clipboard

Copied

I am working on a CEP extension for InDesign which creates a new document that has some custom XMP in it. I'm using the `lib:AdobeXMPScript` object to create the XMP in a temporary xml file on disk, and then importing it with `doc.metadataPreferences.append()`.

 

I can read this back in by constructing an `XMPFile` object passing in my document's save path. But sometimes I may need to do this before the document is saved. 

 

Is there any way to get the raw XMP data from an open InDesign document without saving it first? Alternatively, is there any way to read complex structures in custom namespaces using the InDesign XMP functionality in `MetadataPreference`? My attempts to do this so far have failed... I just always get no results when I try to read them.

TOPICS
Scripting

Views

45

Likes

Translate

Translate

Report

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

Have something to add?

Join the conversation