GroupDocs.Redaction 24.10.0

dotnet add package GroupDocs.Redaction --version 24.10.0                
NuGet\Install-Package GroupDocs.Redaction -Version 24.10.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GroupDocs.Redaction" Version="24.10.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GroupDocs.Redaction --version 24.10.0                
#r "nuget: GroupDocs.Redaction, 24.10.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GroupDocs.Redaction as a Cake Addin
#addin nuget:?package=GroupDocs.Redaction&version=24.10.0

// Install GroupDocs.Redaction as a Cake Tool
#tool nuget:?package=GroupDocs.Redaction&version=24.10.0                

.NET API for Redacting Sensitive Data from Documents

Version 24.10.0 NuGet .NET

banner


Docs API Ref Examples Blog Releases Support License


GroupDocs.Redaction for .NET is a powerful API designed to redact classified or sensitive data from a variety of document types within your .NET applications. It supports multiple redaction types including text, metadata, annotations, and image redactions. The API also integrates with OCR engines for redacting text within images and provides the ability to remove pages and embedded images, ensuring the comprehensive redaction of confidential information. GroupDocs.Redaction is highly versatile, supporting a wide range of document formats, making it an essential tool for any organization dealing with sensitive information.

Text Redactions

Exact Phrase Redaction

Search and redact specific phrases or text strings with case-sensitivity options.

Regex Redaction

Redact text based on regular expressions for flexible text matching.

Right-to-Left Support

Redaction of right-to-left text such as Arabic and Hebrew.

Metadata Redactions

Erase Metadata

Remove all metadata from a document, such as author, date created, and comments.

Metadata Search Redaction

Remove sensitive information from metadata fields using regular expressions.

Annotation Redactions

Delete Annotations

Remove annotations, comments, and other markup from documents.

Redact Annotation Text

Redact sensitive data in annotations while keeping the annotations intact.

Spreadsheet Redactions

Cell and Column Redaction

Redact specific cells or entire columns within Excel spreadsheets.

Filter by Worksheet

Apply redactions to specific worksheets in Excel files.

Image Redactions

Image Area Redaction

Cover specific areas of images, such as headers or footers, with a colored box.

OCR-Based Redaction

Use Optical Character Recognition (OCR) to recognize and redact text embedded in images.

EXIF Data Removal

Remove metadata (e.g., EXIF data) from images, acting as an "EXIF eraser."

Page Redactions

Remove Pages

Remove specific pages from documents such as PDFs, slideshows, or spreadsheets.

Page Area Filters

Apply redactions to specific areas on a page using coordinates.

Embedded Image Redactions

Embedded Image Redaction

Redact embedded images in documents, including PDF, Microsoft Office, and OpenOffice files.

Rasterization

Convert to Raster Images

Redact sensitive data and save documents as raster images, making all data unsearchable.

Document Saving Options

Save redacted documents in either original format for further editing or in raster format for increased security.

Support for OCR Engines

Third-Party OCR Integration

Integrate third-party OCR engines (e.g., Aspose.OCR or Microsoft Azure Computer Vision API) to recognize and redact text from images or image-based PDFs.

File and Document Information

Document Info Retrieval

Retrieve metadata and page counts for any document format.

Supported Document Formats

The following table indicates the file formats supported by GroupDocs.Redaction for .NET.

