EraseMetadataRedaction
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.redaction.Redaction, com.groupdocs.redaction.redactions.MetadataRedaction
public class EraseMetadataRedaction extends MetadataRedaction
Represents a metadata redaction that erases all metadata or metadata matching specific MetadataFilters from the document.
Learn more
- More details about applying redactions: Redaction basics
- More details about document metadata redactions: Metadata redactions
The following example demonstrates how to erase (set equal to empty values) all or specific metadata.
try (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));
redactor.save();
}
| Constructor | Description |
|---|---|
| EraseMetadataRedaction() | Initializes a new instance of EraseMetadataRedaction class, erasing all metadata. |
| EraseMetadataRedaction(int filter) | Initializes a new instance of EraseMetadataRedaction class, erasing metadata, matching specific combination of MetadataFilters . |
| Method | Description |
|---|---|
| getDescription() | Returns a string, describing the redaction and its parameters. |
public EraseMetadataRedaction()
Initializes a new instance of EraseMetadataRedaction class, erasing all metadata.
public EraseMetadataRedaction(int filter)
Initializes a new instance of EraseMetadataRedaction class, erasing metadata, matching specific combination of MetadataFilters .
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filter | int | Filter for metadata to erase |
public String getDescription()
Returns a string, describing the redaction and its parameters.
Returns: java.lang.String - Text, containing redaction name and parameters.
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.