AnnotationRedaction Class
Represents a redaction that replaces annotation text (comments, etc.) matching a given regular expression.
Inheritance Hierarchy
SystemObject
  GroupDocs.RedactionRedaction
    GroupDocs.Redaction.RedactionsAnnotationRedaction

Namespace: GroupDocs.Redaction.Redactions
Assembly: GroupDocs.Redaction (in GroupDocs.Redaction.dll) Version: 20.7
Syntax
public class AnnotationRedaction : Redaction

The AnnotationRedaction type exposes the following members.

Constructors
  NameDescription
Public methodAnnotationRedaction(String, String)
Initializes a new instance of AnnotationRedaction class.
Public methodAnnotationRedaction(Regex, String)
Initializes a new instance of AnnotationRedaction class.
Properties
  NameDescription
Public propertyDescription
Returns a string, describing the redaction and its parameters.
(Overrides RedactionDescription.)
Public propertyExpression
Gets the regular expression to match.
Public propertyReplacement
Gets a textual replacement for matched text.
Methods
  NameDescription
Public methodApplyTo
Applies the redaction to a given format instance.
(Overrides RedactionApplyTo(DocumentFormatInstance).)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks
Learn more
Examples
The following example demonstrates how to replace the name "John" with "[redacted]" in all annotations.
C#
using (Redactor redactor = new Redactor(@"C:\test.pdf"))
{
   redactor.Apply(new AnnotationRedaction("(?im:john)", "[redacted]"));
   redactor.Save()
}
See Also