DeleteAnnotationRedaction class
Leave feedback
On this page
Represents a text redaction that deletes annotations if text matches a given regular expression (optionally deletes all annotations).
Learn more
- More details about applying redactions: https://docs.groupdocs.com/redaction/net/redaction-basics/
- More details about document annotation redactions: https://docs.groupdocs.com/redaction/net/annotation-redactions/
The DeleteAnnotationRedaction type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of DeleteAnnotationRedaction class, with settings to delete all annotations (matching everything). |
| init | Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given 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. |
| apply_to_document_format_instance |
| Property | Description |
|---|---|
| description | The description of the redaction, containing the redaction 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.