Releasing Next Generation GroupDocs.Signature Cloud API

Today, GroupDocs announces first public release of Next Generation GroupDocs.Signature Cloud 17.12. It is an e-Signature REST API to add the power of electronic signatures in your applications without installing any additional software. The GroupDocs.Signature Cloud API is an easy way to give your apps e-signature functionality with features like adding e-signature, verifying signature and searching signature in supported file formats along with other features. Please check release notes for complete list of features offered in the first version of GroupDocs.Signature Cloud.

The following sections describe some details regarding these features.

Supported Signature Types

The first version of GroupDocs.Signature Cloud supports following types of signatures in the API:

  • Digital Signature
  • Barcode Signature
  • QR-Code Signature
  • Text Signature
  • Image Signature

Add Digital Signature to Document

GroupDocs.Signature Cloud REST API supports to add Digital Signature to a document. It provides methods to create Digital Signature in Document Pages with different options of Certificate type, location, alignment, font, margins and appearances by using Signature Options Objects data in request body. Please see the following URI, REST command(Curl) and .NET SDK example for the purpose.

URI

https://api.groupdocs.cloud/v1/signature/{filename}/digital

Request Data

{"Visible": true,"Password": "password","CertificateGuid": "temp.pfx","ImageGuid": "signature.jpg","Left": 10,"Top": 10,"Width": 40,"Height": 10,"LocationMeasureType": "Millimeters","SizeMeasureType": "Millimeters","RotationAngle": 0,"HorizontalAlignment": "Right","VerticalAlignment": "Bottom","Margin": {"All": 10,"Left": 10,"Top": 10,"Right": 10,"Bottom": 10},"MarginMeasureType": "Millimeters","Opacity": 0.5,"SignAllPages": true,"DocumentPageNumber": 1,"OptionsType": "PdfSignDigitalOptionsData"}

Rest example(cURL)

curl -v "https://api.groupdocs.cloud/v1/signature/01_pages.pdf/digital" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{"Visible": true,"Password": "password","CertificateGuid": "temp.pfx","ImageGuid": "signature.jpg","Left": 10,"Top": 10,"Width": 40,"Height": 10,"LocationMeasureType": "Millimeters","SizeMeasureType": "Millimeters","RotationAngle": 0,"HorizontalAlignment": "Right","VerticalAlignment": "Bottom","Margin": {"All": 10,"Left": 10,"Top": 10,"Right": 10,"Bottom": 10},"MarginMeasureType": "Millimeters","Opacity": 0.5,"SignAllPages": true,"DocumentPageNumber": 1,"OptionsType": "PdfSignDigitalOptionsData"}" \
-H "authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

.NET SDK example

//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
var configuration = new Configuration
{
    AppSid = Sid,
    AppKey = Key
};

var apiInstance = new SignatureApi(configuration);

try
{
    var signOptionsData = new GroupDocs.Signature.Cloud.Sdk.Model.PdfSignDigitalOptionsData()
    {
        DocumentPageNumber = 1,
        Height = 80,
        HorizontalAlignment = GroupDocs.Signature.Cloud.Sdk.Model.SignDigitalOptionsData.HorizontalAlignmentEnum.Right,
        Left = 10,
        LocationMeasureType = GroupDocs.Signature.Cloud.Sdk.Model.SignDigitalOptionsData.LocationMeasureTypeEnum.Pixels,
        Margin = new GroupDocs.Signature.Cloud.Sdk.Model.PaddingData() { Left = 10, Right = 10, Bottom = 10, Top = 10 },
        MarginMeasureType = GroupDocs.Signature.Cloud.Sdk.Model.SignDigitalOptionsData.MarginMeasureTypeEnum.Pixels,
        Opacity = 0.5,
        SignAllPages = false,
        CertificateGuid = "temp.pfx",
        Password="password",
        ImageGuid="signature.jpg",
        Top = 100,
        VerticalAlignment = GroupDocs.Signature.Cloud.Sdk.Model.SignDigitalOptionsData.VerticalAlignmentEnum.Center,
        Width = 100
    };
    var request = new PostDigitalRequest
    {
        Name = "02_pages.pdf",
        SignOptionsData = signOptionsData,
        Password = null,
        Folder = null,

    };

    var response = apiInstance.PostDigital(request);

    Debug.Print("FleName: " + response.FileName);

}
catch (Exception e)
{
    Debug.Print("Exception when signing document with digital signature: " + e.Message);
}

Verify Digital Signature

GroupDocs.Signature Cloud REST API supports to verify a signed document. It provides methods to verify Digital Signature in Documents Pages with different options for page number, text and search criteria by using Verification Options Objects data in request body. Please see the following URI, JSON Request data, REST command(Curl) and .NET SDK example for the purpose.

URI

https://api-qa.groupdocs.cloud/v1/signature/{filename}/digital/verification?Folder={folder}

Request Data

"{"DocumentPageNumber":1,"Password": "password","CertificateGuid": "temp.pfx","Comments": "verified data","SignDateTimeFrom": "1/12/2017","SignDateTimeTo":"12/12/2017","OptionsType":"PdfVerifyDigitalOptionsData"}

Rest example(cURL)

curl -v "https://api-qa.groupdocs.cloud/v1/signature/Signed_Digital.pdf/digital/verification?Folder=signed" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{"DocumentPageNumber":1,"Password": "password","CertificateGuid": "temp.pfx","Comments": "verified data","SignDateTimeFrom": "1/12/2017","SignDateTimeTo":"12/12/2017","OptionsType":"PdfVerifyDigitalOptionsData"}" \
-H "authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

.NET SDK example

//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
var configuration = new Configuration
{
    AppSid = Sid,
    AppKey = Key
};
var apiInstance = new SignatureApi(configuration);
try
{
    var verifyOptionsData = new GroupDocs.Signature.Cloud.Sdk.Model.PdfVerifyDigitalOptionsData()
    {
        DocumentPageNumber= 1,
        Password = "password",
        CertificateGuid = "temp.pfx",
    };
    var request = new PostVerificationDigitalRequest
    {
        Name = "Signed_Digital.pdf",
        VerifyOptionsData = verifyOptionsData,
        Password = null,
        Folder = "signed"
    };
var response = apiInstance.PostVerificationDigital(request);
Debug.Print("FleName: " + response.FileName);
Debug.Print("Result: " + response.Result);
}
catch (Exception e)
{
Debug.Print("Exception when verifying Digital signature: " + e.Message);
}

API Explorer

GroupDocs for Cloud REST APIs come with a web based API Explorer, that provides an easiest way to try out our API right away in your favorite browser. It is a collection of Swagger documentation for the GroupDocs for Cloud APIs. So simply, first you need to sign up with GroupDocs for Cloud, get APP key and SID and start testing GropuDocs.Signature Cloud Rest API in web browser interactively.

GroupDocs.Signature Cloud Resources

Following are the links to some useful resources you may need to accomplish your tasks.

Start a Free Trial Today

Start a free trial today – all you need is to sign up with the GroupDocs Cloud service. Once you have signed up, you are ready to try the powerful file processing features offered by GroupDocs Cloud.