GroupDocs.Redaction for .NET 26.7 Release Notes

Major Features

This release brings the following improvements to GroupDocs.Redaction for .NET:

  • Added the ability to specify and preserve OOXML compliance when saving word processing documents.
  • Expanded spreadsheet format support for ODS, OTS, XLSB, and TAB files, including correct format detection and saving in the original spreadsheet format.
  • Improved handling of text-only spreadsheet CSV format: draw-box (colored rectangle) text redactions are skipped for these formats because they do not support image-style replacements.
  • Addressed an issue where a plain text document could be incorrectly saved as an XLSX/ZIP package instead of remaining a text file.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
REDACTIONNET-718Implement support and respect OOXML compliance for the Words documentsEnhancement
REDACTIONNET-802Implement support for ODS, OTS, XLSB, XLT and TAB Spreadsheets formatsEnhancement
REDACTIONNET-805Unnecessary image redactions for CSV filesBug
REDACTIONNET-628Saving text file as XSLXBug

Public API and Backward Incompatible Changes

Public API changes
  • Added WordProcessingComplianceLevel enumeration with values Ecma, Transitional, and Strict.
  • Added WordprocessingSaveOptions class with the OoxmlCompliance property.
  • Added SaveOptions.WordprocessingSaveOptions property.
Usage

Save a Word Processing document with a specific OOXML compliance level:

using GroupDocs.Redaction.Options;
using GroupDocs.Redaction.Redactions;

using (Redactor redactor = new Redactor("sample.docx"))
{
    redactor.Apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]")));

    var options = new SaveOptions()
    {
        AddSuffix = true,
        RasterizeToPDF = false,
        RedactedFileSuffix = "Strict"
    };
    // If not specified, the compliance level of the original document is preserved.
    // Strict can only be downgraded to Transitional, not to Ecma.
    options.WordprocessingSaveOptions.OoxmlCompliance = WordProcessingComplianceLevel.Strict;

    redactor.Save(options);
}

Redact newly supported ODS, OTS, XLSB, and TAB spreadsheet formats in the same way as other spreadsheet documents:

using GroupDocs.Redaction.Options;
using GroupDocs.Redaction.Redactions;

using (Redactor redactor = new Redactor("sample.ods"))
{
    redactor.Apply(new ExactPhraseRedaction("Sensitive", new ReplacementOptions("[redacted]")));
    redactor.Save(new SaveOptions() { AddSuffix = true, RasterizeToPDF = false });
}