GroupDocs.Redaction for .NET 23.11 Release Notes

Major Features

There are the following improvements in this release:

  • Extend a list of formats, supported by PageAreaRedaction

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
REDACTIONNET-432Extend a list of formats, supported by PageAreaRedactionImprovement

Public API and Backward Incompatible Changes

Extend a list of formats, supported by PageAreaRedaction

This improvement extends PageAreaRedaction support on image documents and presentations.

Public API changes

No changes in public API.

Usage

The following example demonstrates how to apply PageAreaRedaction to the last slide a presentation.

C#

            using (Redactor redactor = new Redactor("Sample.pptx"))
            {
                Regex rx = new Regex("urna");
                ReplacementOptions optionsText = new ReplacementOptions("[redarea]");
                optionsText.Filters = new RedactionFilter[] {
                    new PageRangeFilter(PageSeekOrigin.End, 0, 1), // last slide
                    new PageAreaFilter(new System.Drawing.Point(0, 0), new System.Drawing.Size(300, 100)) 
                };
                RegionReplacementOptions optionsImg = new RegionReplacementOptions(System.Drawing.Color.Red, new System.Drawing.Size(100, 300));
                // Redacted area will be an intersection, which is 100x100
                RedactorChangeLog result = redactor.Apply(new PageAreaRedaction(rx, optionsText, optionsImg));
                if (result.Status != RedactionStatus.Failed)
                {
                    redactor.Save();
                };
            }