PageAreaRedaction class
Leave feedback
On this page
Represents a complex textual redaction that affects text, images and annotations in an area of the page.
Learn more
- More details about applying redactions: Redaction basics
- More details about PageAreaRedaction: Use PageAreaRedaction
The PageAreaRedaction type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new PageAreaRedaction instance. |
| init | Initializes a new PageAreaRedaction. |
| Method | Description |
|---|---|
| apply_to | Applies the redaction to a given format instance. |
| apply_to_document_format_instance |
| 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) |
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()
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.