Skip to main content

addObjectSignature

Puts the pad into signature capture mode and specifies the signature object in which a captured signature is saved. Only one signature object can be added to the current control list.

wizCtl.addObjectSignature(id, sigSDK, sigObj, options)
ParameterDescription
id

String that identifies the object.
Cannot be any of the values reserved for text or button objects: who, why, ok, clear, cancel, delete.

sigSDKThe initialized SDK module.
sigObjA SigObj with a valid licence. The captured signature is stored in this object.
options

Object with the following fields: (Optional)

  • integrityKey - A sigSDK.KeyType value used for the integrity check, for example sigSDK.KeyType.SHA512.
  • documentHash - A sigSDK.Hash object that binds the signature to a document.
Return values
The added signature object. Throws an exception if an error occurs.

The returned object has the following property:

PropertyDescription
onSignatureCapturedFunction called when the signature has been captured and accepted.

Add text objects with the ids who and why to store the signatory's name and the reason for signing in the signature. See addObjectText.

The following example captures a signature, bound to a document hash:

const signatureOpts = {
integrityKey: sigSDK.KeyType.SHA512,
documentHash: documentHash
};

const signComponent = wizCtl.addObjectSignature("Sig", sigSDK, sigObj, signatureOpts);
signComponent.onSignatureCaptured = async function() {
// The signature is now stored in sigObj
return true;
}

wizCtl.addObjectButton("clear", "centre", "bottom", "Clear", 100);
wizCtl.addObjectButton("ok", "right", "bottom", "OK", 100);
await wizCtl.display(false);