Aspose::Pdf::Facades::PdfXmpMetadata Class Referencefinal

Class for manipulation with XMP metadata. More...

Inherits Aspose::Pdf::Facades::SaveableFacade, and System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

Public Member Functions

System::SharedPtr< System::Collections::Generic::IDictionary< System::String, System::SharedPtr< XmpPdfAExtensionSchema > > > get_ExtensionFields ()
 Gets the dictionary of extension fields. More...
 
bool get_IsFixedSize ()
 Returns true is collection has fixed size. More...
 
bool get_IsReadOnly () const
 Returns true if collection is read-only. More...
 
int32_t get_Count () const
 Gets count if items in the collection. More...
 
bool get_IsSynchronized ()
 Returns true if collection is synchronized. More...
 
 PdfXmpMetadata ()
 Constructor for PdfXmpMetadata. More...
 
 PdfXmpMetadata (System::SharedPtr< Aspose::Pdf::Document > document)
 Initializes new PdfXmpMetadata object on base of the document . More...
 
void RegisterNamespaceURI (System::String prefix, System::String namespaceURI)
 Registers the namespace URI. More...
 
System::String GetNamespaceURIByPrefix (System::String prefix)
 Gets namespace URI by prefix. More...
 
System::String GetPrefixByNamespaceURI (System::String namespaceURI)
 Gets the prefix by namespace URI. More...
 
void Add (DefaultMetadataProperties const &key, System::SharedPtr< XmpValue > const &value)
 Adds value to XMP metadata. More...
 
void Add (System::SharedPtr< XmpPdfAExtensionObject > xmpPdfAExtensionObject, System::String namespacePrefix, System::String namespaceUri, System::String schemaDescription)
 Adds extension field into metadata. More...
 
void Clear ()
 Removes all elements from the object. More...
 
void Remove (DefaultMetadataProperties key)
 Removes element with specified key. More...
 
void Add (System::String const &key, System::SharedPtr< XmpValue > const &value)
 Adds new element to the dictionary object. More...
 
void Add (System::String const &key, System::SharedPtr< System::Object > const &value)
 Adds new element to the dictionary object. More...
 
bool Contains (System::String const &key) const
 Checks if dictionary contains the specified key. More...
 
bool Contains (DefaultMetadataProperties const &property) const
 Checks if dictionary contains the specified property. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue > > > > GetEnumerator ()
 Gets enumerator object of the dictionary. More...
 
bool Remove (System::String const &key)
 Removes key from the dictionary. More...
 
System::SharedPtr< XmpValueidx_get (System::String const &key) const
 Gets value by key. More...
 
void idx_set (System::String const &key, System::SharedPtr< XmpValue > value)
 Sets value by key. More...
 
void CopyTo (System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >>> array, int32_t index)
 Copy metadata into array. More...
 
System::SharedPtr< XmpValueidx_get (DefaultMetadataProperties const &key) const
 Gets value of XMP metadata by key. More...
 
void idx_set (DefaultMetadataProperties const &key, System::SharedPtr< XmpValue > value)
 Gets value of XMP metadata by key. More...
 
System::ArrayPtr< uint8_t > GetXmpMetadata ()
 Get the XmpMetadata of the input pdf in a xml format. More...
 
System::ArrayPtr< uint8_t > GetXmpMetadata (System::String name)
 Get a part of the XmpMetadata of the input pdf according to a meta name. More...
 
bool ContainsKey (System::String const &key) const
 Determines does this dictionary contasins specified key. More...
 
bool TryGetValue (System::String const &key, System::SharedPtr< XmpValue > &value) const
 Tries to find key in the dictionary and retreives value if found. More...
 
void Add (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &item)
 Adds pair with key and value into the dictionary. More...
 
bool Contains (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &item) const
 Checks does specified key-value pair is contained in the dictionary. More...
 
bool Remove (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &item)
 Removes key/value pair from the colleciton. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::SaveableFacade
virtual void Save (System::String destFile)
 Saves the PDF document to the specified file. More...
 
virtual void Save (System::SharedPtr< System::IO::Stream > destStream)
 Saves the PDF document to the specified stream. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::Facade
System::SharedPtr< Aspose::Pdf::Documentget_Document () const
 Gets the document facade is working on. More...
 
