GroupDocs.Redaction for .NET Key Features

Hide Private Images in WORD Files with Overlays Using .NET

Shield your personal and business data in WORD documents using C#. Achieve reliable content protection with our simple tools.

Protect Sensitive Data in Word Files

GroupDocs.Redaction for .NET helps your .NET apps hide private content in documents quickly.

  1. Create a Redactor object and specify the Word file path.
  2. Set the redaction parameters to fit your needs.
  3. Mark the image area and define overlay color.
  4. Process and save the redacted file.
// Cover sensitive images in WORD

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

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

Hide or Remove Document Content

GroupDocs.Redaction for .NET makes it easy to hide or erase data in multiple file formats. Protect sensitive information while keeping documents clean and readable.

Detailed Redaction Tools

Replace Text Anywhere

Search and change sensitive text across your documents to secure private information.

Mask Images

Add overlays to specific image areas or entire pictures to conceal private visuals.

Clean Metadata

Delete or edit hidden metadata to avoid unintentional data leaks.

Add Overlays to Hide Image Content

This example demonstrates how to protect sensitive data in document images using overlays.

C#

//  Load document for editing
using (Redactor redactor  = new Redactor("source.docx"))
{
    // Set overlay size, location, and 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);

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

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

    // Save changes to 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

About GroupDocs.Redaction for .NET

GroupDocs.Redaction for .NET gives C# developers the tools to hide or erase content from WORD files. Protect your documents by covering sensitive text, images, and metadata with ease.
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 WORD Content with .NET Redactions

.NET lets you hide or delete sensitive content in WORD files. A reliable way to protect confidential and official documents.

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