Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active April 29, 2022 04:04
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/a43e3ce358f93df92373b5441bc579fb to your computer and use it in GitHub Desktop.
Save GroupDocsGists/a43e3ce358f93df92373b5441bc579fb to your computer and use it in GitHub Desktop.
Case-Sensitive Textual Redaction via Exact Phrase using Java
// Supported file formats: https://docs.groupdocs.com/redaction/java/supported-document-formats/
final Redactor redactor = new Redactor("sample.pdf");
try
{
redactor.apply(new ExactPhraseRedaction("John Doe", true /*isCaseSensitive*/, new ReplacementOptions("[personal]")));
redactor.save();
}
finally { redactor.close(); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment