<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!  

文档注释 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 帮助您构建无需安装任何第 3 方软件即可运行的云文档注释器 Java 应用程序。它是 GroupDocs.Annotation Cloud REST APIs 的包装器。

云文档注释功能

支持的云注释类型

支持的云注释文档格式

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
图像: DJVU、JPEG、TIFF、BMP、GIF(没有动画的静态图像)
医学成像: DICOM
标记: HTML、MHTML
固定布局: PDF
元文件: EMF、WMF

要求

构建 API 客户端库需要:

  1. Java 1.7+
  2. 行家

先决条件

要使用 GroupDocs.Annotation Cloud SDK for Java,您需要在 GroupDocs Cloud 注册一个帐户并在 Cloud Dashboard 查找/创建客户端 ID 和客户端密码。有可用的免费配额。有关详细信息,请参阅GroupDocs Cloud Pricing

从 Maven 安装 GroupDocs.Annotation-Cloud

将 GroupDocs 云存储库添加到您的应用程序 pom.xml

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

从源安装

要将 API 客户端库安装到本地 Maven 存储库,只需执行:

mvn clean install

要将其部署到远程 Maven 存储库,请配置存储库的设置并执行:

mvn clean deploy

有关更多信息,请参阅 OSSRH Guide

Maven 用户

将此依赖项添加到项目的 POM 中:

<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-annotation-cloud</artifactId>
    <version>22.2</version>
    <type>pom</type>
</dependency>

### 其他

首先通过执行生成JAR:

mvn clean package

然后手动安装以下 JAR:

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

开始

请按照 Quick Start 说明进行操作。

添加点注释的示例 Java 代码

// 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());

授权与认证

Authentication schemes API定义如下:

###智威汤逊

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

VersionRelease Date
22.22022年2月7日
18.42022年1月25日
18.72022年1月25日
21.22022年1月25日
21.62022年1月25日
20.102020年10月14日
19.52019年5月15日