AnnotationRedaction
Contents
[
Hide
]
AnnotationRedaction class
Represents a redaction that replaces annotation text (comments, etc.) matching a given regular expression.
public class AnnotationRedaction : Redaction
Constructors
Name | Description |
---|---|
AnnotationRedaction(Regex, string) | Initializes a new instance of AnnotationRedaction class. |
AnnotationRedaction(string, string) | Initializes a new instance of AnnotationRedaction class. |
Properties
Name | Description |
---|---|
override Description { get; } | Returns a string, describing the redaction and its parameters. |
Expression { get; } | Gets the regular expression to match. |
Replacement { get; } | Gets a textual replacement for matched text. |
Methods
Name | Description |
---|---|
override ApplyTo(DocumentFormatInstance) | Applies the redaction to a given format instance. |
Remarks
Learn more
- More details about applying redactions: Redaction basics
- More details about document annotation redactions: Annotation redactions
Examples
The following example demonstrates how to replace the name “John” with “[redacted]” in all annotations.
using (Redactor redactor = new Redactor(@"C:\test.pdf"))
{
redactor.Apply(new AnnotationRedaction("(?im:john)", "[redacted]"));
redactor.Save()
}
See Also
- class Redaction
- namespace GroupDocs.Redaction.Redactions
- assembly GroupDocs.Redaction