<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-watermark-cloud</artifactId>
<version>19.12</version>
</dependency>
compile(group: 'com.groupdocs', name: 'groupdocs-watermark-cloud', version: '19.12')
<dependency org="com.groupdocs" name="groupdocs-watermark-cloud" rev="19.12">
<artifact name="groupdocs-watermark-cloud" ext="jar"/>
</dependency>
libraryDependencies += "com.groupdocs" % "groupdocs-watermark-cloud" % "19.12"
Document Watermark Java Cloud REST API
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
- Add image or text watermarks to the documents hosted on the cloud.
- Utilize various features when adding text watermarks, such as:
- apply various text styling options to the text watermark with a cloud document.
- text watermark positioning
- text watermark transformations
- document format-specific options
- Add image watermarks to the cloud documents and apply various configuration options, such as:
- image watermark positioning
- image watermark transformations
- image format-specific options
- Search your required image or text watermarks within cloud documents using various criteria:
- dimension of the watermark
- watermark dimension maximum value
- watermark dimension minimum value
- watermark rotate angle
- watermark rotate angle maximum value
- watermark rotate angle minimum value
- watermark text foreground / background color
- watermarks with bold, italic, underline, strikeout text
- so many more search filters
- Replace the searched watermarks in the cloud files.
- Ability to filter the text or image watermarks and remove them.
- Ability to remove the previously added watermarks (including watermarks added by a third-party tools).
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:
- Java 1.7+
- 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
- Type: OAuth 2.0
- Flow: application
- Authorization URL: https://api.groupdocs.cloud/connect/token
- Token Lifetime: 1 day (Default)
Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial
File | Classifier | Size |
---|---|---|
groupdocs-watermark-cloud-19.12-javadoc.jar | javadoc | 1,010.94 KB |
groupdocs-watermark-cloud-19.12-sources.jar | sources | 166.13 KB |
groupdocs-watermark-cloud-19.12.jar | 243.28 KB | |
groupdocs-watermark-cloud-19.12.pom | 2.87 KB |
GroupDocs Java REST API Maven SDK Java SDK Cloud REST REST API Cloud API MIT JWT oauth GroupDocs.Total Cloud GroupDocs.Watermark Cloud JAR document automation document automation cloud document DOC DOCX DOCM DOT DOTM DOTX RTF ODT XLS XLT XLSX XLSM XLTX XLTM PPT PPTX PPTM PPS PPSX PPSM POTX POTM VSD VDX VSDX VSTX VSS VSSX VSDM VSSM VSTM VTX VSX BMP GIF JPG JPEG JPE JP2 PNG TIFF WEBP PDF watermark text image text watermark image watermark positioning dimension rotation foreground background search filter styling formatting alignment