Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created September 25, 2019 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/c92f9fc528c82c94a5d7a377bd11eee3 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/c92f9fc528c82c94a5d7a377bd11eee3 to your computer and use it in GitHub Desktop.
using (Redactor redactor = new Redactor(@"Documents/Doc/sample.docx"))
{
// Use redactor instance to perform redactions
RedactorChangeLog result = redactor.Apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]")));
foreach (RedactorLogEntry entry in result.RedactionLog)
{
Console.WriteLine(entry.Status.ToString());
}
redactor.Save();
}
using (Document doc = Redactor.Load(@"Documents/Doc/sample.docx"))
{
// Use document instance to perform redactions
RedactionSummary summary = doc.RedactWith(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]")));
foreach (RedactionLogEntry entry in summary.RedactionLog)
{
Console.WriteLine(entry.Status.ToString());
}
doc.Save();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment