XmpMetadata
Vue de l’ensemble
‘XmpMetadata’ est une classe dans Aspose.PDF FOSS pour .NET.
Il fournit un accès aux métadonnées XMP intégrées dans le PDF.
Cette classe fournit 11 méthodes pour travailler avec des objets XmpMetadata dans les programmes .NET. Les méthodologies disponibles comprennent: ‘Add’, ‘ContainsKey’, Get, ‘GatArray’, ‘GitXmpValue’, ‘RegisterNamespaceUri’, ’Remove , 'Set et ‘SetArry’ ToXml. Tous les membres publics sont accessibles à n’importe quelle application .Net après l’installation de l’Aspose.PDF FOSS pour le package .net. Propriétés : ‘Count ; 'IsDirty; ‘Keys : PdfAidConformance ou ‘PdfaidPart’.
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
Keys | IEnumerable<string> | Read | All metadata property keys. |
Count | int | Read | Number of properties. |
PdfAidPart | string? | Read/Write | Get PDF/A identification part (pdfaid:part), e.g. |
PdfAidConformance | string? | Read/Write | Get PDF/A identification conformance level (pdfaid:conformance), e.g. |
IsDirty | bool | Read | Whether the metadata has been modified since loading. |
méthodes
| Signature | Description |
|---|---|
Get(key: string) | Get a metadata property by key (e.g., “dc:title”, “xmp:CreatorTool”). |
ContainsKey(key: string) | Whether a key exists. |
Set(key: string, value: string) | Set a metadata property. |
Add(key: string, value: XmpValue) | Add a metadata property with a typed XmpValue. |
Add(key: string, value: string) | Add a metadata property with a string value. |
GetXmpValue(key: string) | Get a metadata property as a typed XmpValue, or null if not found. |
Remove(key: string) | Remove a metadata property. |
GetArray(key: string) | Get a metadata property as an array of values (for rdf:Seq/Bag properties like dc:creator, dc:subject). |
SetArray(key: string, values: IEnumerable<string>) | Set a metadata property as an array (serialized to rdf:Seq). |
RegisterNamespaceUri(prefix: string, namespaceUri: string) | Register a custom namespace URI for a prefix so that properties using that prefix can be serialized with the correct namespace declaration in ToXml(). |
ToXml() | Serialize the metadata to an XMP/RDF XML string. |
Voir aussi
- Aspose.PDF pour .NET — API d’entreprise