Format Description Document body Metadata Annotations (comments) Remarks Embedded images OCR Remove Page Page Filters
PDF Saves the document as PDF (Adobe Portable Document) format ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
DOC Microsoft Word 97 - 2007 Document. ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
DOT Microsoft Word 97 - 2007 Template. ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
DOCX Office Open XML WordprocessingML Document (macro-free) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
DOCM Office Open XML WordprocessingML Macro-Enabled Document ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
DOTX Office Open XML WordprocessingML Template (macro-free) ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
DOTM Office Open XML WordprocessingML Macro-Enabled Template ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
RTF RTF format. ✔️ ✔️ ✔️ ✔️ ✔️
XLSX OOXML 2007-2010 ✔️ ✔️ ✔️ ✔️
XLSM OOXML Macro Enabled Workbook ✔️ ✔️ ✔️ ✔️
XLTX OOXML Workbook Template ✔️ ✔️ ✔️ ✔️
XLTM OOXML Macro Enabled Workbook Template ✔️ ✔️ ✔️ ✔️
XLS Excel Workbook 97-2003 ✔️ ✔️ ✔️ ✔️
XLT Excel Workbook Template 97-2003 ✔️ ✔️ ✔️ ✔️
CSV CSV (Comma Separated Value) file. ✔️ ✔️ ✔️
PPTX OOXML Microsoft PowerPoint Presentations format ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
PPT PowerPoint Presentation 97-2003 ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
PPSX PowerPoint Open XML ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
POT PowerPoint template files ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
PPS Microsoft PowerPoint 97-2003 Slide Show ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
PPTM Microsoft PowerPoint Open XML Macro-Enabled Presentation file ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
PPSM Microsoft PowerPoint Open XML Macro-Enabled Slide Show file ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
POTM Microsoft PowerPoint template ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
JPEG The image file format was standardized by the Joint Photographic Experts Group. ✔️ ✔️ ✔️ ✔️
TIF/TIFF Tagged Image File Format ✔️ ✔️ ✔️ ✔️ ✔️
PNG Portable Network Graphics Image ✔️ ✔️ ✔️ ✔️
BMP Bitmap Image Files ✔️ ✔️ ✔️ ✔️
GIF Graphical Interchange Format Image ✔️ ✔️ ✔️
DJVU DjVu Document Format ✔️ ✔️

System Requirements

Overview

  • No external software required for GroupDocs.Redaction for .NET.
  • Follow instructions in Development Environment, Installation, and Configuration.

Supported Operating Systems

  • Windows: 2003, 2008, 2012, 2012 R2, 2016, 2019 Server, Vista, XP, 7, 8, 8.1, 10 (x64, x86)
  • UNIX: Linux or any platform supporting .NET Core 3.1

Supported Frameworks

  • .NET Frameworks: 2.0, 3.5, 4.0, 4.0_ClientProfile, 4.5.0, 4.5.1, 4.5.2, 4.6.0, 4.6.2, 4.7, 4.7.2, .NET Standard 2.0
  • .NET Core Framework: 2.0 and later

Development Environments

  • Visual Studio: 2010, 2011, 2012, 2013, 2015, 2017, 2019

Get Started with GroupDocs.Redaction for .NET

Below is an overview of the key steps and code examples that will help you begin using the API in your .NET applications.

Install GroupDocs.Redaction via NuGet

  • Package Manager GUI:

    1. Open your solution/project in Visual Studio.
    2. Navigate to Tools → NuGet Package Manager → Manage NuGet Packages for Solution.
    3. Search for "GroupDocs.Redaction" and click "Install" to add the latest version to your project.
  • Package Manager Console:

    1. Open Package Manager Console in Visual Studio.
    2. Run the following command:
      Install-Package GroupDocs.Redaction
      

Install from the Official GroupDocs Website

  1. Download the package from the official website.
  2. Unpack the archive or follow the MSI install wizard.
  3. In Solution Explorer, right-click the References node and select "Add Reference."
  4. Locate and add the GroupDocs.Redaction.dll file.

Code Sample 1: Apply Exact Phrase Redaction

This code sample demonstrates how to apply an exact phrase redaction to a document, replacing a specific phrase with a custom string or a colored rectangle. This C# example shows how to redact sensitive information from a document by replacing exact phrases using GroupDocs.Redaction for .NET.

// Learn how to apply an exact phrase redaction to a document using GroupDocs.Redaction for .NET. Replace sensitive phrases with custom text or a color block.
// Import necessary namespaces
using GroupDocs.Redaction;
using GroupDocs.Redaction.Options;

namespace RedactionExample
{
    class Program
    {
        static void Main(string[] args)
        {
            // Load the document from the local file system
            using (Redactor redactor = new Redactor("sample.docx"))
            {
                // Apply an exact phrase redaction
                // Replace "John Doe" with "[personal]" in the document
                RedactorChangeLog result = redactor.Apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]")));

                // Check if the redaction was applied successfully
                if (result.Status != RedactionStatus.Failed)
                {
                    // Save the redacted document
                    redactor.Save();
                }
            }
        }
    }
}

