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

文档电子签名 Java 云 REST API

banner

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

GroupDocs.Signature Cloud SDK for Java 帮助您构建无需安装任何第 3 方软件即可运行的云文档电子签名 Java 应用程序。它是 GroupDocs.Signature Cloud REST APIs 的包装器。

云文档 eSing SDK 功能

云文本、图章、图像签名支持的文件格式

Microsoft Word®: DOC、DOCM、DOCX、DOT、DOTM、DOTX、RTF
OpenOffice Writer®: ODT、OTT
Microsoft Excel®: XLS、XLSB、XLSM、XLSX、XLT、XLTM、XLTX
OpenOffice Calc®: ODS
Microsoft PowerPoint®: POT、POTM、POTX、PPS、PPSM、PPSX、PPT、PPTX
OpenOffice Impress®: ODP
图片: JPG、PNG、BMP、GIF、TIFF
CorelDRAW®: CDR
固定布局: PDF

云数字签名支持的文件格式

Microsoft Word®: DOC、DOCM、DOCX、DOT、DOTM、DOTX
OpenOffice Writer®: ODT
Microsoft Excel®: XLS、XLSM、XLSX、XLT、XLTM、XLTX
Microsoft PowerPoint®: PPTM、PPTX
固定布局: PDF

Cloud BarCode 签名支持的文件格式

Microsoft Word®: DOC、DOCM、DOCX、DOT、DOTM、DOTX、RTF
OpenOffice Writer®: ODT、OTT
Microsoft Excel®: XLS、XLSB、XLSM、XLSX、XLT、XLTM、XLTX
OpenOffice Calc®: ODS
Microsoft PowerPoint®: POT、POTM、PPSX、PPTX
OpenOffice Impress®: ODP
图片: JPG、PNG、BMP、GIF、TIFF
CorelDRAW®: CDR
固定布局: PDF

云二维码签名支持的文件格式

Microsoft Word®: DOC、DOCM、DOCX、DOT、DOTM、DOTX、RTF
OpenOffice Writer®: OTT
Microsoft Excel®: XLS、XLSM、XLSX、XLT、XLTM、XLTX
图片: JPG、PNG、BMP、GIF、TIFF
CorelDRAW®: CDR
固定布局: PDF

请访问 Supported File Formats 以获取完整列表。

支持的文档电子签名文件格式

Microsoft Word®: DOC、DOCM、DOCX、DOT、DOTM、DOTX、RTF、TXT
OpenOffice Writer®: ODT、OTT
Microsoft Excel®: XLS、XLSB、XLSM、XLSX、CSV、TSV
OpenOffice Calc®: ODS、OTS
Microsoft PowerPoint®: POTM、POTX、PPS、PPSM、PPSX、PPT、PPTM、PPTX
OpenOffice Impress®: ODP、OTP
图像: BMP、CGM、DJVU、DNG、GIF、ICO、JP2、JPF、JPX、J2K、J2C、JPM、JPG、JPEG、ODG、PCL、PNG、TIF、TIFF
CorelDRAW®: CDR、CMX
医学影像: DCM
Photoshop®: PSD
矢量图像: SVG
后记: PS、EPS
固定布局: PDF
元文件: EMF、WMF

请访问 Supported Document Formats 以获得更全面的列表。

要求

构建 API 客户端库需要:

  1. Java 1.7+
  2. 行家

先决条件

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

从 Maven 安装 GroupDocs.Signature-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-signature-cloud</artifactId>
    <version>21.11</version>
</dependency>

### 其他

首先通过执行生成JAR:

mvn clean package

然后手动安装以下 JAR:

-target/groupdocs-signature-cloud-21.11.jar -target/lib/*.jar

开始

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

通过 Java Cloud SDK 使用图像签名对云文档进行电子签名

// For complete examples and data files, please go to https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-java-samples
String MyClientSecret = ""; // Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
String MyClientId = ""; // Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud

Configuration configuration = new Configuration(MyClientId, MyClientSecret);
SignApi apiInstance = new SignApi(configuration);

FileInfo fileInfo = new FileInfo();
fileInfo.setFilePath("Signaturedocs\\one-page.docx");
fileInfo.setPassword(null);
fileInfo.setVersionId(null);
fileInfo.setStorageName(Constants.MYStorage);

InfoSettings infoSettings = new InfoSettings();
infoSettings.setFileInfo(fileInfo);

SignImageOptions options = new SignImageOptions();
options.setSignatureType(SignatureTypeEnum.IMAGE);

// set signature properties
options.setImageFilePath("Signaturedocs\\signature.jpg");

// set signature position on a page
options.setLeft(100);
options.setTop(100);
options.setWidth(200);
options.setHeight(100);
options.setLocationMeasureType(LocationMeasureTypeEnum.PIXELS);
options.setSizeMeasureType(SizeMeasureTypeEnum.PIXELS);
options.setRotationAngle(0);
options.setHorizontalAlignment(HorizontalAlignmentEnum.NONE);
options.setVerticalAlignment(VerticalAlignmentEnum.NONE);

Padding padding = new Padding();
padding.setAll(5);
options.setMargin(padding);
options.setMarginMeasureType(MarginMeasureTypeEnum.PIXELS);

*set pages for signing (each of these page settings could be used singly)
options.setPage(1);
options.setAllPages(true);

PagesSetup pagesSetup = new PagesSetup();
pagesSetup.setEvenPages(false);
pagesSetup.setFirstPage(true);
pagesSetup.setLastPage(false);
pagesSetup.setOddPages(false);
pagesSetup.addPageNumbersItem(1);
options.setPagesSetup(pagesSetup);

SaveOptions saveOptions = new SaveOptions();
saveOptions.setOutputFilePath("Signaturedocs\\signedImage_one-page.docx");

SignSettings signSettings = new SignSettings();
signSettings.setFileInfo(fileInfo);
signSettings.addOptionsItem(options);
signSettings.setSaveOptions(saveOptions);

CreateSignaturesRequest request = new CreateSignaturesRequest(signSettings);

SignResult response = apiInstance.createSignatures(request);

授权与认证

Authentication schemes API定义如下:

###智威汤逊

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

VersionRelease Date
22.62022年6月24日
19.52022年1月25日
21.112021年11月25日
21.52021年5月5日
20.72020年7月28日
18.82018年8月14日