Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XmpDocument.CustomProperties Property

Gets properties used to define a custom schema.

Namespace: DevExpress.Pdf.Xmp

Assembly: DevExpress.Pdf.v24.2.Core.dll

NuGet Package: DevExpress.Pdf.Core

#Declaration

public CustomProperties CustomProperties { get; }

#Property Value

Type Description
CustomProperties

An object that contains a custom schema properties.

#Remarks

Create a CustomProperties class object and fill it with items to create a custom schema. Assign this object to the CustomProperties property to add your schema to the packet.

#Example

using DevExpress.Pdf;
using DevExpress.Pdf.Xmp;
//...

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    pdfDocumentProcessor.LoadDocument("Documents//Invoice.pdf");
    PdfDocument document = pdfDocumentProcessor.Document;
    XmpDocument metadata = XmpDocument.FromString(document.Metadata.Data);

    metadata.RegisterNamespace("https://www.devexpress.com/", "dx");
    CustomProperties customProperties = new CustomProperties(metadata, "https://www.devexpress.com/");
    customProperties["Team"] = "Office";
    customProperties["Checked"] = "true";
    customProperties["Project"] = "PDF Document API";

    document.SetMetadata(metadata);
    pdfDocumentProcessor.SaveDocument("Invoice_Upd.pdf");
}
See Also