Initializes a new RedactorSettings instance with a given IRedactionCallback implementation.
def__init__(self,callback):...
Parameter
Type
Description
callback
IRedactionCallback
An instance of a class implementing the IRedactionCallback interface.
Example
fromgroupdocs.redaction.optionsimportRedactorSettingsdefaccept_first_only(description):# Accept only the first redaction changereturnTrue# Create settings with a callback functionsettings=RedactorSettings(callback=accept_first_only)
init
Initializes a new RedactorSettings instance with the specified IOcrConnector.
def__init__(self,ocr_connector):...
Parameter
Type
Description
ocr_connector
IOcrConnector
A valid implementation of the IOcrConnector interface.
init
Initializes a new instance of the RedactorSettings class with given ILogger and IRedactionCallback instances.
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.
init
Initializes a new RedactorSettings instance with optional logger, callback, and OCR connector.
The logger argument should be an object implementing the ILogger interface.
The callback argument should be an object implementing the IRedactionCallback interface.
The ocr_connector argument should implement IOcrConnector; it may be None when OCR integration is not required.
An instance of a class implementing the ILogger interface.
callback
IRedactionCallback
An instance of a class implementing the IRedactionCallback interface.
ocr_connector
IOcrConnector
An instance of an IOcrConnector implementation, or None.
Example
fromgroupdocs.redaction.optionsimportRedactorSettingsclassLog:deferror(self,message):passdefwarning(self,message):passdeftrace(self,message):passdefaccept_first_only(description):# Accept only the first redaction changereturnlen(description.original_text)>0# Create settings with a logger, a callback function, and no OCR connectorsettings=RedactorSettings(logger=Log(),callback=accept_first_only,ocr_connector=None)