__init__ constructor
Leave feedback
On this page
Initializes a new DeleteAnnotationRedaction instance that deletes all annotations (matches everything).
def __init__(self):
...
Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching the given regular expression.
def __init__(self, pattern):
...
| Parameter | Type | Description |
|---|---|---|
| pattern | str |
Regular expression. |
from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import DeleteAnnotationRedaction
with Redactor("document.pdf") as redactor:
redactor.apply(DeleteAnnotationRedaction("(?i)internal"))
redactor.save()
```
## __init__ {#regex}
Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.
```python
def __init__(self, regex):
...
| Parameter | Type | Description |
|---|---|---|
| regex | System.Text.RegularExpressions.Regex |
Regular expression. |
from groupdocs.redaction.redactions import DeleteAnnotationRedaction
# Delete annotations whose text matches the case‑insensitive pattern "internal"
del_red = DeleteAnnotationRedaction("(?i)internal")
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.