Highlights of GroupDocs.Redaction for Java

Remove Metadata from PHOTO with Java

Keep your PHOTO files secure by removing hidden metadata using Java tools.

How to Remove Metadata from Photo Files

Use GroupDocs.Redaction in your Java app to erase metadata from documents.

  1. Start a Redactor and open the Photo file.
  2. Set the rules to delete hidden fields.
  3. Apply redaction to clean the file.
  4. Save the updated file.
// Clean metadata in PHOTO files

// Load the file with Redactor
final Redactor redactor = new Redactor("input.jpeg");
try
{
    // Choose metadata fields to redact
    EraseMetadataRedaction redaction = new EraseMetadataRedaction(MetadataFilters.All);

    // Apply 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

Remove Private Info from Documents

GroupDocs.Redaction for Java helps clean files by deleting sensitive text, image content, and metadata. Great for privacy and security.

Useful Redaction Features

Text Cleanup

Find and delete words or numbers that shouldn’t be shared.

Image Redaction

Add covers over parts of images with sensitive content.

Metadata Deletion

Clean file details that may carry private information.

Delete Hidden Metadata Fields

This example shows how to remove fields like Author and Title from a PHOTO document.

Java

//  Open PHOTO file in the redactor
final Redactor redactor = new Redactor("source.jpeg");
try
{
    // Redact the Author field
    MetadataSearchRedaction redactionAuthor = 
        new MetadataSearchRedaction("[A-Za-z0-9 ]+", "GroupDocs Company");
    redactionAuthor.setFilter(MetadataFilters.Author);

    // Redact the Title field
    MetadataSearchRedaction redactionTitle = 
        new MetadataSearchRedaction("[A-Za-z0-9 ]+", "GroupDocs.Redaction Usage");
    redactionTitle.setFilter(MetadataFilters.Title);

    // Run the process
    Redaction[] redactions = new Redaction[]
    {
        redactionAuthor, redactionTitle
    };
    redactor.apply(redactions);

    // Save the cleaned file
    SaveOptions saveOptions = new SaveOptions();
    saveOptions.setAddSuffix(true);
    saveOptions.setRasterizeToPDF(false);
    redactor.save(saveOptions);
}
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 gives Java developers tools to hide sensitive content in PHOTO files, including text, image sections, and metadata.
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.

Use Java to Remove PHOTO Metadata

Protect your PHOTO documents by deleting metadata using Java tools.

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