Javascript: SignatureField.setImage Method
Description
Sets the signature field's image.
Syntax
<void> SignatureField.setImage(<string> imageData, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| imageData | The base64 encoded image data. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates SignatureField.setImage in a practical document-editing workflow. It sets the signature field's image.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureImage(signatureField) {
signatureField.setImage(
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgAH/qbPzWQAAAABJRU5ErkJggg==",
function() {
console.log("set image completed.");
},
onTxError
);
}