Java text and image watermark APIs

Document watermark creator and remover APIs for Images, PDF and Microsoft Office documents within any Java based application

Download Free Trial
Java Watermark API

GroupDocs.Watermark for Java


GroupDocs.Watermark for Java is a powerful document watermarking API to add, search and remove watermarks in supported file formats. Furthermore, Watermarks added by the API are hard to be automatically removed by third-party tools. While it can be easily used for searching and removing previously added watermarks of popular types. API is a self-descriptive and straight-forward for integrating image and text watermarks within any PDF, Microsoft Office and multiple image document formats.


Advanced Watermarking API Features



Easy integration


Multiple supported document formats


Adding watermark to images inside a document


Text and image watermark types


Search and remove Text/Image watermark


Working with existing watermark objects


Extracting watermark objects information in a document


Specify objects for watermark search


PDF document rasterization


Getting document information


Searching watermarks by text formatting (font, color etc)


Working with hyperlinks associated with document entities (all formats)


Setting background image for charts in Excel and PowerPoint


Specify Dynabic.Metered account to run API in licensed mode

Adding Watermarks

API has two watermark types Text or Image. Adding watermarks of any type contains a few lines of code.

Adding image watermark - Java

Document doc = Document.load("sample.docx");
 // Use path to the image as constructor's parameter
ImageWatermark watermark = new ImageWatermark(@"D:\watermark.jpg");
doc.addWatermark(watermark);   // Add watermark to the document;   // Save document

Watermarking in Microsoft Word And Visio Formats

GroupDocs.Watermark for Java API allows adding watermark objects in the header and footer of the pages. Moreover, API can also insert watermarks into a Word document section or images within that section by extracting particular section information firstly. Also, remove a particular shape within a specific section from any level of document structure.

Similarly, watermarks in Visio documents are mostly represented by shapes. API can easily extract information about all or particular Shapes and Headers & Footers. Also, API is able to remove and replace a particular Header&Footer or shape

Watermark in Excel Document

API provides an easy way to add watermark to the worksheets, a particular worksheet or to images within a specific worksheet. Shapes, Backgrounds, Headers and Footers watermark types are supported in Microsoft Excel document.

  • By default, Watermark is added as a Shape. One can extract Information about all shapes in the whole document, add watermark to all image shapes and can remove a particular shape.
  • Similarly, Watermark can also be added as background. Furthermore, it is easy to extract Information about all backgrounds, insert watermark to all backgrounds or clear a particular background.
  • Watermarks within Headers & Footers
    • Extract information about all Headers & Footers
    • Add watermark
    • Add watermark to all images within this section
    • Clear a particular Header & Footer
    • Remove a particular section of Header & Footer

Watermark in PowerPoint

API can add watermark to particular master, layout or notes slides of a PowerPoint presentation in a simplified way. Text or image effects can be applied to shape watermark. With Shape type, API can extract information about all image shapes, remove a specific shape or add watermark to all image shapes. Similarly, using Background type it is easy to extract information about all slides backgrounds, insert watermark to all background images or remove a particular background image.

PDF Watermarks

API supports three types of PDF watermark XObjects, Artifacts and Annotations and is able to add watermark using any of these three methods. Moreover, API can also extract information about all XObjects, Annotations, and Artifacts in a PDF document. Removing PDF watermark is easy with third-party tools but with the use of PDF document rasterization API feature, it is impossible to remove it.

Installation and Usage

GroupDocs.Watermark for Java API files can be downloaded directly from:

Adding as External JAR

You can add GroupDocs.Watermark in your application as external JAR by following below steps:

    • Right click on Java project, and go to Properties..
    • Go to Java Build Path.
    • Open Libraries tab.
    • Press Add External JARs.., and load GroupDocs.Annotation Jar.

Following are the other ways of installation:

Fat version
    • Download API from the download archive.
    • Extract the archive.
    • Open console and cd to lib directory of the extracted directory.
    • Run the install_library.bat to install API in maven

Note: version number and file name can be different from current documentation.

  • Add dependency to your pom.xml
Slim version

This API is hosted in the Maven Central Repository, so if you use Maven in your projects just use the dependency declaration provided above.

The JAR itself you can download from the Maven Central Repository.


Support and Learning Resources


GroupDocs.Watermark offers document watermarking APIs for other popular development environments as listed below: