ReplacementOptions class

ReplacementOptions class

Represents options for matched text replacement.

Learn more:

The ReplacementOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of ReplacementOptions with the specified replacement text.
init Initializes a new instance of ReplacementOptions class with a colored rectangle as an option.

Properties

Property Description
action_type The replacement action: draw box or replace text.
box_color The color used for a ReplacementType.draw_box option (ignored otherwise).
box_fill_color The color used for a draw box replacement. This property is obsolete; use ReplacementOptions.box_color instead.
custom_redaction The custom redaction ICustomRedactionHandler handler that allows users to define their own redaction logic.
filters The array of filters to apply with this redaction.
replacement The textual replacement value.

Example

from groupdocs.redaction.redactions import ExactPhraseRedaction, ReplacementOptions
from groupdocs.redaction import Redactor

with Redactor("document.docx") as redactor:
    redactor.apply(ExactPhraseRedaction("secret", ReplacementOptions("[X]")))
    redactor.save()

Guides

Task guides that use ReplacementOptions:

See Also