Metadata

Overview

Metadata is a class in Aspose.PDF FOSS for .NET. Inherits from: IDictionary<string, XmpValue>.

XMP metadata accessor exposed by per-resource members such as Metadata.

This class provides 19 methods for working with Metadata objects in .NET programs. Available methods include: Add, Clear, Contains, ContainsKey, CopyTo, Get, GetEnumerator, GetNamespaceUriByPrefix, GetPrefixByNamespaceUri, RegisterNamespaceUri, Remove, SetPdfAidPart, and 1 additional methods. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Count, ExtensionFields, IsFixedSize, IsReadOnly, IsSynchronized, Keys, and 5 more.

Properties

NameTypeAccessDescription
CountintReadNumber of metadata properties currently set.
IsReadOnlyboolReadGets the is read only.
IsFixedSizeboolReadAlways false: callers may add and remove keys.
IsSynchronizedboolReadAlways false: callers serialise their own access.
SyncRootobjectReadSentinel object for ICollection.SyncRoot-style locking.
KeysICollection<string>ReadAll property keys present in the bound metadata.
ValuesICollection<XmpValue>ReadAll property values present in the bound metadata.
NamespaceManagerXmlNamespaceManagerReadLive XmlNamespaceManager driving prefix → URI resolution.
ExtensionFieldsIDictionary<string, XmpPdfAExtensionSchema>ReadPDF/A extension fields, keyed by extension namespace prefix.
PdfAidPartstring?ReadPDF/A part identifier from pdfaid:part, or null.
PdfAidConformancestring?ReadPDF/A conformance level from pdfaid:conformance, or null.

Methods

SignatureDescription
Add(key: string, value: XmpValue)Add a property by raw key.
Add(key: string, value: object)Add a property by raw key with an arbitrary object value.
Add(item: KeyValuePair<string, XmpValue>)Add a key/value pair (IDictionary contract).
Add(prefix: string, value: XmpPdfAExtensionObject)Add a PDF/A extension property under prefix.
Clear()Remove every property from the bound metadata.
Contains(key: string)Whether the bound metadata contains the given raw key.
Contains(item: KeyValuePair<string, XmpValue>)Whether the bound metadata contains the exact key/value pair.
ContainsKey(key: string)Calls ContainsKey on this Metadata instance.
CopyTo(array: KeyValuePair<string, XmpValue>[], index: int)Copy all key/value pairs into array starting at index.
GetEnumerator()Calls GetEnumerator on this Metadata instance.
GetNamespaceUriByPrefix(prefix: string)Resolve a registered prefix to its XML namespace URI, or null.
GetPrefixByNamespaceUri(namespaceUri: string)Reverse lookup: namespace URI to its registered prefix, or null.
RegisterNamespaceUri(prefix: string, namespaceUri: string)Register an XML namespace prefix → URI mapping.
RegisterNamespaceUri(prefix: string, namespaceUri: string, schemaDescription: string?)Register an XML namespace prefix → URI mapping along with a schema description (carried for PDF/A extension wiring).
Remove(key: string)Remove the property at key; returns true if it existed.
Remove(item: KeyValuePair<string, XmpValue>)Remove the exact key/value pair if it is currently present.
TryGetValue(key: string, value: XmpValue)Calls TryGetValue on this Metadata instance.
Get(key: string)Get a property’s string value by raw key, or null if absent.
SetPdfAidPart(part: string, conformance: string?, amd: string?)Set the PDF/A identifier triple (part, conformance, optional amd amendment string).

See Also