Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.