GroupDocs.Redaction for Java 23.2 Release Notes

Major Features

There are the following improvements in this release:

  • Implement Page Removal Functionality for Word Processing and Multi-frame Image Formats
  • Implement Advanced Rasterization Options (Scan Effects)

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
REDACTIONJAVA-165Implement Page Removal Functionality for Word Processing and Multi-frame Image FormatsImprovement
REDACTIONJAVA-166Implement Advanced Rasterization Options (Scan Effects)Improvement

Public API and Backward Incompatible Changes

Implement Page Removal Functionality for Word Processing and Multi-frame Image Formats

This improvement allows users to delete a range of pages (image frames) from word processing (Microsoft Word, OpenOffice Text, RTF, etc.) documents as well as multi-frame images.

Implement Advanced Rasterization Options (Scan Effects)

This improvement allows users to apply scan-like effects to rasterized files (border, grayscale, random noise and inclune, etc.).

Public API changes

Enumeration AdvancedRasterizationOptions, containing list of available options, has been added to com.groupdocs.redaction.options package.
Method addAdvancedOption and its overload, to add adanced rasterization effects, has been added to com.groupdocs.redaction.options.RasterizationOptions class.

Usage

The following example demonstrates how to remove 3 frames from an animated GIF image.

Java

final Redactor redactor = new Redactor("Animated.gif");
try 
{
    // Removes 5 frames starting from 3nd one, requires at least 7 frames
    if (redactor.getDocumentInfo().getPageCount() >= 7)
    {
        redactor.apply(new RemovePageRedaction(PageSeekOrigin.Begin, 2, 5));
        redactor.save();
    }
}
finally { redactor.close(); }

The following example demonstrates how to apply the advanced rasterization options to a DOCX file with default settings.

Java

final Redactor redactor = new Redactor("Sample.docx");
try 
{
    // Save the document with advanced options (convert pages into images, and save PDF with scan-like pages)
    SaveOptions so = new SaveOptions();
    so.setRedactedFileSuffix("_scan");
    so.getRasterization().setEnabled(true);
    so.getRasterization().addAdvancedOption(AdvancedRasterizationOptions.Border);
    so.getRasterization().addAdvancedOption(AdvancedRasterizationOptions.Noise);
    so.getRasterization().addAdvancedOption(AdvancedRasterizationOptions.Grayscale);
    so.getRasterization().addAdvancedOption(AdvancedRasterizationOptions.Tilt);
    redactor.save(so);
}
finally { redactor.close(); }