officefileapi-devexpress-dot-pdf-dot-xmp-dot-xmpdocument-dot-remove-x28-system-dot-string-x29.md
Removes the specified node from the XMP packet.
Namespace : DevExpress.Pdf.Xmp
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public bool Remove(
string qualifiedName
)
Public Function Remove(
qualifiedName As String
) As Boolean
| Name | Type | Description |
|---|---|---|
| qualifiedName | String |
The node’s qualified name ( prefix:local format).
|
| Type | Description |
|---|---|
| Boolean |
true if the node is successfully removed; otherwise, false.
|
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");
}
Using pdfDocumentProcessor As New PdfDocumentProcessor()
' Load a document
pdfDocumentProcessor.LoadDocument("Documents//Invoice.pdf")
Dim document As PdfDocument = pdfDocumentProcessor.Document
' Retrieve metadata:
Dim metadata As XmpDocument = 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")
End Using
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Remove(String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
pdf-document-api-xmp-example/CS/XmpMetadataExamples/Program.cs#L48
editedMetadata.Remove("dc:subject");
pdf-document-api-xmp-example/VB/XmpMetadataExamples/Program.vb#L39
dimensions.Add("stDim:Unit", "inch")
editedMetadata.Remove("dc:subject")
' Embed modified metadata to the document:
See Also