__init__ constructor
Leave feedback
On this page
Initializes a new instance of the RedactorSettings class.
def __init__(self):
...
from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import ExactPhraseRedaction, ReplacementOptions
from groupdocs.redaction.options import RedactorSettings
def accept(description):
# description.original_text, .redaction_type, .action_type
return "keep-me" not in (description.original_text or "")
with Redactor("document.docx", RedactorSettings(callback=accept)) as redactor:
redactor.apply(ExactPhraseRedaction("secret", ReplacementOptions("[X]")))
redactor.save()
Initializes a new RedactorSettings instance with a given ILogger instance.
def __init__(self, logger):
...
| Parameter | Type | Description |
|---|---|---|
| logger | ILogger |
An instance of a class implementing the ILogger interface. |
Initializes a new instance of the RedactorSettings class with a given IRedactionCallback instance.
def __init__(self, callback):
...
| Parameter | Type | Description |
|---|---|---|
| callback | IRedactionCallback |
An instance of a class implementing IRedactionCallback interface. |
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()
Initializes a new RedactorSettings instance with the specified IOcrConnector.
def __init__(self, ocr_connector):
...
| Parameter | Type | Description |
|---|---|---|
| ocr_connector | IOcrConnector |
A valid implementation of IOcrConnector interface. |
Initializes a new RedactorSettings instance with the specified logger and callback.
def __init__(self, logger, callback):
...
| Parameter | Type | Description |
|---|---|---|
| logger | ILogger |
An instance of a class implementing the ILogger interface. |
| callback | IRedactionCallback |
An instance of a class implementing the IRedactionCallback interface. |
from groupdocs.redaction.options import RedactorSettings
def accept(description):
# description.original_text, .redaction_type, .action_type
return "keep-me" not in (description.original_text or "")
settings = RedactorSettings(callback=accept)
Initializes a new instance of the RedactorSettings class with given ILogger, IRedactionCallback and IOcrConnector instances.
def __init__(self, logger, callback, ocr_connector):
...
| Parameter | Type | Description |
|---|---|---|
| logger | ILogger |
An instance of a class implementing ILogger interface. |
| callback | IRedactionCallback |
An instance of a class implementing IRedactionCallback interface. |
| ocr_connector | IOcrConnector |
An instance of IOcrConnector interface implementation. Can be None. |
from groupdocs.redaction.options import RedactorSettings
def accept(description):
# description.original_text, .redaction_type, .action_type
return "keep-me" not in (description.original_text or "")
settings = RedactorSettings(callback=accept)
- class
RedactorSettings
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.