<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-watermark-cloud</artifactId>
    <version>22.3</version>
</dependency>
copied!  
compile(group: 'com.groupdocs', name: 'groupdocs-watermark-cloud', version: '22.3')
copied!  
<dependency org="com.groupdocs" name="groupdocs-watermark-cloud" rev="22.3">
    <artifact name="groupdocs-watermark-cloud" ext="jar"/>
</dependency>
copied!  
libraryDependencies += "com.groupdocs" % "groupdocs-watermark-cloud" % "22.3"
copied!  

Document Watermark Java Cloud REST API

banner

Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial

GroupDocs.Watermark Cloud SDK for Java helps you build cloud Document Watermarking Java Apps that work without installing any 3rd party software. It is a wrapper around GroupDocs.Watermark Cloud REST APIs.

Cloud Document Watermarking SDK Features

Supported Document Watermark File Formats

Microsoft Word®: DOC, DOCX, DOCM, DOT, DOTM, DOTX, RTF
OpenOffice Writer®: ODT
Microsoft Excel®: XLS, XLT, XLSX, XLSM, XLTX, XLTM
Microsoft PowerPoint®: PPT, PPTX, PPTM, PPS, PPSX, PPSM, POTX, POTM
Microsoft Visio®: VSD, VDX, VSDX, VSTX, VSS, VSSX, VSDM, VSSM, VSTM, VTX, VSX
Images: BMP, GIF, JPG, JPEG, JPE, JP2, PNG, TIFF, WEBP
Fixed Layout: PDF

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven

Prerequisites

To use GroupDocs.Watermark Cloud SDK for Java you need to register an account with GroupDocs Cloud and lookup/create Client ID and Client Secret at Cloud Dashboard. There is free quota available. For more details, see GroupDocs Cloud Pricing.

Install GroupDocs.Watermark-Cloud from Maven

Add GroupDocs Cloud repository to your application pom.xml

<repository>
    <id>repository.groupdocs.cloud</id>
    <name>repository.groupdocs.cloud</name>
    <url>https://releases.groupdocs.cloud/java/repo/</url>
</repository>

Install from source

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project’s POM:

<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-watermark-cloud</artifactId>
    <version>22.3</version>
    <type>pom</type>
</dependency>

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/groupdocs-watermark-cloud-22.3.jar
  • target/lib/*.jar

Get Started

Please follow the Quick Start instructions.

Add Text Watermark to DOCX via Java Cloud SDK

// For complete examples and data files, please go to https://github.com/groupdocs-parser-cloud/groupdocs-parser-cloud-java-samples
String MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
String MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
   
Configuration configuration = new Configuration(MyAppSid, MyAppKey);
WatermarkApi apiInstance = new WatermarkApi(configuration);
 
WatermarkOptions options = new WatermarkOptions();
FileInfo fileInfo = new FileInfo();
fileInfo.setFilePath("documents/sample.docx");
options.setFileInfo(fileInfo);
 
WatermarkDetails watermarkDetails = new WatermarkDetails();
TextWatermarkOptions textWatermarkOptions = new TextWatermarkOptions();
textWatermarkOptions.setText("New watermark text");
textWatermarkOptions.setFontFamilyName("Arial");
textWatermarkOptions.setFontSize(12d);
watermarkDetails.setTextWatermarkOptions(textWatermarkOptions);
 
List<WatermarkDetails> watermarkDetailsList = new ArrayList<WatermarkDetails>();
watermarkDetailsList.add(watermarkDetails);
options.setWatermarkDetails(watermarkDetailsList);
 
AddRequest request = new AddRequest(options);
WatermarkResult response = apiInstance.add(request);

Authorization & Authentication

Authentication schemes defined for the API is as follows:

JWT

Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial

VersionRelease Date
23.8August 29, 2023
22.12December 26, 2022
22.3March 28, 2022
19.12December 19, 2019