# Metadata

## Content

# Class: Metadata

Represents XMP metadata associated with a PDF document.

## Extends

- [`ObjectBase`](ObjectBase)

## Constructors

### Constructor

```ts
new Metadata(metadataProperties?): Metadata;
```

Creates a new Metadata object with specified properties.

#### Parameters

##### metadataProperties?

[`MetadataProperties`](../type-aliases/MetadataProperties)

The optional settings for creating Metadata.

#### Returns

`Metadata`

#### Overrides

```ts
ObjectBase.constructor
```

### Constructor

```ts
new Metadata(om, metadataProperties?): Metadata;
```

Creates a new Metadata object with specified properties.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

An object manager that controls the lifetime of the Metadata object.

##### metadataProperties?

[`MetadataProperties`](../type-aliases/MetadataProperties)

The optional settings for creating Metadata.

#### Returns

`Metadata`

#### Overrides

```ts
ObjectBase.constructor
```

## Accessors

### contributors

#### Get Signature

```ts
get contributors(): string[];
```

Gets or sets the list of document contributors. Maps to Dublin Core 'contributor' property.

##### Returns

`string`[]

#### Set Signature

```ts
set contributors(value): void;
```

Gets or sets the list of document contributors. Maps to Dublin Core 'contributor' property.

##### Parameters

###### value

`string`[]

##### Returns

`void`

***

### copyright

#### Get Signature

```ts
get copyright(): string;
```

Gets or sets the document copyright. Maps to Dublin Core 'rights' property.

##### Returns

`string`

#### Set Signature

```ts
set copyright(value): void;
```

Gets or sets the document copyright. Maps to Dublin Core 'rights' property.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### coverage

#### Get Signature

```ts
get coverage(): string;
```

Gets or sets the document coverage. Maps to Dublin Core 'coverage' property.

##### Returns

`string`

#### Set Signature

```ts
set coverage(value): void;
```

Gets or sets the document coverage. Maps to Dublin Core 'coverage' property.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### createDate

#### Get Signature

```ts
get createDate(): Date;
```

Gets or sets the creation date. Maps to XMP 'CreateDate' property.
If null, the current date/time is used.

##### Returns

`Date`

#### Set Signature

```ts
set createDate(value): void;
```

Gets or sets the creation date. Maps to XMP 'CreateDate' property.
If null, the current date/time is used.

##### Parameters

###### value

`Date`

##### Returns

`void`

***

### creators

#### Get Signature

```ts
get creators(): string[];
```

Gets or sets the list of document creators. Maps to Dublin Core 'creator' property.

##### Returns

`string`[]

#### Set Signature

```ts
set creators(value): void;
```

Gets or sets the list of document creators. Maps to Dublin Core 'creator' property.

##### Parameters

###### value

`string`[]

##### Returns

`void`

***

### creatorTool

#### Get Signature

```ts
get creatorTool(): string;
```

Gets or sets the creator tool. In PDF/A compatible documents this value
should be the same as [DocumentInfo.creator](DocumentInfo#creator).

##### Returns

`string`

#### Set Signature

```ts
set creatorTool(value): void;
```

Gets or sets the creator tool. In PDF/A compatible documents this value
should be the same as [DocumentInfo.creator](DocumentInfo#creator).

##### Parameters

###### value

`string`

##### Returns

`void`

***

### dates

#### Get Signature

```ts
get dates(): string[];
```

Gets or sets the list of document dates. Maps to Dublin Core 'date' property.

##### Returns

`string`[]

#### Set Signature

```ts
set dates(value): void;
```

Gets or sets the list of document dates. Maps to Dublin Core 'date' property.

##### Parameters

###### value

`string`[]

##### Returns

`void`

***

### description

#### Get Signature

```ts
get description(): string;
```

Gets or sets the document description. Maps to Dublin Core 'description' property.

##### Returns

`string`

#### Set Signature

```ts
set description(value): void;
```

Gets or sets the document description. Maps to Dublin Core 'description' property.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### identifier

#### Get Signature

```ts
get identifier(): string;
```

Gets or sets the document identifier. Maps to Dublin Core 'identifier' property.

##### Returns

`string`

#### Set Signature

```ts
set identifier(value): void;
```

Gets or sets the document identifier. Maps to Dublin Core 'identifier' property.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### keywords

#### Get Signature

```ts
get keywords(): string[];
```

Gets or sets the list of document keywords, or subjects. Maps to Dublin Core 'subject' property.

##### Returns

`string`[]

#### Set Signature

```ts
set keywords(value): void;
```

Gets or sets the list of document keywords, or subjects. Maps to Dublin Core 'subject' property.

##### Parameters

###### value

`string`[]

##### Returns

`void`

***

### languages

#### Get Signature

```ts
get languages(): string[];
```

Gets or sets the list of document languages. Maps to Dublin Core 'language' property.

##### Returns

`string`[]

#### Set Signature

```ts
set languages(value): void;
```

Gets or sets the list of document languages. Maps to Dublin Core 'language' property.

##### Parameters

###### value

`string`[]

##### Returns

`void`

***

### metadataDate

#### Get Signature

```ts
get metadataDate(): Date;
```

Gets or sets the metadata date. Maps to XMP 'MetadataDate' property.
If null, the current date/time is used.

##### Returns

`Date`

#### Set Signature

```ts
set metadataDate(value): void;
```

Gets or sets the metadata date. Maps to XMP 'MetadataDate' property.
If null, the current date/time is used.

##### Parameters

###### value

`Date`

##### Returns

`void`

***

### modifyDate

#### Get Signature

```ts
get modifyDate(): Date;
```

Gets or sets the modification date. Maps to XMP 'ModifyDate' property.
If null, the current date/time is used.

##### Returns

`Date`

#### Set Signature

```ts
set modifyDate(value): void;
```

Gets or sets the modification date. Maps to XMP 'ModifyDate' property.
If null, the current date/time is used.

##### Parameters

###### value

`Date`

##### Returns

`void`

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

***

### pdfA

#### Get Signature

```ts
get pdfA(): PdfAConformanceLevel;
```

Gets or sets the PDF/A conformance version.

##### Returns

[`PdfAConformanceLevel`](../enumerations/PdfAConformanceLevel)

#### Set Signature

```ts
set pdfA(value): void;
```

Gets or sets the PDF/A conformance version.

##### Parameters

###### value

[`PdfAConformanceLevel`](../enumerations/PdfAConformanceLevel)

##### Returns

`void`

***

### pdfRev

#### Get Signature

```ts
get pdfRev(): string;
```

Gets the part number of the PDF/A conformance version (e.g. "2026").

##### Returns

`string`

#### Set Signature

```ts
set pdfRev(value): void;
```

Sets the part number of the PDF/A conformance version (e.g. "2026").

##### Parameters

###### value

`string`

##### Returns

`void`

***

### pdfUa

#### Get Signature

```ts
get pdfUa(): number;
```

Gets or sets the PDF/UA conformance version.
Null indicates that the document is not PDF/UA compliant.

##### Returns

`number`

#### Set Signature

```ts
set pdfUa(value): void;
```

Gets or sets the PDF/UA conformance version.
Null indicates that the document is not PDF/UA compliant.

##### Parameters

###### value

`number`

##### Returns

`void`

***

### pdfUaRev

#### Get Signature

```ts
get pdfUaRev(): string;
```

Gets the part number of the PDF/UA conformance version (e.g. "2026").

##### Returns

`string`

#### Set Signature

```ts
set pdfUaRev(value): void;
```

Sets the part number of the PDF/UA conformance version (e.g. "2026").

##### Parameters

###### value

`string`

##### Returns

`void`

***

### producer

#### Get Signature

```ts
get producer(): string;
```

Gets or sets the document's producer. Maps to PDF 'Producer' property.

##### Returns

`string`

#### Set Signature

```ts
set producer(value): void;
```

Gets or sets the document's producer. Maps to PDF 'Producer' property.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### publishers

#### Get Signature

```ts
get publishers(): string[];
```

Gets or sets the list of document publishers. Maps to Dublin Core 'publisher' property.

##### Returns

`string`[]

#### Set Signature

```ts
set publishers(value): void;
```

Gets or sets the list of document publishers. Maps to Dublin Core 'publisher' property.

##### Parameters

###### value

`string`[]

##### Returns

`void`

***

### readOnly

#### Get Signature

```ts
get readOnly(): boolean;
```

Gets or sets a value indicating whether the metadata is marked as read-only.

##### Returns

`boolean`

#### Set Signature

```ts
set readOnly(value): void;
```

Gets or sets a value indicating whether the metadata is marked as read-only.

##### Parameters

###### value

`boolean`

##### Returns

`void`

***

### relations

#### Get Signature

```ts
get relations(): string[];
```

Gets or sets the list of document relations. Maps to Dublin Core 'relation' property.

##### Returns

`string`[]

#### Set Signature

```ts
set relations(value): void;
```

Gets or sets the list of document relations. Maps to Dublin Core 'relation' property.

##### Parameters

###### value

`string`[]

##### Returns

`void`

***

### source

#### Get Signature

```ts
get source(): string;
```

Gets or sets the document source. Maps to Dublin Core 'source' property.

##### Returns

`string`

#### Set Signature

```ts
set source(value): void;
```

Gets or sets the document source. Maps to Dublin Core 'source' property.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### title

#### Get Signature

```ts
get title(): string;
```

Gets or sets the document's title. Maps to Dublin Core 'title' property.

##### Returns

`string`

#### Set Signature

```ts
set title(value): void;
```

Gets or sets the document's title. Maps to Dublin Core 'title' property.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### types

#### Get Signature

```ts
get types(): string[];
```

Gets or sets the list of document types. Maps to Dublin Core 'type' property.

##### Returns

`string`[]

#### Set Signature

```ts
set types(value): void;
```

Gets or sets the list of document types. Maps to Dublin Core 'type' property.

##### Parameters

###### value

`string`[]

##### Returns

`void`

***

### userProps

#### Get Signature

```ts
get userProps(): MetadataUserProp[];
```

Gets or sets the list of document custom properties.

##### Returns

[`MetadataUserProp`](../type-aliases/MetadataUserProp)[]

#### Set Signature

```ts
set userProps(props): void;
```

Gets or sets the list of document custom properties.

##### Parameters

###### props

[`MetadataUserProp`](../type-aliases/MetadataUserProp)[]

##### Returns

`void`

## Methods

### addProperty()

```ts
addProperty(
   namespace, 
   name, 
   value): void;
```

Adds a property to metadata.

#### Parameters

##### namespace

[`UserPropNamespace`](../enumerations/UserPropNamespace)

The XML namespace.

##### name

`string`

The property name.

##### value

`string`

The property value.

#### Returns

`void`

***

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
