GroupDocs.Redaction for Java 24.1 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.

Java

            Redactor redactor = new Redactor("Sample.pptx")
            {
                java.util.regex.Pattern rx = java.util.regex.Pattern.compile("urna");
                ReplacementOptions optionsText = new ReplacementOptions("[redarea]");
                optionsText.setFilters(new RedactionFilter[] {
                new PageRangeFilter(PageSeekOrigin.End, 0, 1), // last page
                new PageAreaFilter(new java.awt.Point(0, 0), new java.awt.Dimension(300, 100)) // right half of the page
                });
                RegionReplacementOptions optionsImg = new RegionReplacementOptions(java.awt.Color.RED, new java.awt.Dimension(100, 100));
                // Redacted area will be an intersection, which is 100x100
                RedactorChangeLog result = redactor.apply(new PageAreaRedaction(rx, optionsText, optionsImg));
                if (result.getStatus() != RedactionStatus.Failed)
                {
                    redactor.save();
                };
            }