PageAreaRedaction class

PageAreaRedaction class

Represents a complex textual redaction that affects text, images and annotations in an area of the page.

The PageAreaRedaction type exposes the following members:

Constructors

Constructor Description
init Initializes a new PageAreaRedaction.
init Initializes a new PageAreaRedaction.

Methods

Method Description
apply_to Applies the redaction to a given format instance.

Properties

Property Description
image_options The image options specifying color and area parameters.
action_options The ReplacementOptions instance specifying the type of text replacement. (inherited from TextRedaction)
description The description of the redaction, containing its name and parameters. (inherited from RegexRedaction)
ocr_connector The OCR connector implementation used to extract text from graphic content. (inherited from TextRedaction)
regular_expression The regular expression used for matching. (inherited from RegexRedaction)

Example

from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import PageAreaRedaction, RegionReplacementOptions, ReplacementOptions
from groupdocs.redaction.options.drawing import Point, Size, Color

with Redactor("scan.pdf") as redactor:
    # redact text and its image rendering in a page area
    redaction = PageAreaRedaction(
        r"\d{3}-\d{2}-\d{4}",
        ReplacementOptions("[SSN]"),
        RegionReplacementOptions(Color.black, Size(120, 20))
    )
    redactor.apply(redaction)
    redactor.save()

Guides

Task guides that use PageAreaRedaction:

See Also