EraseMetadataRedaction class
Leave feedback
On this page
Represents a metadata redaction that erases all metadata or metadata matching specific MetadataFilters from the document.
- More details about applying redactions: https://docs.groupdocs.com/redaction/net/redaction-basics/
- More details about document metadata redactions: https://docs.groupdocs.com/redaction/net/metadata-redactions/
The EraseMetadataRedaction type exposes the following members:
| 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. |
| Method | Description |
|---|---|
| apply_to | Applies the redaction to a given format instance. (inherited from MetadataRedaction) |
| apply_to_document_format_instance | (inherited from MetadataRedaction) |
| 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) |
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()
Task guides that use EraseMetadataRedaction:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.