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.Remove(String) Method

Removes the specified node from the XMP packet.

Namespace: DevExpress.Pdf.Xmp

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

NuGet Package: DevExpress.Pdf.Core

#Declaration

public bool Remove(
    string qualifiedName
)

#Parameters

Name Type Description
qualifiedName String

The node’s qualified name (prefix:local format).

#Returns

Type Description
Boolean

true if the node is successfully removed; otherwise, false.

#Example

The code sample below removes the dc:Title node:

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    // Load a document
    pdfDocumentProcessor.LoadDocument("Documents//Invoice.pdf");
    PdfDocument document = pdfDocumentProcessor.Document;

    // Retrieve metadata:
    XmpDocument metadata = XmpDocument.FromString(document.Metadata.Data);

    // Delete the node:
    metadata.Remove("dc:title");

    // Apply changes:
    document.SetMetadata(metadata);

    // Save the result:
    pdfDocumentProcessor.SaveDocument("Invoice_Upd.pdf");
}
See Also