GroupDocs.Redaction for .NET 20.9 Release Notes

Major Features

There are the following improvements in this release:

  • Ability to save Redaction Policy to an XML file
  • Built-in support for plain text format (previously was an example)
  • Support for HTML documents and Markdown files

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
REDACTIONNET-305Saving RedactionPolicy.xml file in .NETImprovement
REDACTIONNET-314Add built-in support for plain text formatImprovement
REDACTIONNET-315Add support for HTML documents and Markdown filesImprovement

Public API and Backward Incompatible Changes

Saving RedactionPolicy.xml file in .NET

This feature provides functionality to save a redaction policy created in code as an XML file for further use.

Add built-in support for plain text format

This feature provides built-in support for plain text format. Previously, user had to take the class from public examples and configure it as a custom format handler.

Add support for HTML documents and Markdown files

This feature provides support for HTML documents and Markdown files.

Public API changes

Constructor RedactionPolicy(Redaction[]) taking an array of redactions has been added.
Methods RedactionPolicy.Save(String) and RedactionPolicy.Save(Stream) have been added.

Usage

The following example demonstrates how to save a RedactionPolicy to an XML file.

C#

RedactionPolicy policy = new RedactionPolicy(new Redaction[] {
    new ExactPhraseRedaction("Redaction", new ReplacementOptions("[Product]")),
    new RegexRedaction("\\d{2}\\s*\\d{2}[^\\d]*\\d{6}", new ReplacementOptions(System.Drawing.Color.Blue)),
    new DeleteAnnotationRedaction(),
    new EraseMetadataRedaction(MetadataFilters.All)
});
policy.Save(".\\MyPolicyFile.xml");