Unable to open potm file after redaction

Hi Team,
The .potm files are not opening in MS office after redacted by Groupdocs.Redaction java SDK. Below is the sample code to test. I will share the file sample in private.

    @Test
    void supp() throws Exception {
        try (final Redactor redactor = new Redactor(getClass().getResourceAsStream("/abc.potm"));
                        final OutputStream out = Files.newOutputStream(Paths.get("redacted.potm"))) {
            redactor.apply(new ExactPhraseRedaction("村山", new ReplacementOptions("**")));
            RasterizationOptions ro = new RasterizationOptions();
            ro.setEnabled(false);
            redactor.save(out, ro);
        }
    }

After some investigation it’s observed that the redaction is happening and the file is being saved in pptx format instead of .potm and hence the macros are dropped from file. Because MS office has strict format check with file name extension its failing to open the file. It’s expected that the SDK will save the redacted file in original format but not in this case. Please look into this as its happening for other similar formats like .ppsm, .ppsx, .pptm.

System Details
OS: Windows 11
Java: 17
Groupdocs.Redaction Java SDK: 21.12
Archive.zip (106.9 KB)

@shiva.k

Summary
When a .potm (macro‑enabled PowerPoint template) is processed with GroupDocs Redaction for Java, the SDK currently saves the result as a regular PowerPoint package without the VBA project. Consequently the file is effectively a .pptx inside a .potm container, and Microsoft Office refuses to open it.

Why it happens

  • In the version you are using (21.12) the library does not automatically preserve the VBA project for macro‑enabled PowerPoint formats (.potm, .pptm, .ppsm, etc.).
  • Because the macro part cannot be written, the SDK falls back to the macro‑free format it can generate, while keeping the original file extension. Office then detects the mismatch and blocks the file.

What to do next

  1. Confirm format support – Review the GroupDocs Redaction Java documentation for your exact version and look for any note about macro‑enabled PowerPoint formats. If they are not listed as supported, the behavior you see is expected.
  2. Check for a macro‑preservation option – Browse the SDK’s save‑options classes (e.g., any *SaveOptions classes). If a property such as preserveMacros or similar exists, enable it when calling redactor.save(...). If no such option is present, the SDK cannot keep macros in the current release.
  3. Enable diagnostic logging – Turn on debug logging to see how the SDK decides the output format:
Redactor.setLogLevel(com.groupdocs.redaction.logging.LogLevel.DEBUG);

Review the log for messages about format conversion or macro removal.
4. Consider upgrading – If a newer GroupDocs Redaction version is available, test with it. Later releases may add macro‑preservation support.
5. Work‑around (if needed) – After redaction, you can manually re‑attach the original vbaProject.bin part to the resulting .pptx (e.g., unzip the file, copy the VBA part back, re‑zip). This is a temporary measure and requires careful handling of the package.
6. Escalate to GroupDocs support – Gather a minimal reproducible sample (original .potm and the redacted output) together with the debug log and submit a support ticket. The engineering team can confirm whether this is a limitation or a bug that needs fixing.

Following these steps will help you verify whether macro preservation is supported in your environment and provide a path forward either by using a newer SDK, applying a manual fix, or obtaining a fix from the vendor.

:warning: I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.

@shiva.k
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): REDACTIONJAVA-246

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Please let me know if there are any workaround to fix the issue with the current sdk.

@shiva.k

This issue is still under investigation. We’ll notify you in case of any progress update.

Hi any update would be appreciated. Thanks.

@shiva.k

This issue is expected to be fixed in upcoming API release. As there’s any furhter update, we’ll notify you.

Hi when is this release planned?

@shiva.k

Release is already in progress. We’ll notify you in case of any further updates.

Hi is there any approximate time for the release?

@shiva.k

This issue has now been fixed. We’ll let you know as soon as the release is available for download.

Hi is release available? Is there any RC where i can verify the fix? When is next release is planned do u know in which month release is planned? We have a customer waiting for the fix, their patience is draining each day.

@shiva.k

This issue has already been fixed in the .NET version of the API, and we are currently porting the fix to the Java version. Please note that this is a technical process and is currently in progress. We will inform you as soon as the Java fix is available for download.

@shiva.k

The issue with saving redacted presentation with the source file format was fixed in GroupDocs.Redaction for Java 25.12. Now the presentation is properly saved in the source format.

To get latest version update package 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 the repository: https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-redaction/25.12/ and install manually.

Please let us know if you have any questions.

Have a nice day!

Hi I tried the SDK fix is still not working. Can you please try this file and let me know fix is holding good from your side. It’s very disappointing. I have attached redacted document as well. Use MS office to open the file. Please extract file from the zip.
abc.potm.zip (26.8 KB)
redacted.potm.zip (28.8 KB)

@shiva.k

I’m sorry to hear that the fix does not work. Let us check what is the issue right now. I have prepared the sample application redaction-sample-app.zip (57.5 KB) and got the following output abc_redacted.zip (27.4 KB).

For now I can see that the file is properly saved to the source format POTM and the redaction is applied (see the output file).

I see that you’re testing with evaluation version of the library. So, we on the same page you can get a temporary license following by this short link: https://purchase.groupdocs.com/temp-license/100510.

Can you please clarify what is the expected behavior?

I am sorry file is now opening in MS office. In slack earlier when i upload original potm file i used to get preview but after redaction it was not showing. I used same approach but the file opening in MS office properly.

@shiva.k

Thank you for the quick response.

Let us know if you have any other issues with the product and we’ll be glad to help.