What You Can Do with GroupDocs.Redaction for Java

Edit or Hide Sensitive Text in POWERPOINT Documents with Java

Protect sensitive content in your POWERPOINT files using Java and GroupDocs.Redaction for Java. Personal or business, your data stays private.

Steps to Clean Content in Powerpoint Docs

Use GroupDocs.Redaction for Java to remove or cover private content in your Java apps. Simple and fast redaction.

  1. Initialize a Redactor and load your Powerpoint file.
  2. Set up the redaction options you need.
  3. Specify the text to search and the replacement text.
  4. Run the redaction and save the file.
// How to redact text in a POWERPOINT file

// Load your file using the Redactor constructor
final Redactor redactor = new Redactor("input.pptx");
try
{
    // Set your redaction preferences
    // Choose what to search and what to replace it with
    ReplacementOptions opt = new ReplacementOptions("[redacted]");
    
    ExactPhraseRedaction redaction = new ExactPhraseRedaction("Text to hide", opt);

    // Apply redactions and save the new POWERPOINT file
    redactor.apply(redaction);
    redactor.save();
}
finally { redactor.close(); }
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-redaction</artifactId> <version>24.6</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

Extra Redaction Tools

GroupDocs.Redaction for Java helps remove or hide sensitive content in multiple file formats. Keep documents clean and safe to share.

Redaction tools and options

Replace confidential text

Find and replace matching text anywhere in your file. Supports regex and smart search options.

Hide sensitive images

Cover images or specific areas with overlays. Adjust page settings, colors, and more.

Clean hidden metadata

Remove hidden data like authorship, timestamps, or comments to protect privacy.

Pattern-Based Redaction with Regex

Use regular expressions to search and redact sensitive text patterns like emails or IDs.

Java

//  Open the document you want to clean
final Redactor redactor = new Redactor("source.pptx");
try
{
    // Define an EMAIL regex pattern and the text to use as replacement
    ReplacementOptions repl_opt = new ReplacementOptions("[redacted]");
    String emailRegex = "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}";

    RegexRedaction redaction = new RegexRedaction(emailRegex, repl_opt);
    
    // Apply redaction rules
    redactor.apply(redaction);

    // Save the final redacted file
    SaveOptions saveOptions = new SaveOptions();
    saveOptions.setAddSuffix(true);
    saveOptions.setRasterizeToPDF(false);
    redactor.save(saveOptions);
}
finally { redactor.close(); }
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-redaction</artifactId> <version>24.6</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

Meet GroupDocs.Redaction for Java

GroupDocs.Redaction for Java gives Java developers everything they need to redact POWERPOINT content. Clean up text, images, annotations, comments, and metadata in popular file types.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Redaction for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Redact Content in POWERPOINT Using Java

Protect official and personal data by redacting text in POWERPOINT files with Java tools. Keep documents secure and private.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English