Code Sample 2: Redact Metadata in a Document

This example demonstrates how to remove sensitive data from a document's metadata using a regular expression. It targets specific metadata fields like the author's name. This C# example demonstrates how to redact metadata in a document by targeting specific fields such as the author’s name using GroupDocs.Redaction for .NET.

// Redact metadata in a document using GroupDocs.Redaction for .NET. Remove or replace sensitive metadata fields like author names.
// Import necessary namespaces
using GroupDocs.Redaction;
using GroupDocs.Redaction.Redactions;
using GroupDocs.Redaction.Options;

namespace RedactionExample
{
    class Program
    {
        static void Main(string[] args)
        {
            // Load the document from the local file system
            using (Redactor redactor = new Redactor("sample.docx"))
            {
                // Create a metadata redaction targeting the author's name
                MetadataSearchRedaction redaction = new MetadataSearchRedaction("Company Ltd.", "--company--");

                // Apply the redaction to the document's metadata
                redactor.Apply(redaction);

                // Save the redacted document
                redactor.Save();
            }
        }
    }
}

Code Sample 3: Redact Image Area in a Document

This C# example demonstrates how to redact a specific area of an image embedded in a document by placing a colored rectangle using GroupDocs.Redaction for .NET.

// Redact specific areas within images embedded in documents using GroupDocs.Redaction for .NET. Overlay colored rectangles on sensitive image regions.
// Import necessary namespaces
using GroupDocs.Redaction;
using GroupDocs.Redaction.Redactions;
using System.Drawing;

namespace RedactionExample
{
    class Program
    {
        static void Main(string[] args)
        {
            // Load the document containing the image from the local file system
            using (Redactor redactor = new Redactor("sample.docx"))
            {
                // Define the area of the image to be redacted (coordinates and size)
                Point samplePoint = new Point(516, 311);
                Size sampleSize = new Size(170, 35);

                // Apply the redaction by placing a blue rectangle over the specified area
                RedactorChangeLog result = redactor.Apply(new ImageAreaRedaction(samplePoint, new RegionReplacementOptions(Color.Blue, sampleSize)));

                // Check if the redaction was applied successfully
                if (result.Status != RedactionStatus.Failed)
                {
                    // Save the redacted document
                    redactor.Save();
                }
            }XX
        }
    }
}

Please check the GitHub Repository for other common usage scenarios.


Docs API Ref Examples Blog Releases Support License


Tags

.NET API | Document Redaction | Sensitive Data Removal | Text Redaction | Metadata Redaction | Image Redaction | OCR Redaction | Regex Redaction | Annotation Redaction | Page Redaction | Document Privacy | Redact PDF | Redact Word Documents | Redact Excel Spreadsheets | EXIF Data Removal | Raster Image Conversion | Secure Document Redaction | Document Anonymization | Cross-Platform Redaction | API for Data Security | GroupDocs.Redaction | Document Cleanup | Microsoft Word Redaction | Excel File Redaction | PowerPoint Redaction | PDF Security | Data Sanitization

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
24.10.0 192 10/31/2024
24.6.0 1,104 7/1/2024
23.11.0 2,451 11/3/2023
23.8.0 11,774 8/18/2023
23.6.0 2,513 6/28/2023
23.3.0 1,902 3/24/2023
23.1.0 1,496 1/26/2023
22.8.0 2,631 8/25/2022
22.7.0 2,165 7/19/2022
21.9.0 33,174 9/22/2021
21.3.0 23,681 3/31/2021
21.1.0 38,489 1/29/2021
20.11.0 46,151 11/13/2020
20.9.0 17,444 9/30/2020
20.7.0 30,627 7/30/2020
20.2.0 132,104 2/28/2020
19.12.0 43,877 12/25/2019
19.12.0-alpha-20191224151538 715 12/25/2019
19.9.0 26,678 9/25/2019
19.5.1 790 5/31/2019
19.5.0 680 5/30/2019
19.3.0 820 3/12/2019
19.1.0 933 1/31/2019