今天,GroupDocs 宣布首次公開發布下一代 GroupDocs.Signature Cloud 17.12。它是一個電子簽名 REST API,可在您的應用程序中添加電子簽名的功能,而無需安裝任何其他軟件。 GroupDocs.Signature Cloud API 是一種為您的應用程序提供電子簽名功能的簡單方法,具有添加電子簽名、驗證簽名和搜索等功能支持的文件格式 中的簽名以及其他功能。請查看 發行說明 以獲取 GroupDocs.Signature Cloud 第一個版本中提供的功能的完整列表。以下部分描述了有關這些功能的一些詳細信息。
支持的簽名類型
GroupDocs.Signature Cloud 的第一個版本在 API 中支持以下類型的簽名:
- 電子簽名
- 條碼簽名
- 二維碼簽名
- 文字簽名
- 圖像簽名
向文檔添加數字簽名
GroupDocs.Signature Cloud REST API 支持向文檔添加數字簽名。它提供了通過使用請求正文中的簽名選項對像數據在文檔頁面中創建數字簽名的方法,其中包含不同的證書類型、位置、對齊方式、字體、邊距和外觀選項。為此,請參閱以下 URI、REST 命令 (Curl) 和 .NET SDK 示例。統一資源標識符
https://api.groupdocs.cloud/v1/signature/{filename}/digital
請求數據
{"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"}
其餘示例(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 示例
//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);
}
驗證數字簽名
GroupDocs.Signature Cloud REST API 支持驗證簽名文檔。它提供了通過使用請求正文中的驗證選項對像數據來驗證文檔頁面中的數字簽名的方法,其中包含頁碼、文本和搜索條件的不同選項。為此,請參閱以下 URI、JSON 請求數據、REST 命令(Curl)和 .NET SDK 示例。統一資源標識符
https://api-qa.groupdocs.cloud/v1/signature/{filename}/digital/verification?Folder={folder}
請求數據
"{"DocumentPageNumber":1,"Password": "password","CertificateGuid": "temp.pfx","Comments": "verified data","SignDateTimeFrom": "1/12/2017","SignDateTimeTo":"12/12/2017","OptionsType":"PdfVerifyDigitalOptionsData"}
其餘示例(cURL)
curl -v "[https://api-qa.groupdocs.cloud/v1/signature/Signed_Digital.pdf/digital/verification?Folder=signed"][7] \
-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 示例
//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瀏覽器
GroupDocs for Cloud REST API 附帶一個基於 Web 的 API Explorer,它提供了一種最簡單的方法來立即在您最喜歡的瀏覽器中試用我們的 API。它是 Cloud API GroupDocs 的 Swagger 文檔集合。簡而言之,首先您需要使用 GroupDocs for Cloud 註冊,獲取 APP 密鑰和 SID 並開始在 Web 瀏覽器中以交互方式測試 GropuDocs.Signature Cloud Rest API。
GroupDocs.Signature 雲資源
以下是完成任務可能需要的一些有用資源的鏈接。
- GroupDocs.簽名云
- GroupDocs.Signature雲在線文檔
- GroupDocs.Signature Cloud UI 幫助主題
- GroupDocs.簽名云論壇
- Web API Explorer(實例)
- GroupDocs.Signature 雲 SDK
- 使用 Web GUI 或 GroupDocs 雲服務 使用 GroupDocs 雲存儲
- 使用 Web GUI 或 GroupDocs 雲服務 處理 GroupDocs 使用情況和日誌
立即開始免費試用
立即開始免費試用 – 您只需註冊 GroupDocs 雲服務。註冊後,您就可以嘗試 GroupDocs Cloud 提供的強大文件處理功能。