Main Features of GroupDocs.Redaction for Java

Protect Sensitive Images in WORD Files Using Java

Secure personal and business visuals in WORD documents with Java. Fast and reliable image redaction made simple.

Keep Confidential Data Safe in Word Files

GroupDocs.Redaction for Java makes it easy for Java apps to hide private information inside documents.

  1. Initialize a Redactor and load the Word file.
  2. Define the redaction settings you need.
  3. Highlight the image area and select an overlay color.
  4. Run the redaction and save your updated document.
// Hide sensitive image content in WORD

// Load the file using Redactor
final Redactor redactor = new Redactor("input.docx");
try
{
    // Choose overlay color and size
    java.awt.Dimension replacement_size = new java.awt.Dimension(100, 100);
    RegionReplacementOptions replacement_options = 
        new RegionReplacementOptions(java.awt.Color.BLUE, replacement_size);

    // Mark image area to cover
    java.awt.Point replacement_point = new java.awt.Point(200, 200);
    ImageAreaRedaction redaction = 
        new ImageAreaRedaction(replacement_point, replacement_options);

    // Apply overlay and save the file
    RedactorChangeLog result = redactor.apply(redaction);
    redactor.save();
}
finally { redactor.close(); }
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-redaction</artifactId> <version>24.6</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

Tools to Hide and Remove Content

GroupDocs.Redaction for Java helps you hide or erase sensitive data in various file formats. Keep your documents secure and well-structured.

Effective Redaction Features

Find & Replace Text

Search documents for private text and replace it to ensure data security.

Cover Image Areas

Hide full images or selected regions by applying overlays.

Erase Metadata

Remove or modify hidden metadata to protect confidential information.

Use Overlays to Hide Image Data

This sample shows how to protect sensitive image content in documents with overlays.

Java

//  Load the document
final Redactor redactor = new Redactor("source.docx");
try
{
    // Set overlay properties like size, position, and color
    java.awt.Dimension replacement_size = new java.awt.Dimension(300, 30);
    RegionReplacementOptions replacement_options = 
      new RegionReplacementOptions(java.awt.Color.BLUE, replacement_size);
    java.awt.Point replacement_point = new java.awt.Point(20, 125);
    ImageAreaRedaction redaction = new ImageAreaRedaction(replacement_point, replacement_options);

    // Mark the image area on the first page
    redaction.setFilters(new RedactionFilter[] {
        new PageRangeFilter(PageSeekOrigin.Begin, 0, 1),
        new PageAreaFilter(new java.awt.Point(0, 300), new java.awt.Dimension(600, 600))
    });

    // Cover the area with the overlay
    redactor.apply(redaction);

    // Save the redacted document
    SaveOptions save_options = new SaveOptions();
    save_options.setAddSuffix(true);
    save_options.setRasterizeToPDF(false);
    redactor.save(save_options);
}
finally { redactor.close(); }
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-redaction</artifactId> <version>24.6</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

About GroupDocs.Redaction for Java

GroupDocs.Redaction for Java gives Java developers easy-to-use tools to hide or erase content from WORD files. Redact text, images, and metadata across various formats.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Redaction for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Hide Content in WORD Files with Java

Use Java to hide or remove sensitive data in WORD files. An effective way to keep documents secure.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English