RedactorSettings class
Leave feedback
On this page
Represents redaction settings, allowing to customize the redaction process.
Learn more
- More details about implementing ILogger interface: Use advanced logging
- More details about implementing IRedactionCallback interface: Use redaction callback
The RedactorSettings type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the RedactorSettings class. |
| init | Initializes a new RedactorSettings instance with a given ILogger instance. |
| init | Initializes a new instance of the RedactorSettings class with a given IRedactionCallback instance. |
| init | Initializes a new RedactorSettings instance with the specified IOcrConnector. |
| init | Initializes a new RedactorSettings instance with the specified logger and callback. |
| init | Initializes a new instance of the RedactorSettings class with given ILogger, IRedactionCallback and IOcrConnector instances. |
| Property | Description |
|---|---|
| logger | The logger used for logging events and errors. Must be an instance of a class implementing ILogger. |
| ocr_connector | The OCR connector instance implementing IOcrConnector. |
| redaction_callback | The redaction callback used to evaluate each redaction description. |
from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import ExactPhraseRedaction, ReplacementOptions
from groupdocs.redaction.options import LoadOptions, RedactorSettings
def accept(description):
# description.original_text, .redaction_type, .action_type
return "keep-me" not in (description.original_text or "")
with Redactor("document.docx", LoadOptions(), RedactorSettings(callback=accept)) as redactor:
redactor.apply(ExactPhraseRedaction("secret", ReplacementOptions("[X]")))
redactor.save()
- module
groupdocs.redaction.options
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.