우리는 GroupDocs.Redaction for Java 25.12 릴리스를 발표하게 되어 기쁩니다. 이 릴리스는 2025년 12월부터 이용 가능하며, 리다크션 후 PowerPoint Template Macro‑enabled (POTM) 파일 처리에 영향을 미친 단일 이슈를 해결합니다.
이번 릴리스의 새로운 기능
| 이슈 ID | 요약 | 카테고리 |
|---|---|---|
| REDACTIONJAVA-246 | 리다크션 후 POTM 파일을 열 수 없음 | 수정 |
수정 내용
프레젠테이션을 스트림에서 로드하고 리다크션한 뒤 저장할 때, 원본 파일 형식과 관계없이 출력이 잘못 PPTX 형식으로 변환되었습니다. 이번 수정으로 리다크션된 파일이 원본 POTM 형식을 유지하도록 했습니다.
코드 예제 (수정된 동작)
import com.groupdocs.redaction.Redactor;
import com.groupdocs.redaction.redactions.ExactPhraseRedaction;
import com.groupdocs.redaction.redactions.ReplacementOptions;
import com.groupdocs.redaction.options.RasterizationOptions;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class RedactPotm {
public static void main(String[] args) throws Exception {
// 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);
}
}
}
이 예제는 수정된 작업 흐름을 보여줍니다: 스트림에서 POTM 파일을 로드하고, 간단한 텍스트 리다크션을 적용한 뒤, 원하지 않는 형식 변환 없이 POTM으로 다시 저장합니다.
업데이트 받는 방법
pom.xml 파일에서 종속성 버전을 업데이트합니다:
<dependencies>
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-redaction</artifactId>
<version>25.12</version>
</dependency>
</dependencies>
또는 Maven 저장소에서 패키지를 직접 다운로드합니다:
https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-redaction/25.12/
추가 리소스
피드백
저희는 여러분의 의견을 소중히 여깁니다! 질문이 있거나, 문제가 발생했으며, 제안 사항이 있다면 [무료 지원 포럼](https://forum.groupdocs.com/c/redaction/33)으로 방문해 주세요. 저희 팀이 언제든지 도와드릴 준비가 되어 있습니다.