XmpDocument.XmpProperties Property
In This Article
Gets properties used to define the XMP basic namespace.
Namespace: DevExpress.Pdf.Xmp
Assembly: DevExpress.Pdf.v24.2.Core.dll
NuGet Package: DevExpress.Pdf.Core
#Declaration
public XmpProperties XmpProperties { get; }
#Property Value
Type | Description |
---|---|
Xmp |
An object that contains XMP basic namespace properties. |
#Example
The code sample below adds items from the basic schema to the packet:
using DevExpress.Pdf;
using DevExpress.Pdf.Xmp;
//...
using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
// Load a document:
pdfDocumentProcessor.LoadDocument("Documents//Invoice.pdf");
PdfDocument document = pdfDocumentProcessor.Document;
// Create a new XMP packet:
XmpDocument metadata = new XmpDocument();
XmpProperties basicSchema = metadata.XmpProperties;
basicSchema.CreatorTool = "PDF Document API";
basicSchema.Label = "Sample";
basicSchema.Identifier.Add("Id");
basicSchema.Rating = "0";
// Embed metadata in the document:
document.SetMetadata(metadata);
// Save the result:
pdfDocumentProcessor.SaveDocument("Invoice_Upd.pdf");
}
See Also