GroupDocs.Watermark for Java API

Java Word Watermark Removal

Master the removal of watermarks from Word documents using the GroupDocs.Watermark for Java API, ensuring pristine document outputs.

Clear Word documents of watermarks using Java

GroupDocs.Watermark makes it easy to clear business documents of previously added watermarks. Empower your Java application by installing our library and do it in a few simple steps:

  1. First of all instantiate the main class called Watermarker with Word document. Our API supports passing a document to be processed as stream or a local path.
  2. Use SearchCriteria to limit set of watermarks to be processed. It is possible to use an image as search parameter as well as text or formating features. Then more specific search parameters you provide, then more precise result you obtain.
  3. Process list of the document watermarks that you have obtained as a search result. Clear the document.
  4. After clearing the document save result as a local file or a byte stream.

// Clear text watermark in Word document

// Instantiate Watermarker with Word document
Watermarker watermarker = new Watermarker("input.docx");

// Clear specific watermark
PossibleWatermarkCollection possibleWatermarks = watermarker.search();
possibleWatermarks.removeAt(0);

// Save processed file
watermarker.save("output.docx");
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-watermark</artifactId> <version>24.8</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

Efficient Watermark Removal via Java API

Explore our Java API’s robust capabilities to remove or clear watermarks from various document types, including PDFs and Office files. Perfect for developers looking to maintain clean visuals and protect document integrity.

Clear Watermark

Remove Watermarks with Precision

Utilize our Java API to precisely target and delete watermarks without disrupting the original document layout. Ideal for sensitive or official documents where clarity and accuracy are paramount.

Batch Watermark Deletion

Enhance your document processing efficiency by removing watermarks from multiple files simultaneously. Our API supports batch operations, saving time and resources for large-scale tasks.

Edit Out Watermark Elements

Our advanced editing tools allow you to selectively edit out watermark components, providing flexibility in managing document presentations while ensuring content security.

PDF clear text watermark

This example shows how to find and remove all annotations containing text with a particular formatting from a PDF document.

Java


//  Load PDF document
PdfLoadOptions loadOptions = new PdfLoadOptions();
Watermarker watermarker = new Watermarker("source.pdf", loadOptions);

//  Get document content
PdfContent pdfContent = watermarker.getContent(PdfContent.class);

//  Clear text watermarks with particular font
for (PdfPage page : pdfContent.getPages()){
    for (int i = page.getAnnotations().getCount() - 1; i >= 0; i--){
        for (FormattedTextFragment fragment : page.getAnnotations().get_Item(i).getFormattedTextFragments()){
            if (fragment.getFont().getFamilyName() == "Verdana"){
                page.getAnnotations().removeAt(i);
                break;
            }
        }
    }
}

//  Save the document
watermarker.save("result.pdf");
watermarker.close();

GroupDocs.Watermark for Java library

Leverage the GroupDocs.Watermark for Java library to effectively manage and clear watermarks from Word documents. This powerful tool provides capabilities to remove, adjust, and search for both text and image watermarks, facilitating the protection and management of document authenticity and appearance.
Learn more
About illustration

Ready to get started?

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

Useful resources

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

Handling Word Watermarks with Java

Explore how to efficiently manage and remove watermarks in Word files, enhancing document security and readability with the GroupDocs.Watermark for Java API.

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