<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-signature-cloud</artifactId>
<version>25.6</version>
</dependency>compile(group: 'com.groupdocs', name: 'groupdocs-signature-cloud', version: '25.6')<dependency org="com.groupdocs" name="groupdocs-signature-cloud" rev="25.6">
<artifact name="groupdocs-signature-cloud" ext="jar"/>
</dependency>libraryDependencies += "com.groupdocs" % "groupdocs-signature-cloud" % "25.6"Document eSignature Java Cloud REST API
Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial
GroupDocs.Signature Cloud SDK for Java helps you build cloud Document eSigning Java Apps that work without installing any 3rd party software. It is a wrapper around GroupDocs.Signature Cloud REST APIs.
Requirements
Building the API client library requires:
- Java 1.7+
- Maven
Prerequisites
To use GroupDocs.Signature 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.Signature-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-signature-cloud</artifactId>
<version>21.11</version>
</dependency>
Others
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/groupdocs-signature-cloud-21.11.jartarget/lib/*.jar
Get Started
Please follow the Quick Start instructions.
eSign Cloud Document with Image Signature via 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);
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
GroupDocs Java REST API Maven SDK Java SDK Cloud REST REST API Cloud API MIT JWT oauth GroupDocs.Total Cloud GroupDocs.Signature Cloud JAR document automation document automation cloud document DOC DOCM DOCX DOT DOTM DOTX RTF TXT ODT OTT XLS XLSB XLSM XLSX CSV TSV ODS OTS POTM POTX PPS PPSM PPSX PPT PPTM PPTX ODP OTP BMP CGM DJVU DNG GIF ICO JP2 JPF JPX J2K J2C JPM JPG JPEG ODG PCL PNG TIF TIFF CDR CMX DCM PSD SVG PS EPS PDF EMF WMF signature eSignature eSign digital signature stamp signature barcode signature digital stamp barcode qr code qr code signature styling formatting pfx certificate

