DeleteAnnotationRedaction class

DeleteAnnotationRedaction class

Represents a text redaction that deletes annotations if text matches a given regular expression (optionally deletes all annotations).

Learn more

The DeleteAnnotationRedaction type exposes the following members:

Constructors

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.

Methods

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

Properties

Property Description
description The description of the redaction, containing the redaction name and parameters.
expression The regular expression to match.

Example

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()

Guides

Task guides that use DeleteAnnotationRedaction:

See Also