Features of GroupDocs.Redaction for .NET

Cover Sensitive Images in DOCX Documents with Overlays Using .NET

Safeguard personal and business information in DOCX files using C#. Our tools make data protection simple and reliable.

Protect Data in Docx Files

GroupDocs.Redaction for .NET: Built to help your .NET apps secure documents. Redact sensitive information with just a few steps.

  1. Initialize a Redactor and provide the path to your Docx file.
  2. Configure redaction options to meet your needs.
  3. Choose the image area and pick the overlay color.
  4. Run the redaction and save the file.
// Cover sensitive image areas in DOCX

// Load file via Redactor constructor
using (Redactor redactor  = new Redactor("input.docx"))
{
    // Set overlay color and size
    Size replacement_size = new Size(100, 100);
    var replacement_options = new RegionReplacementOptions(Color.Blue, replacement_size);

    // Define the redaction area
    Point replacement_point = new Point(200, 200);
    var redaction = new ImageAreaRedaction(replacement_point, replacement_options);
    
    // Apply overlay and save the document
    redactor.Apply(redaction);
    redactor.Save();
}
dotnet add package GroupDocs.Redaction
click to copy
copied
More examples Documentation

Redact Content in Files

With GroupDocs.Redaction for .NET, you can hide or delete sensitive content in many file types. Keep documents safe while preserving readability.

Flexible Redaction Options

Edit Text Easily

Find and replace private text across your document for better data security.

Cover Image Areas

Overlay full images or select specific parts to protect visual information.

Clean Metadata

Remove or change hidden metadata to avoid unintentional data leaks.

Apply Overlays to Hide Image Details

This example demonstrates how to hide sensitive areas in document images.

C#

//  Load the document you want to redact
using (Redactor redactor  = new Redactor("source.docx"))
{
    // Specify overlay parameters: size, position, color
    Size replacement_size = new Size(300, 30);
    var replacement_options = new RegionReplacementOptions(Color.Blue, replacement_size);
    Point replacement_point = new Point(20, 125);
    var redaction = new ImageAreaRedaction(replacement_point, replacement_options);

    // Target a specific area on the first page
    redaction.Filters = new RedactionFilter[] {
        new PageRangeFilter(PageSeekOrigin.Begin, 0, 1),
        new PageAreaFilter(new Point(0, 300), new Size(600, 600))
    };

    // Place overlay on image
    redactor.Apply(redaction);

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

Learn About GroupDocs.Redaction for .NET

GroupDocs.Redaction for .NET equips C# developers with tools to hide or delete content in DOCX files. Protect documents by covering text, images, and metadata across various formats.
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.

Protect DOCX Files with .NET Redaction

Use .NET to cover or remove sensitive data in DOCX files. Ideal for keeping confidential documents 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