What You Can Do with GroupDocs.Redaction for Java

Clean Up Text in PPTX Files with Java

Use GroupDocs.Redaction for Java and Java to hide or remove content in your PPTX slides. Great for business, legal, or personal use.

How to Redact Content in Pptx Presentations

With GroupDocs.Redaction for Java, you can clean your Java presentations in a few quick steps.

  1. Create a Redactor and load your Pptx file.
  2. Pick the redaction settings that match your needs.
  3. Set the search term and the replacement content.
  4. Apply changes and save your updated file.
// Redacting text in a PPTX presentation

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

    // Redact and save the 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

More Redaction Tools

GroupDocs.Redaction for Java makes it simple to hide or delete private content from a wide range of files. Perfect for keeping your data safe before sharing.

Options to remove text, images, and metadata

Replace text anywhere

Search and replace words or phrases across slides. Works with exact text or patterns.

Hide visual content

Cover parts of a slide or image using overlay boxes in the color of your choice.

Remove metadata

Delete background data like author, creation date, or notes that may contain private info.

Regex-Based Redaction

Use regular expressions to find and remove patterns like emails, phone numbers, or codes.

Java

//  Open your file
final Redactor redactor = new Redactor("source.pptx");
try
{
    // Add an EMAIL regex pattern and 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 based on the pattern
    redactor.apply(redaction);

    // Save the clean version
    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 a solid way to edit or hide content in PPTX files. Work with text, images, metadata, and comments with full control.
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 PPTX Using Java

Remove private or sensitive details from PPTX documents using Java. A reliable way to keep your files secure.

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