Java Cloud SDK for Document Watermarking

Add, edit, search and delete watermarks from all popular document and images file formats using watermarking Cloud SDK for Java and REST API.

  • GroupDocs.Watermark for cURL
  • GroupDocs.Watermark for .NET
Start Free Trial

The API is flexible, feature-rich and offers straightforward methods to manage and manipulate watermarks on several document types. The REST API supports all sorts of watermarking features like adding, searching, updating and deleting without using any external software. The Java SDK for Watermark REST API makes it possible to search watermarks within documents and edit or remove watermarks that were already added by any third-party tool. It also allows to customize watermarks by specifying the text style, font, size, color or position as per the project requirements.

GroupDocs.Watermark Cloud is a REST API making it a perfect choice for programmers to use it with any language or platform that is capable to make REST API calls. It easily integrates with other cloud services to provide an optimal watermarks management experience across web, mobile desktop or cloud platforms.

Advanced watermark management API Features

Secured watermark management solution

Add or Remove Watermark from a specific pages or whole document

Find text or image-based watermarks inside the documents

Manage formatting settings to manipulate watermarks

Cloud REST API to be used with any language or platform

Search and delete already added watermarks from supported file formats

Remove Watermark from Document – Java

//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
public class RemoveWatermarks {

  public static void main(String[] args) {

    WatermarkApi apiInstance = new WatermarkApi(Common.GetConfiguration());

    try {
      FileInfo fileInfo = new FileInfo();
      fileInfo.setFilePath("with_watermarks/sample.pdf");
      fileInfo.setStorageName(Common.MyStorage);
      RemoveOptions options = new RemoveOptions();
      options.setFileInfo(fileInfo);
      
      ImageSearchCriteria imageSearchCriteria = new ImageSearchCriteria();
      FileInfo imageFileInfo = new FileInfo();
      imageFileInfo.setFilePath("watermark_images/sample_watermark.webp");
      imageFileInfo.setStorageName(Common.MyStorage);
      imageSearchCriteria.setImageFileInfo(imageFileInfo);
      options.setImageSearchCriteria(imageSearchCriteria);
      
      TextSearchCriteria textSearchCriteria = new TextSearchCriteria();
      textSearchCriteria.setSearchText("Watermark text");
      options.setTextSearchCriteria(textSearchCriteria);
      
      options.setOutputFolder("removed_watermarks");
      
      RemoveRequest request = new RemoveRequest(options);
      RemoveResult response = apiInstance.remove(request);

      System.out.println("Resultant file path: " + response.getPath());
    } catch (ApiException e) {
      System.err.println("Exception while calling WatermarkApi:");
      e.printStackTrace();
    }
  }
}

Support and Learning Resources

GroupDocs.Watermark offers document viewing APIs for other popular development environments

  English
4e77447