EraseMetadataRedaction class

EraseMetadataRedaction class

Represents a metadata redaction that erases all metadata or metadata matching specific MetadataFilters from the document.

The EraseMetadataRedaction type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of EraseMetadataRedaction class, erasing all metadata.
init Initializes a new instance of EraseMetadataRedaction, erasing metadata that matches the specified MetadataFilters.

Methods

Method Description
apply_to Applies the redaction to a given format instance. (inherited from MetadataRedaction)
apply_to_document_format_instance (inherited from MetadataRedaction)

Properties

Property Description
description The description of the redaction and its parameters.
filter The filter used to select all or specific metadata, such as Author or Company. (inherited from MetadataRedaction)

Example

from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import EraseMetadataRedaction, MetadataFilters

with Redactor("document.docx") as redactor:
    # Erase all metadata
    redactor.apply(EraseMetadataRedaction(MetadataFilters.ALL))
    # Erase only the author field
    redactor.apply(EraseMetadataRedaction(MetadataFilters.AUTHOR))
    redactor.save()

Guides

Task guides that use EraseMetadataRedaction:

See Also