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

Document Annotation Java Cloud REST API

banner

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

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

Cloud Document Annotation Features

Supported Types of Cloud Annotations

  • Area Annotation: Mark an area using a rectangle on a page within a cloud document
  • Distance Annotation: Distance between two points in a straight line marked as an annotation within a cloud document.
  • Ellipse Annotation: Mark part of the document with an elliptical annotation.
  • Image Annotation: Image overlay annotation to annotate the desired cloud document page content.
  • Link Annotation: A hyperlink annotation that is directed to a remote resource.
  • Multiple Annotation: Adds multiple annotations to the same cloud document.
  • Point Annotation: Adds an annotation note / sticky note to the desired point within the cloud document.
  • Polyline Annotation: Annotation that you may draw using shapes or freehand lines.
  • Resource Redaction Annotation: A black rectangle with fixed position that you may add to hide / redact any text within a cloud document.
  • Squiggly Annotation: Adds a squiggly line under the text to which you want to bring attention.

Supported Cloud Annotation Document Formats

Microsoft Word®: DOC, DOCX, DOCM, DOT, DOTX, DOTM, RTF, TXT
OpenOffice Writer®: ODT, OTT
Microsoft Excel®: XLS, XLSX, XLSB
Microsoft PowerPoint®: PPT, PPTX, PPSX
OpenOffice Impress®: ODP, OTP
Microsoft Visio®: VSD, VDX, VSS, VSDM
Microsoft Outlook®: MSG, EML, EMLX
AutoCAD: CAD
Images: DJVU, JPEG, TIFF, BMP, GIF (static images without animation)
Medical Imaging: DICOM
Markup: HTML, MHTML
Fixed Layout: PDF
Meta Files: EMF, WMF

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven

Prerequisites

To use GroupDocs.Annotation 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.Annotation-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-annotation-cloud</artifactId>
    <version>22.2</version>
    <type>pom</type>
</dependency>

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/groupdocs-annotation-cloud-22.2.jar
  • target/lib/*.jar

Get Started

Please follow the Quick Start instructions.

Sample Java Code to Add a Point Annotation

// For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-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);
  
AnnotateApi apiInstance = new AnnotateApi(configuration);
 
// Create annotation/s.
AnnotationInfo[] annotations = new AnnotationInfo[1];
annotations[0] = new AnnotationInfo();
 
Point pt = new Point();
pt.setX(1.0);
pt.setY(1.0);
annotations[0].setAnnotationPosition(pt);
 
Rectangle r = new Rectangle();
r.setX(100.0);
r.setY(100.0);
r.setWidth(200.0);
r.setHeight(100.0);
 
annotations[0].setBox(r);
annotations[0].setPageNumber(0);
annotations[0].setType(TypeEnum.POINT);
annotations[0].setText("This is point annotation");
annotations[0].setCreatorName("Anonym A.");
 
// Create request object.
FileInfo fileInfo = new FileInfo();
fileInfo.setFilePath("Annotationdocs\\one-page.docx");
 
AnnotateOptions options = new AnnotateOptions();
options.setFileInfo(fileInfo);
options.setAnnotations(Arrays.asList(annotations));
options.setOutputPath("Output/one-page-annotated.docx");
 
AnnotateRequest request = new AnnotateRequest(options);
 
// Executing api method.
AnnotationApiLink result = apiInstance.annotate(request);
 
System.out.println("AddPointAnnotation: Point Annotation added: " + result.getTitle());

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.12December 27, 2023
23.4April 14, 2023
22.2February 7, 2022
18.4January 25, 2022
18.7January 25, 2022
21.2January 25, 2022
21.6January 25, 2022
20.10October 14, 2020
19.5May 15, 2019