DeleteAnnotationRedaction class
Leave feedback
On this page
Represents a text redaction that deletes annotations if text matches the given regular expression (optionally deletes all annotations).
Learn more:
- More details about applying redactions: https://docs.groupdocs.com/redaction/python-net/redaction-basics/
- More details about document annotation redactions: https://docs.groupdocs.com/redaction/python-net/annotation-redactions/
The DeleteAnnotationRedaction type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new DeleteAnnotationRedaction instance that deletes all annotations (matches everything). |
| init | Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching the given regular expression. |
| init | Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression. |
| Method | Description |
|---|---|
| apply_to | Applies the redaction to a given format instance. |
| Property | Description |
|---|---|
| description | The description of the redaction, containing its name and parameters. |
| expression | The regular expression to match. |
from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import DeleteAnnotationRedaction
with Redactor("document.pdf") as redactor:
# Delete annotations containing the word "internal" (case‑insensitive)
redactor.apply(DeleteAnnotationRedaction("(?i)internal"))
redactor.save()
Task guides that use DeleteAnnotationRedaction:
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.