InDesign2026
API 21.5.1.73
Object

MetadataPreference

Metadata preferences.

Preference MetadataPreference
Hierarchy

Document

MetadataPreference

Properties

NameType AccessDescription
String read/write The author of the document.
String read/write The URL of the file that contains the linked copyright statement.
String read/write The text to use as a copyright notice.
CopyrightStatus
read/write The copyright status of the document.
Date readonly The creation date of the document.
String readonly The name of the application used to create the document.
String read/write The description of the MetadataPreference.
String read/write The title of the document.
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
String readonly The format of the document.
Boolean readonly Returns true if the object specifier resolves to valid objects.
String read/write The job name.
String[] read/write The list of keywords associated with the document.
Date readonly The most recent modification date of the document.
Document readonly The parent of the MetadataPreference (a Document).
Object read/write A property that allows setting of several properties at the same time.
String readonly The location of the document on the asset management server.

Methods

EventListener

Adds an event listener.

eventType String The event type.
handler File | JavaScriptFunction The event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
void

Uses metadata from the specified external file to define any undefined metadata properties in the document.

from File The path to the external file that contains the metadata.
affectAll? Boolean If true, also replaces existing metadata with data from the external file. If false, does not replace existing metadata. Note: Defaults to false.
Number

Counts the number of items in the container.

namespace String The namespace of the container.
path String The path to the container.
void

Creates an empty container.

namespace String The namespace of the container.
path String The path to the container.
index? Number The index of the item within the container. Specified values must be 1 or greater. To append the item to the end of the index and allow the next available value to be assigned, use 0.
container? ContainerType The container type. Note: Required when the new item is the first item added to the container.
MetadataPreference[]

Resolves the object specifier, creating an array of object references.

String

Gets the XMP property value associated with the specified path.

namespace String The namespace of the property.
path String The specified path.
Boolean

Removes the event listener.

eventType String The registered event type.
handler File | JavaScriptFunction The registered event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
void

Replaces the current metadata in the document with metadata from the specified file.

using File The full path to the file that contains the replacement metadata.
affectAll? Boolean If true, treats all properties as external. Note: Defaults to false.
void

Saves the metadata in the document to an external file.

to File The path to the external file.
void

Sets the XMP property associated with the specified path.

namespace String The namespace of the property.
path String The specified path(s).
value String The value to assign to the property. Note: To remove the property, pass an empty string.
String

Generates a string which, if executed, will return the MetadataPreference.

String

Retrieves the object specifier.

Object of 4

Properties elsewhere that hold a MetadataPreference.

Return 1

Methods that return a MetadataPreference.