void SetVentureLicense (System::SharedPtr< Aspose::Pdf::LicenseManagement::VentureLicense > license)
 
System::SharedPtr< Aspose::Pdf::LicenseManagement::VentureLicense > GetVentureLicense ()
 
virtual void BindPdf (System::String srcFile)
 Initializes the facade. More...
 
virtual void BindPdf (System::SharedPtr< System::IO::Stream > srcStream)
 Initializes the facade. More...
 
virtual void BindPdf (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 Initializes the facade. More...
 
virtual void Close ()
 Disposes Aspose.Pdf.Document bound with a facade. More...
 
void Dispose ()
 Disposes the facade. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::IFacade
virtual void BindPdf (System::SharedPtr< Document > srcDoc)=0
 Binds PDF document for editing. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 
- Public Member Functions inherited from Aspose::Pdf::LicenseManagement::IVentureLicenseTarget
virtual void SetVentureLicense (System::SharedPtr< VentureLicense > license)=0
 
- Public Member Functions inherited from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >
virtual SharedPtr< ICollection< System::String > > get_Keys () const
 
virtual SharedPtr< ICollection< System::SharedPtr< Aspose::Pdf::XmpValue > > > get_Values () const
 
bool get_IsFixedSize () const
 
bool get_IsSynchronized () const
 
SharedPtr< Objectget_SyncRoot ()
 
virtual void CopyTo (ArrayPtr< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >> arr, int index) override
 
virtual System::SharedPtr< Aspose::Pdf::XmpValueGetValueOrDefault (const System::String &key) const
 Returns value if found; or Value() otherwise. More...
 
virtual System::SharedPtr< Aspose::Pdf::XmpValueGetValueOrDefault (const System::String &key, const System::SharedPtr< Aspose::Pdf::XmpValue > &defaultValue) const
 Returns value if found; or defaultValue otherwise. More...
 
virtual System::SharedPtr< Aspose::Pdf::XmpValueGetValueOrNull (const System::String &key) const
 Returns value if found; or null otherwise, make sense only for reference types. More...
 
- Public Member Functions inherited from System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >
virtual void Add (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > &item)=0
 
virtual bool Contains (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > &item) const=0
 
virtual bool Remove (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > &item)=0
 
virtual void CopyTo (System::ArrayPtr< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > array, int arrayIndex)=0
 
ICollectionoperator= (ICollection &&)
 
ICollectionoperator= (const ICollection &)
 
 ICollection ()
 Default constructor. More...
 
 ICollection (const ICollection &)
 Copy constructor. More...
 
 ICollection (ICollection &&)
 Move constructor. More...
 
virtual ~ICollection ()
 Destructor. More...
 
- Public Member Functions inherited from System::Collections::Generic::IEnumerable< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >
KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > LINQ_ElementAt (int index)
 
KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > LINQ_First ()
 
KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > LINQ_FirstOrDefault ()
 
KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > LINQ_FirstOrDefault (std::function< bool(KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >)> predicate)
 
KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > LINQ_Last ()
 
KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > LINQ_LastOrDefault ()
 
SharedPtr< List< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > > LINQ_ToList ()
 
int LINQ_Count ()
 
System::ArrayPtr< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > LINQ_ToArray ()
 
bool LINQ_All (std::function< bool(KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >)> predicate)
 
bool LINQ_Any ()
 
bool LINQ_Any (std::function< bool(KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >)> predicate)
 
SharedPtr< IEnumerable< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > > LINQ_Where (std::function< bool(KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >)> predicate)
 
bool LINQ_Contains (KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > value)
 
SharedPtr< IEnumerable< ResultType > > LINQ_Cast ()
 
SharedPtr< IEnumerable< Result > > LINQ_Cast ()
 
SharedPtr< IEnumerable< ResultType > > LINQ_OfType ()
 
SharedPtr< IEnumerable< Result > > LINQ_OfType ()
 
SharedPtr< IEnumerable< ResultType > > LINQ_Select (const Func< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >, ResultType > &selector)
 
SharedPtr< IEnumerable< Result > > LINQ_Select (const Func< Source, Result > &selector)
 

Protected Member Functions

System::SharedPtr< System::Collections::Generic::ICollection< System::String > > get_KeysInternal () const
 Implementation of get_Keys() method. More...
 
System::SharedPtr< System::Collections::Generic::ICollection< System::SharedPtr< XmpValue > > > get_ValuesInternal () const
 Implementation of get_Values() method. More...
 
- Protected Member Functions inherited from Aspose::Pdf::Facades::SaveableFacade
 SaveableFacade ()
 The constructor. More...
 
 SaveableFacade (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 The constructor. More...
 
- Protected Member Functions inherited from Aspose::Pdf::Facades::Facade
bool get__IsObjectLicensed ()
 Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise. More...
 
 Facade ()
 The constructor. More...
 
 Facade (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 The constructor. More...
 
virtual void BindPdf (System::String srcFile, System::String password)
 Initializes the facade. More...
 
virtual void BindPdf (System::SharedPtr< System::IO::Stream > srcStream, System::String password)
 Initializes the facade. More...
 
virtual void AssertDocument () const
 Asserts if the facade is initialized. More...
 
virtual ~Facade ()
 
- Protected Member Functions inherited from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >
 ~IDictionary () override
 Destructor. More...
 
- Protected Member Functions inherited from System::Collections::Generic::IEnumerable< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >
 ~IEnumerable () override
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Public Types inherited from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >
typedef ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > BaseType
 Base interface type. More...
 
typedef KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > KeyValuePairType
 Key value pair type. More...
 
- Public Types inherited from System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >
typedef KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > ValueType
 Value type name. More...
 
typedef ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > ThisType
 Collection type name. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >
typedef IEnumerator< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > > IEnumeratorType
 Enumerator type. More...
 
using ValueType = KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

Class for manipulation with XMP metadata.

Constructor & Destructor Documentation

◆ PdfXmpMetadata() [1/2]

Aspose::Pdf::Facades::PdfXmpMetadata::PdfXmpMetadata ( )

Constructor for PdfXmpMetadata.

PdfXmlMetadata xmp = new PdfXmpMetadata();
xmp.BindPdf("input.pdf");

◆ PdfXmpMetadata() [2/2]

Aspose::Pdf::Facades::PdfXmpMetadata::PdfXmpMetadata ( System::SharedPtr< Aspose::Pdf::Document document)

Initializes new PdfXmpMetadata object on base of the document .

Parameters
documentPdf document.

Member Function Documentation

◆ Add() [1/5]

void Aspose::Pdf::Facades::PdfXmpMetadata::Add ( DefaultMetadataProperties const &  key,
System::SharedPtr< XmpValue > const &  value 
)

Adds value to XMP metadata.

Parameters
keyThe key name.
valueValue which will be added.
xmp.BindPdf("input.pdf");
xmp.Add(DefaultMetadataProperties.Nickname, "name1");
xmp.Save(TestSettings.GetOutputFile("XMP_AddedValue.pdf"));

◆ Add() [2/5]

void Aspose::Pdf::Facades::PdfXmpMetadata::Add ( System::SharedPtr< XmpPdfAExtensionObject xmpPdfAExtensionObject,
System::String  namespacePrefix,
System::String  namespaceUri,
System::String  schemaDescription 
)

Adds extension field into metadata.

Parameters
xmpPdfAExtensionObjectThe pdf extension object to add.
namespacePrefixThe prefix of schema.
namespaceUriThe namespace uri of schema.
schemaDescriptionThe optional description of schema.

◆ Add() [3/5]

void Aspose::Pdf::Facades::PdfXmpMetadata::Add ( System::String const &  key,
System::SharedPtr< XmpValue > const &  value 
)
virtual

Adds new element to the dictionary object.

Parameters
keyKey of new element.
valueValue of the element.
xmp.BindPdf("input.pdf");
xmp.Add("xmp:Nickname", "Nickname1");

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ Add() [4/5]

void Aspose::Pdf::Facades::PdfXmpMetadata::Add ( System::String const &  key,
System::SharedPtr< System::Object > const &  value 
)

Adds new element to the dictionary object.

Parameters
keyKey of new element.
valueValue of the element.

◆ Add() [5/5]

void Aspose::Pdf::Facades::PdfXmpMetadata::Add ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &  item)

Adds pair with key and value into the dictionary.

Parameters
itemItem to be added.

◆ Clear()

void Aspose::Pdf::Facades::PdfXmpMetadata::Clear ( )
virtual

Removes all elements from the object.

xmp.BindPdf("input.pdf");
xmp.Clear();

Implements System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >.

◆ Contains() [1/3]

bool Aspose::Pdf::Facades::PdfXmpMetadata::Contains ( System::String const &  key) const

Checks if dictionary contains the specified key.

Parameters
keyKey which will be checked.
Returns
True - if the dictionary contains the specified key; otherwise, false.
xmp.BindPdf("input.pdf");
xmp.Add("xmp:Nickname", "Nickname1");
if (!xmp.Contains("xmp:Nickname"))
Console.WriteLine("Key does not exists");

◆ Contains() [2/3]

bool Aspose::Pdf::Facades::PdfXmpMetadata::Contains ( DefaultMetadataProperties const &  property) const

Checks if dictionary contains the specified property.

Parameters
propertyProperty which will be checked.
Returns
True - if the dictionary contains the specified property; otherwise, false.

◆ Contains() [3/3]

bool Aspose::Pdf::Facades::PdfXmpMetadata::Contains ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &  item) const

Checks does specified key-value pair is contained in the dictionary.

Parameters
itemKey-value pair.
Returns
true if this pauir was found.

◆ ContainsKey()

bool Aspose::Pdf::Facades::PdfXmpMetadata::ContainsKey ( System::String const &  key) const
virtual

Determines does this dictionary contasins specified key.

Parameters
keyKey to search in the dictionary.
Returns
true if key is found.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ CopyTo()

void Aspose::Pdf::Facades::PdfXmpMetadata::CopyTo ( System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >>>  array,
int32_t  index 
)

Copy metadata into array.

Parameters
arrayThe destination array.
indexThe starting index.

◆ get_Count()

int32_t Aspose::Pdf::Facades::PdfXmpMetadata::get_Count ( ) const
virtual

Gets count if items in the collection.

pxm.BindPdf("PdfFile.pdf");
Console.WriteLine("Count = " + pxm.Count);

Implements System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > > >.

◆ get_ExtensionFields()

System::SharedPtr<System::Collections::Generic::IDictionary<System::String, System::SharedPtr<XmpPdfAExtensionSchema> > > Aspose::Pdf::Facades::PdfXmpMetadata::get_ExtensionFields ( )

Gets the dictionary of extension fields.

◆ get_IsFixedSize()

bool Aspose::Pdf::Facades::PdfXmpMetadata::get_IsFixedSize ( )

Returns true is collection has fixed size.

◆ get_IsReadOnly()

bool Aspose::Pdf::Facades::PdfXmpMetadata::get_IsReadOnly ( ) const
virtual

◆ get_IsSynchronized()

bool Aspose::Pdf::Facades::PdfXmpMetadata::get_IsSynchronized ( )

Returns true if collection is synchronized.

◆ get_KeysInternal()

System::SharedPtr<System::Collections::Generic::ICollection<System::String> > Aspose::Pdf::Facades::PdfXmpMetadata::get_KeysInternal ( ) const
protectedvirtual

◆ get_ValuesInternal()

System::SharedPtr<System::Collections::Generic::ICollection<System::SharedPtr<XmpValue> > > Aspose::Pdf::Facades::PdfXmpMetadata::get_ValuesInternal ( ) const
protectedvirtual

◆ GetEnumerator()

◆ GetNamespaceURIByPrefix()

System::String Aspose::Pdf::Facades::PdfXmpMetadata::GetNamespaceURIByPrefix ( System::String  prefix)

Gets namespace URI by prefix.

Parameters
prefixThe prefix.
Returns
Namespace URI.
PdfXmpMetadata xmp = new PdfXmpMetadata("input.pdf");
Console.WriteLine(xmp.GetNamespaceURIByPrefix("xmp"));

◆ GetPrefixByNamespaceURI()

System::String Aspose::Pdf::Facades::PdfXmpMetadata::GetPrefixByNamespaceURI ( System::String  namespaceURI)

Gets the prefix by namespace URI.

Parameters
namespaceURINamespace URI.
Returns
The prefix value.
PdfXmpMetadata xmp = new PdfXmpMetadata("input.pdf");
Console.WriteLine(xmp.GetPrefixByNamespaceURI("http://ns.adobe.com/xap/1.0/"));

◆ GetXmpMetadata() [1/2]

System::ArrayPtr<uint8_t> Aspose::Pdf::Facades::PdfXmpMetadata::GetXmpMetadata ( )

Get the XmpMetadata of the input pdf in a xml format.

Returns
The bytes of the XmpMetadata.
pxm.BindPdf("PdfFile.pdf");
byte[] data = pxm.GetXmpMetadata();

◆ GetXmpMetadata() [2/2]

System::ArrayPtr<uint8_t> Aspose::Pdf::Facades::PdfXmpMetadata::GetXmpMetadata ( System::String  name)

Get a part of the XmpMetadata of the input pdf according to a meta name.

Parameters
nameMetadata name.
Returns
Bytes of metadata.
pxm.BindPdf("PdfFile.pdf");
byte[] data = pxm.GetXmpMetadata("dc:creator");

◆ idx_get() [1/2]

System::SharedPtr<XmpValue> Aspose::Pdf::Facades::PdfXmpMetadata::idx_get ( System::String const &  key) const
virtual

Gets value by key.

Parameters
keyThe key name to get/set.
Returns
Object by key
pxm.BindPdf("PdfFile.pdf");
Console.WriteLine(pxm["xmp:Nickname"]);

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ idx_get() [2/2]

System::SharedPtr<XmpValue> Aspose::Pdf::Facades::PdfXmpMetadata::idx_get ( DefaultMetadataProperties const &  key) const

Gets value of XMP metadata by key.

Parameters
keyKey of the value.
Returns
Value from XMP metadata.
pxm.BindPdf("PdfFile.pdf");
Console.WriteLine(pxm[DefaultMetadataProperties.CreatorTool]);

◆ idx_set() [1/2]

void Aspose::Pdf::Facades::PdfXmpMetadata::idx_set ( System::String const &  key,
System::SharedPtr< XmpValue value 
)
virtual

Sets value by key.

Parameters
keyThe key name to get/set.
valueObject by key
pxm.BindPdf("PdfFile.pdf");
Console.WriteLine(pxm["xmp:Nickname"]);

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ idx_set() [2/2]

void Aspose::Pdf::Facades::PdfXmpMetadata::idx_set ( DefaultMetadataProperties const &  key,
System::SharedPtr< XmpValue value 
)

Gets value of XMP metadata by key.

Parameters
keyKey of the value.
valueValue from XMP metadata.
pxm.BindPdf("PdfFile.pdf");
Console.WriteLine(pxm[DefaultMetadataProperties.CreatorTool]);

◆ RegisterNamespaceURI()

void Aspose::Pdf::Facades::PdfXmpMetadata::RegisterNamespaceURI ( System::String  prefix,
System::String  namespaceURI 
)

Registers the namespace URI.

Parameters
prefixThe prefix.
namespaceURIThe namespace URI.
PdfXmpMetadata xmp = new PdfXmpMetadata("input.pdf");
xmp.RegisterNamespaceURI("xmp", "http://ns.adobe.com/xap/1.0/");

◆ Remove() [1/3]

void Aspose::Pdf::Facades::PdfXmpMetadata::Remove ( DefaultMetadataProperties  key)

Removes element with specified key.

Parameters
keyKey of the element which will be deleted.
xmp.BindPdf("input.pdf");
xmp.Remove(DefaultMetadataProperties.Nickname);

◆ Remove() [2/3]

bool Aspose::Pdf::Facades::PdfXmpMetadata::Remove ( System::String const &  key)
virtual

Removes key from the dictionary.

Parameters
keyKey which will be removed.
xmp.BindPdf("input.pdf");
xmp.Remove("xmp:Nickname");

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.

◆ Remove() [3/3]

bool Aspose::Pdf::Facades::PdfXmpMetadata::Remove ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XmpValue >> const &  item)

Removes key/value pair from the colleciton.

Parameters
itemKey/value pair to be removed.
Returns
true if pair was found and removed.

◆ TryGetValue()

bool Aspose::Pdf::Facades::PdfXmpMetadata::TryGetValue ( System::String const &  key,
System::SharedPtr< XmpValue > &  value 
) const
virtual

Tries to find key in the dictionary and retreives value if found.

Parameters
keyKey to search in the dictionary.
valueRetreived value.
Returns
true if key was found.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XmpValue > >.