DeleteAnnotationRedaction class

DeleteAnnotationRedaction class

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

Learn more:

The DeleteAnnotationRedaction type exposes the following members:

Constructors

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.

Methods

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

Properties

Property Description
description The description of the redaction, containing its 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