GroupDocs.Redaction for Java 25.12 Release Notes

This release includes one bug fix.

Changes in this release

KeySummaryCategory
REDACTIONJAVA-246Unable to open POTM file after redactionFix

Unable to open POTM file after redaction

This release fixes the issue where a presentation loaded from a stream was saved to the PPTX format instead of the expected original format.

The following code example demonstrates the fix. Previously, when loading a POTM file from a stream and saving it, the output would be saved as PPTX format. This issue is now fixed—when you save the redacted presentation, it will be saved in the original format matching the source presentation.

import com.groupdocs.redaction.Redactor;
import com.groupdocs.redaction.redactions.ExactPhraseRedaction;
import com.groupdocs.redaction.redactions.ReplacementOptions;
import com.groupdocs.redaction.options.RasterizationOptions;
//...

// Define input and output file paths
Path inputPath = Paths.get("source.potm");
Path outputPath = Paths.get("redacted.potm");

// Open input stream, create redactor, and prepare output stream
// All resources are automatically closed when exiting the try block
try (final InputStream inputStream = Files.newInputStream(inputPath);
     final Redactor redactor = new Redactor(inputStream);
     final OutputStream outputStream = Files.newOutputStream(outputPath)) {
    
    // Configure redaction: define text to redact and replacement string
    String textToRedact = "TEXT";
    String redactWith = "****";
    
    // Create replacement options and exact phrase redaction
    ReplacementOptions textReplacement = new ReplacementOptions(redactWith);
    ExactPhraseRedaction textRedaction = new ExactPhraseRedaction(textToRedact, textReplacement);
    
    // Apply the redaction to the document
    redactor.apply(textRedaction);
    
    // Configure rasterization options (disable rasterization for presentations)
    RasterizationOptions rasterizationOptions = new RasterizationOptions();
    rasterizationOptions.setEnabled(false);
    
    // Save the redacted presentation
    // Fixed: Now preserves the original POTM format instead of converting to PPTX
    redactor.save(outputStream, rasterizationOptions);
}

How to get the update

Update dependency version in your pom.xml file and set package version to 25.12

<dependencies>
   <dependency>
      <groupId>com.groupdocs</groupId>
      <artifactId>groupdocs-redaction</artifactId>
      <version>25.12</version>
   </dependency>
</dependencies>

Or download the package from our Maven repository https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-redaction/25.12/ and install it on your environment.

Additional Resources

Feedback

We value your feedback! If you have any questions, issues, or suggestions, feel free to reach out to us through our Free Support Forum. Our team will be happy to assist you and answer any questions you may have.