GroupDocs.Redaction for Java 26.10 Release Notes
This release ports selected improvements from GroupDocs.Redaction for .NET 26.7 and earlier (custom redaction, image positioning). .NET-only or blocked items are not included (for example Options.Drawing / REDACTIONNET-799, WebP EXIF/XMP / REDACTIONNET-743).
Full list of changes in this release
| ID | Summary | Category |
|---|---|---|
| REDACTIONNET-718 | Specify and preserve OOXML compliance when saving Word Processing documents | Feature |
| REDACTIONNET-802 | Add spreadsheet template formats XLT / XLTX / XLTM and TAB; improve Cells save-format mapping | Feature |
| REDACTIONNET-805 | Skip DrawBox (colored rectangle) redactions for text-only spreadsheets CSV / TAB / TSV | Fix |
| REDACTIONNET-594 | Custom redaction handler for PDF PageAreaRedaction (ICustomRedactionHandler) | Feature |
| REDACTIONNET-551 | Fix page-area image redaction positioning (embedded images with page placement and real size) | Fix |
OOXML compliance for Word Processing (REDACTIONNET-718)
You can request an OOXML compliance level when saving Word documents. If not set, the original document compliance is preserved. Strict cannot be downgraded directly to Ecma (use Transitional).
try (Redactor redactor = new Redactor("sample.docx")) {
redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]")));
SaveOptions options = new SaveOptions();
options.setAddSuffix(true);
options.setRasterizeToPDF(false);
options.setRedactedFileSuffix("Strict");
options.getWordprocessingSaveOptions().setOoxmlCompliance(WordProcessingComplianceLevel.Strict);
redactor.save(options);
}
Spreadsheet formats XLT / XLTX / XLTM / TAB (REDACTIONNET-802)
FileType now exposes Excel template types and .tab. Cells save paths map these formats correctly (alongside existing ODS / OTS / XLSB support).
try (Redactor redactor = new Redactor("sample.xltx")) {
redactor.apply(new ExactPhraseRedaction("Sensitive", new ReplacementOptions("[redacted]")));
SaveOptions options = new SaveOptions();
options.setAddSuffix(true);
options.setRasterizeToPDF(false);
redactor.save(options);
}
Skip DrawBox for CSV / TAB / TSV (REDACTIONNET-805)
Colored rectangle (DrawBox) replacements are not applicable to text-only spreadsheet formats. Those redactions are skipped with a clear status instead of attempting image-style styling.
Custom redaction for PDF PageArea (REDACTIONNET-594)
ReplacementOptions accepts an ICustomRedactionHandler. On each match the handler receives CustomRedactionContext and returns CustomRedactionResult (apply flag + replacement text). Currently supported for PDF PageAreaRedaction only.
ReplacementOptions optionsText = new ReplacementOptions("[replaced]");
optionsText.setCustomRedaction(new ICustomRedactionHandler() {
@Override
public CustomRedactionResult redact(CustomRedactionContext context) {
CustomRedactionResult result = new CustomRedactionResult();
if (context.getText() != null && context.getText().contains("Lorem")) {
result.setApply(true);
result.setText(context.getText().replace("Lorem", "[redacted-custom]"));
}
return result;
}
});
try (Redactor redactor = new Redactor("sample.pdf")) {
redactor.apply(new PageAreaRedaction(java.util.regex.Pattern.compile(".*"), optionsText));
redactor.save(new SaveOptions(false, "Custom_Redaction_Result"));
}
Image area positioning (REDACTIONNET-551)
Embedded images that expose page placement and real pixel size are redacted using page coordinates, so PageAreaFilter / ImageAreaRedaction align with the visible image area when the bitmap size differs from the on-page shape.
Public API changes
- Added
WordProcessingComplianceLevel(Ecma,Transitional,Strict). - Added
WordprocessingSaveOptionswithgetOoxmlCompliance/setOoxmlCompliance. - Added
SaveOptions.getWordprocessingSaveOptions(). - Added
ICustomRedactionHandler,CustomRedactionContext,CustomRedactionResult. - Added
ReplacementOptions.getCustomRedaction/setCustomRedaction. - Added
FileType.getXLT(),getXLTX(),getXLTM(),getTAB().