Explore GroupDocs.Redaction for .NET

Redact Text in PPTX with Overlays Using .NET

With C# and GroupDocs.Redaction for .NET, it’s easy to protect sensitive data in PPTX files by hiding it from view.

Hide private content in your Pptx files

With GroupDocs.Redaction for .NET, .NET developers can protect documents in a few simple steps.

  1. Start a Redactor with the path to the file you want to clean up.
  2. Pick the redaction rules that match your needs.
  3. Choose a pattern to match and a color for the image overlay.
  4. Run the redaction and save your updated file.
// Use overlays to cover text in PPTX

// Initialize Redactor with your file
using (Redactor redactor  = new Redactor("input.pptx"))
{
    // Define how redaction should behave
    // Set what to hide and color of the overlay
    var opt = new ReplacementOptions(System.Drawing.Color.Red);
    
    var redaction = new ExactPhraseRedaction("Text to hide", opt);

    // Run and save the changes
    redactor.Apply(redaction);
    redactor.Save();
}
dotnet add package GroupDocs.Redaction
click to copy
copied
More examples Documentation

More ways to protect your files

GroupDocs.Redaction for .NET gives you the tools to hide data in different formats without changing layout.

Features that matter

Replace text as needed

Swap out text to keep key info away from unauthorized users.

Hide image areas

Hide full images or certain parts by drawing overlay boxes.

Wipe hidden data

Delete embedded metadata that could reveal private details.

Regular expression redaction

This example shows how to search and hide text with regular expressions

C#

//  Load a file for redaction
using (Redactor redactor  = new Redactor("source.pptx"))
{
    // Set redaction rules: search text and block color
    var repl_opt = new ReplacementOptions(System.Drawing.Color.Blue);
    var redaction = new RegexRedaction("\\d{2}\\s*\\d{2}[^\\d]*\\d{6}", repl_opt);

    // Apply redaction logic
    redactor.Apply(redaction);

    // Save redacted result
    var save_opt = new SaveOptions() { AddSuffix = true, RasterizeToPDF = false };
    var outputPath = redactor.Save(save_opt);
}
dotnet add package GroupDocs.Redaction
click to copy
copied
More examples Documentation

What GroupDocs.Redaction for .NET Does

GroupDocs.Redaction for .NET gives you the power to cover or remove content in PPTX documents using C#. Hide anything from names to notes, in just a few steps.
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.

Secure PPTX Text with .NET Tools

Cover private areas or remove hidden data in PPTX files using .NET redaction features.

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