GroupDocs.Redaction for .NET Features

Protect Sensitive Images in PDF Documents with Overlays Using .NET

Keep business and personal data safe in PDF files using C#. Our tools help you achieve strong data protection with ease.

Secure Business Data in Pdf Documents

GroupDocs.Redaction for .NET: Designed to help your .NET apps protect documents. Redact private information quickly and easily.

  1. Create a Redactor instance and provide the path to the Pdf file you want to secure.
  2. Adjust redaction settings to get the result you need.
  3. Select the image area and set the overlay color.
  4. Process the file and save the redacted document.
// Hide sensitive image content in PDF

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

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

Redact Content in Documents

With GroupDocs.Redaction for .NET, you can hide or delete content in a wide range of file formats. Protect confidential information while keeping documents easy to read and share.

Advanced Redaction Features

Edit Text Anywhere

Search and replace sensitive text throughout your document to keep private data secure.

Cover Images

Apply overlays to entire images or selected areas to hide sensitive visuals.

Handle Metadata

Remove or modify hidden metadata to prevent accidental data exposure.

Use Overlays to Hide Image Data

This example shows how to cover sensitive information in document images.

C#

//  Load the document for redaction
using (Redactor redactor  = new Redactor("source.pdf"))
{
    // Set overlay settings: size, position, 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);

    // Target a specific image 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))
    };

    // Apply the overlay to hide the image
    redactor.Apply(redaction);

    // Save the redacted document
    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 powerful tools to hide or remove content from PDF files. Easily protect documents by covering text, images, and metadata across multiple 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.

Secure PDF Content with .NET Redactions

Use .NET to hide or delete sensitive content in PDF files. An effective solution for securing official and confidential 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