AnnotationRedaction
Leave feedback
On this page
Represents a redaction that replaces annotation text (comments, etc.) matching a given regular expression.
public class AnnotationRedaction : Redaction
| Name | Description |
|---|---|
| AnnotationRedaction(Regex, string) | Initializes a new instance of AnnotationRedaction class. |
| AnnotationRedaction(string, string) | Initializes a new instance of AnnotationRedaction class. |
| 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. |
| Name | Description |
|---|---|
| override ApplyTo(DocumentFormatInstance) | Applies the redaction to a given format instance. |
Learn more
- More details about applying redactions: Redaction basics
- More details about document annotation redactions: Annotation redactions
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()
}
- class Redaction
- namespace GroupDocs.Redaction.Redactions
- assembly GroupDocs.Redaction
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.