EraseMetadataRedaction Class
Represents a metadata redaction that erases all metadata or metadata matching specific MetadataFilters from the document.
Inheritance Hierarchy

Namespace: GroupDocs.Redaction.Redactions
Assembly: GroupDocs.Redaction (in GroupDocs.Redaction.dll) Version: 21.9
public class EraseMetadataRedaction : MetadataRedaction

The EraseMetadataRedaction type exposes the following members.

Public methodEraseMetadataRedaction
Initializes a new instance of EraseMetadataRedaction class, erasing all metadata.
Public methodEraseMetadataRedaction(MetadataFilters)
Initializes a new instance of EraseMetadataRedaction class, erasing metadata, matching specific combination of MetadataFilters.
Public propertyDescription
Returns a string, describing the redaction and its parameters.
(Overrides RedactionDescription.)
Public propertyFilter
Gets or sets the filter, which is used to select all or specific metadata, e.g. Author or Company.
(Inherited from MetadataRedaction.)
Protected methodApplyFilter
Applies the current Filter value to a given metadata dictionary.
(Inherited from MetadataRedaction.)
Public methodApplyTo(DocumentFormatInstance)
Applies the redaction to a given format instance.
(Inherited from MetadataRedaction.)
Protected methodApplyTo(MetadataItem, IMetadataAccess)
Applies the redaction to a given metadata item.
(Overrides MetadataRedactionApplyTo(MetadataItem, IMetadataAccess).)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodIsApplicableTo
Checks if this redaction could be applied to a given metadata item.
(Overrides MetadataRedactionIsApplicableTo(MetadataItem).)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Learn more
The following example demonstrates how to erase (set equal to empty values) all or specific metadata.
using (Redactor redactor = new Redactor(@"C:\sample.docx"))
   // Erase Author, Manager and Company
   redactor.Apply(new EraseMetadataRedaction(MetadataFilters.Author | MetadataFilters.Manager | MetadataFilters.Company));
   // Erase all metadata
   redactor.Apply(new EraseMetadataRedaction(MetadataFilters.All));
See Also