PageAreaRedaction class

PageAreaRedaction class

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

Learn more

The PageAreaRedaction type exposes the following members:

Constructors

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

Methods

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

Properties

Property Description
image_options The RegionReplacementOptions options with 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 IOcrConnector implementation used to extract text from graphic content. (inherited from TextRedaction)
regular_expression The regular expression pattern used for matching. (inherited from RegexRedaction)

Example

from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import PageAreaRedaction, ReplacementOptions, RegionReplacementOptions
from groupdocs.pydrawing import Color, Size

with Redactor("scan.pdf") as redactor:
    redactor.apply(
        PageAreaRedaction(
            r"\d{3}-\d{2}-\d{4}",
            ReplacementOptions("[SSN]"),
            RegionReplacementOptions(Color.BLACK, Size(120, 20))
        )
    )
    redactor.save()

See Also