Skip to end of metadata
Go to start of metadata
Contents Summary

The code in below examples uses some methods defined in the Common Utilities.

Annotation Redaction 

Using GroupDocs.Redaction API, you can remove all or specific comments and other annotations from the document. For example, you can remove all comments from the document, containing texts like "use", "show" or "describe" in its body.

The Recipe

  • Load Document using Redactor.Load(@"C:\sample.docx")

  • Remove   comments using Document.RedactWith(new DeleteAnnotationRedaction("(?im:(use|show|describe))"))

  • Save document in its original format using Document.Save(new SaveOptions() { AddSuffix = true, RasterizeToPDF = false })

The Code

Remove Sensitive Information 

Instead of removing all or specific annotations,  you can remove sensitive data from the annotation text. For instance, you can remove all mentions of "John" in the given document.

The Recipe

  • Load Document using Redactor.Load(@"C:\sample.pdf")

  • Perform case-sentitive exact phrase redaction using Document.RedactWith(new AnnotationRedaction("(?im:john)", "[redacted]"))

  • Save document using Document.Save()

The Code

  • No labels