The Document Signing section provides functions for signing documents and working with signature-related data.
It includes operations such as signing PDF documents and retrieving signing metadata.
These APIs enable secure and controlled execution of document signing processes.
signPdf (Android, Windows, iOS) #
Invokes the signing activity for the specified PDF document and saves the signed document under the given filename. Callback functions and custom parameters can also be defined.
/**
* @param {Object} arg- Parameter JSON object.
* @returns {void}
*/
function signPdf(arg);Parameters description :
| Name | Required | Format | Description |
|---|---|---|---|
| path | true | string | path to the PDF file within the workspace. |
| savePath | true | string | path to the workspace directory where the signed file will be saved |
| call | true | string | Callback function name |
| savePngPath | false | string | enables saving an image of each handwritten signature as a PNG file in the wizard workspace. The PNG file name matches the name of the AcroForm signature field where the signature was applied. |
| allowedFields | false | JSON Object | restricts the signing session to a specific set of AcroForm fields. This is useful in multi-step or multi-signer workflows, where each signer should see and interact only with the fields assigned to them. If is not specified, all AcroForm fields are displayed and available for signing. Are described in Allowed fields chapter |
| color | false | string | set the color of the action bar at the top of the screen in hex format. For example “#ff0000“ |
| allowedButtons | false | JSON Array | defines which action buttons are displayed during the signing ceremony. Are described in Allowed buttons chapter |
| config | false | JSON Object | allows further customization of the signing process, such as defining whether the document must be read or signed, specifying signature fields for which biometric data should not be captured, and enabling or disabling calculation of a signature hash for audit purposes. Are described in Config chapter |
| nativeMenu | false | JSON Array | native action bar button configuration. Are described in the Native menu chapter |
| progress | false | int | set the progress indicator in the action bar at the top of the screen |
| max | false | int | set the progress indicator in the action bar at the top of the screen |
| data | false | JSON Object | set additional document info to pdf |
Example :
const arg = {
"path": "/tosign/Test1.pdf",
"savePath": "/signed/Test1.pdf",
"call": "onSignDocument"
};
signPdf(arg);
/**
* callback function for signPdf
*
* @param {string} res - The response string to be parsed as JSON.
*/
function onSignDocument(res) {
const result = JSON.parse(res);
}Result example :
{
"parameter": "true",
"data": {
"annotation": false
}
}– Allowed fields #
Example :
"allowedFields": {
"SIGNATURE": [
"SC_signature"
],
"TEXT": [
"TO_text",
"TC_text"
]
}Description :
| Name | Format | Description |
|---|---|---|
| allowedFields | JSON Object | Configuration of which AcroFields will be allowed during signing. |
| allowedFields.key | string | Acrofield type. Allowed values : – TEXT – CHECKBOX – SIGNATURE – RADIO – COMBOBOX |
| allowedFields.value | JSON Array | AcroField names |
– Allowed buttons #
Example :
"allowedButtons": [
"action_canceled",
"action_ok",
"action_save"
]Description :
| Name | Format | Description |
|---|---|---|
| allowedButtons | JSON Array | Defines which action buttons are displayed during the signing ceremony. |
| allowedButtons.value | string | Allowed values : – action_back – action_fieldsIterator – action_discard – action_ok – action_canceled – action_save |
– Config #
Example
"config": {
"captureBiometry": [
"SC_Signature"
],
"auditHash": false,
"method": "write",
"signerInfo": {
"SC_Signature": [
"John Doe"
],
"SO_Signature": [
"Thomas Deer"
]
},
"signatureGroups": [
[
"SC_Signature",
"SC_Signature1"
],
[
"SO_Signature",
"SO_Signature1"
]
]
}Description :
| Name | Format | Description |
|---|---|---|
| config | JSON Object | Allows further customization of the signing process |
| config.captureBiometry | JSON Array | White list of signature fields names, biometric characteristics are captured for all signature fields by default |
| config.auditHash | boolean | Enabling or disabling calculation of a signature hash for audit purposes |
| config.method | string | How the document will be processed during signing. – write : Mandatory to signed (default) – read : Mandatory to read – optional : Optional to read |
| config.signerInfo | JSON Object | Assigning the signer name to the signature field. Signer info will be displayed under hand written signature |
| config.signatureGroups | JSON Array | Defines groups of signature fields that are logically linked during the signing process. All fields within the same group share the same signature. When a signer completes one signature field in a group, the signature is automatically reproduced in all other fields in that group. |
– Native menu #
Example :
"nativeMenu": [
{
"id": "action_ok",
"title": "Submit document",
"icon": "REMOVE",
"color": "#01579b"
},
{
"id": "action_canceled",
"title": "Discard document",
"icon": "/img/discard.png",
"color": "#ff0000"
}
]Description :
| Name | Format | Description |
|---|---|---|
| nativeMenu | JSON Array | Native action bar button configuration |
| nativeMenu.id | string | Action bar button id. Allowed values : – action_back – action_fieldsIterator – action_discard – action_ok – action_canceled – action_save |
| nativeMenu.title | string | Button label |
| nativeMenu.icon | string | Button icon. Allowed values : – REMOVE : no icon will be displayed – path to the icon file within the workspace |
| nativeMenu.color | string | Button label color in hex format |
preview (Android, iOS) #
Previews a PDF Document without a possibility to sign or modify the document.
/**
* @param {Object} arg- Parameter JSON object.
* @returns {void}
*/
function preview (arg);| Name | Required | Format | Description |
|---|---|---|---|
| path | true | string | path to the PDF file within the workspace. |
| color | false | string | set the color of the action bar at the top of the screen in hex format. For example “#ff0000“ |
Example :
const arg = {
"path": "/tosign/Test1.pdf"
};
preview (arg);retrieveDocumentMetadata (Android) #
Retrieves metadata collected during the signing ceremony. This metadata includes the state of the document’s AcroForm fields, such as which checkboxes were selected and which signature fields were completed.
The retrieved data can be used to monitor the signing process and to prevent document submission if required fields have not been filled in or signed.
/**
* @param {Object} arg- Empty JSON object.
* @returns {string} - Returns document metadata in JSON format as string
*/
function retrieveDocumentMetadata (arg);Example :
const res = retrieveDocumentMetadata({});
const result = JSON.parse(res);Result example :
{
"documentMetadata": {
"CR_checkbox": {
"time": "1768572081401",
"value": "Yes"
},
"RO_radio": {
"time": "1768572087197",
"value": "C"
},
"SC_signature": {
"time": "1768572092729",
"value": "signed"
},
"CBO_combo": {
"time": "1768572078417",
"value": "B"
},
"TC_text": {
"time": "1768572075099",
"value": "Text"
},
"SO_signature": {
"time": "1768572092729",
"value": ""
}
}
}getPdfAuditData (Android, Windows) #
Returns the collection of audit data for the recently processed PDF.
/**
* @param {Object} arg- Parameter JSON object.
* @returns {string} - Returns Pdf audit data directly only in android device
*/
function getPdfAuditData(arg);Parameters description :
| Name | Required | Format | Description |
|---|---|---|---|
| call | false | string | callback function name |
Example :
const arg = {
"call": "onPdfAuditData"
};
getPdfAuditData(arg);
/**
* Callback function for PDF audit data.
* @param {string} res - The JSON string containing the PDF audit data
*/
function onPdfAuditData (res) {
const result = JSON.parse(res);
}Result example :
{
"parameter": {
"status": "OK",
"message": "",
"data": [
{
"blockName": "SC_signature",
"auditData": "{'docName':'Test1.pdf','data':[{'action':'OPEN_DOCUMENT','message':'','id':'','date':'2026-01-16T15:31:14.7160000+01:00'},{'action':'TEXT_BOX_CHANGED','message':'Text','id':'TC_text','date':'2026-01-16T15:31:29.9490000+01:00'},{'action':'CHECK_BOX_CHANGED','message':'Yes','id':'CR_checkbox','date':'2026-01-16T15:31:33.0740000+01:00'},{'action':'RADIO_BUTTON_CHANGED','message':'B','id':'RO_radio','date':'2026-01-16T15:31:34.1890000+01:00'},{'action':'OPEN_SIGNATURE_PAD','message':'','id':'SC_signature','date':'2026-01-16T15:31:36.7970000+01:00'},{'action':'ACCEPT_SIGNATURE_PAD','message':'','id':'SC_signature','date':'2026-01-16T15:31:41.5430000+01:00'}]}",
"pdfCheckSum": "89f7a931a1702e93e5d507f14600ed6191b2eceb"
}
]
}
}