Redact Private Information via Java API

Exclude or hide personal information & metadata from documents, worksheets, presentations, PDF and raster image files using Java redaction API.‎

  Download Free Trial
Java Document Redaction API

GroupDocs.Redaction for Java


GroupDocs.Redaction for Java API lets developers remove sensitive data from ‎popular file formats like Microsoft Word, Excel, PowerPoint, PDF and images so it can be used and distributed, but still protect confidential information too. The redaction library offers a single ‎format-independent interface to redact any type of classified information including social security numbers, medical information, financial, proprietary, legal or even trade details through text, metadata ‎and annotation redaction types. It allows you to save the document in its original format and create a sanitized PDF document with raster images of original pages.

GroupDocs.Redaction for Java Features



Search and redact exact matches of a search string


Control the redaction process and skip specific matches


Locate and redact using regular expressions


Built-in support for office formats and PDF


Wipe out metadata or redact metadata values


Limit redactions to specific worksheets and columns


Remove annotations or redact their texts


Use textual (exemption codes) or graphic (colored rectangles) redactions


Save the document in its original format or as a PDF with raster images of original pages


Support for raster image formats and image region redactions


Integration interface for implementing custom redaction and formats

Ensure Privacy by Redacting your Classified Data

GroupDocs.Redaction for Java library empowers developers to redact text and images from supported documents by employing a variety of redaction types. To use our Redaction API is simple and straight forward.

The following code example uses a tabular document such as Microsoft Excel spreadsheet where the scope of redaction can be limited to a specific worksheet and/or column. It uses filters to redact the second column with emails on a worksheet "Customers", leaving all other emails untouched in the document.

Text Redaction in an Excel Spreadsheet using Java

final Redactor redactor  = new Redactor("sample.xlsx");
    CellFilter filter = new CellFilter();
    Pattern expression = Pattern.compile("^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$");
    RedactorChangeLog result = redactor.apply(new CellColumnRedaction(filter, expression, new ReplacementOptions("[customer email]")));
    if (result.getStatus() != RedactionStatus.Failed)
        SaveOptions so = new SaveOptions();
finally { redactor.close(); }

Support and Learning Resources


GroupDocs.Redaction offers individual document redaction APIs for other popular development environments as listed below: