Created
September 25, 2019 06:12
-
-
Save GroupDocsGists/c92f9fc528c82c94a5d7a377bd11eee3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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