- 18 Nov 2024
- 6 Minutes à lire
- SombreLumière
- PDF
Enforcing Signature Capture
- Mis à jour le 18 Nov 2024
- 6 Minutes à lire
- SombreLumière
- PDF
Java SDK
To download the full code sample see our Code Share site.
In OneSpan Sign, signers will only be asked to draw their signature once by default. If the transaction requires multiple signatures on the document, OneSpan Sign will automatically replicate the first drawn signature for any subsequent signatures. However, you have the option to require your signer to draw their signature on any given capture signature. This topic will focus on enforcing signature capture at the signature level.
If you are looking to enforce this at the transaction level, which would take care of forcing all capture signatures be redrawn, refer to the Signer Experience Settings.
Enforcing Capture Signature
To enable this feature, simply add the .enableEnforceCaptureSignature() option to your signature builder, as seen below:
Signature enforceCaptureSignature = SignatureBuilder.captureFor("signer1@example.com")
.onPage(0)
.atPosition(100, 200)
.enableEnforceCaptureSignature()
.build();
Note the following:
By default, enforceCaptureSignature" is set to false at both the transaction and signature levels. This means you do not need to do anything if you do not want to use this feature.
Unlike the enforceCaptureSignature true setting in transaction level, which requires the signer to capture signature every capture approval, at the signature level enforceCaptureSignature only forces the signer to capture their signature when the approval contains the "true" setting.
Results
In this example, we have three approvals where only the second signature was marked as "enforce capture". This is what you will see after the transaction was signed:
For the second signature, because we enabled the enforceCaptureSignature setting, you’ll see that the signature differs from the first one and it overwrites the cached signature data at the same time. Therefore, the newly captured signature automatically replicates when the signer signs the third field.
.NET SDK
To download the full code sample see our Code Share site.
In OneSpan Sign, signers will only be asked to draw their signature once by default. If the transaction requires multiple signatures on the document, OneSpan Sign will automatically replicate the first drawn signature for any subsequent signatures. However, you have the option to require your signer to draw their signature on any given capture signature. This topic will focus on enforcing signature capture at the signature level.
If you are looking to enforce this at the transaction level, which would take care of forcing all capture signatures be redrawn, refer to the Signer Experience Settings.
Enforcing Capture Signature
To enable this feature, simply add the .enableEnforceCaptureSignature() option to your signature builder, as seen below:
Signature enforceCaptureSignature = SignatureBuilder.CaptureFor("signer1@example.com")
.WithId(new SignatureId("Signature1"))
.OnPage(0)
.AtPosition(100, 200)
.EnableEnforceCaptureSignature()
.Build();
Note the following:
By default, enforceCaptureSignature" is set to false at both the transaction and signature levels. This means you do not need to do anything if you do not want to use this feature.
Unlike the enforceCaptureSignature true setting in transaction level, which requires the signer to capture signature every capture approval, at the signature level enforceCaptureSignature only forces the signer to capture their signature when the approval contains the "true" setting.
Results
In this example, we have three approvals where only the second signature was marked as "enforce capture". This is what you will see after the transaction was signed:
For the second signature, because we enabled the enforceCaptureSignature setting, you’ll see that the signature differs from the first one and it overwrites the cached signature data at the same time. Therefore, the newly captured signature automatically replicates when the signer signs the third field.
REST API
To download the full code sample see our Code Share site.
In OneSpan Sign, signers will only be asked to draw their signature once by default. If the transaction requires multiple signatures on the document, OneSpan Sign will automatically replicate the first drawn signature for any subsequent signatures. However, you have the option to require your signer to draw their signature on any given capture signature. This topic will focus on enforcing signature capture at the signature level.
If you are looking to enforce this at the transaction level, which would take care of forcing all capture signatures be redrawn, refer to the Signer Experience Settings.
Enforcing Capture Signature
The sample request below show you how to set enforceCaptureSignature : true at the approval level.
HTTP Request
POST /api/packages
HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key
Request Payload
------WebKitFormBoundary1bNO60n7FqP5WO4t
Content-Disposition: form-data; name="file"; filename="enforce capture signature.pdf"
Content-Type: application/pdf
%PDF-1.5
%µµµµ
1 0 obj
<<...>>
endobj....
------WebKitFormBoundary1bNO60n7FqP5WO4t
Content-Disposition: form-data; name="payload"
{
"documents": [
{
"approvals": [
{
"fields": [
{
"height": 50,
"id": "Signature1",
"left": 100,
"page": 0,
"subtype": "CAPTURE",
"top": 100,
"type": "SIGNATURE",
"width": 200
}
],
"id": "Signature1",
"role": "signer1"
},
{
"fields": [
{
"height": 50,
"id": "Signature2",
"left": 100,
"page": 0,
"subtype": "CAPTURE",
"top": 200,
"type": "SIGNATURE",
"width": 200
}
],
"id": "Signature2",
"role": "signer1",
"enforceCaptureSignature": true
},
{
"fields": [
{
"height": 50,
"id": "Signature3",
"left": 100,
"page": 0,
"subtype": "CAPTURE",
"top": 300,
"type": "SIGNATURE",
"width": 200
}
],
"id": "Signature3",
"role": "signer1"
}
],
"name": "Document1",
"id": "Document1"
}
],
"name": "test Enforce Capture at Signature Level",
"roles": [
{
"id": "signer1",
"signers": [
{
"email": "signer1@example.com",
"firstName": "John",
"id": "signer1",
"lastName": "Smith"
}
]
}
],
"type": "PACKAGE",
"status": "SENT"
}
------WebKitFormBoundary1bNO60n7FqP5WO4t--
For a complete description of each field, see the Request Payload table below.
Response Payload
{
"id": "Q6v0Tn_v62G5tfRY43VBE-TEbU4="
}
Note the following:
By default, enforceCaptureSignature" is set to false at both the transaction and signature levels. This means you do not need to do anything if you do not want to use this feature.
Unlike the enforceCaptureSignature true setting in transaction level, which requires the signer to capture signature every capture approval, at the signature level enforceCaptureSignature only forces the signer to capture their signature when the approval contains the "true" setting.
Results
In this example, we have three approvals where only the second signature was marked as "enforce capture". This is what you will see after the transaction was signed:
For the second signature, because we enabled the enforceCaptureSignature setting, you’ll see that the signature differs from the first one and it overwrites the cached signature data at the same time. Therefore, the newly captured signature automatically replicates when the signer signs the third field.
Request Payload Table
Property | Type | Editable | Required | Default | Sample Values |
---|---|---|---|---|---|
Property | Type | Editable | Required | Default | Sample Values |
status | string | Yes | No | DRAFT | DRAFT / SENT / COMPLETED / ARCHIVED / DECLINED / OPTED_OUT / EXPIRED |
type | string | Yes | No | PACKAGE | PACKAGE / TEMPLATE / LAYOUT |
name | string | Yes | Yes | n/a | Enforce Capture Signature Example |
documents | |||||
name | string | Yes | No | n/a | sample doc |
approvals | |||||
fields | |||||
subtype | string | Yes | No | n/a | FULLNAME / INITIALS / CAPTURE / MOBILE_CAPTURE / LABEL / TEXTFIELD / TEXTAREA / CHECKBOX / DATE / RADIO / LIST |
type | string | Yes | No | n/a | SIGNATURE / INPUT |
extract | boolean | Yes | No | false | true / false |
height | integer | Yes | No | 50 | 50 / 100 / 150 ... |
left | integer | Yes | No | 0 | 50 / 100 / 150 ... |
page | integer | Yes | No | 0 | 0 / 1 / 2 ... |
top | integer | Yes | No | 0 | 50 / 100 / 150 ... |
width | integer | Yes | No | 200 | 50 / 100 / 150 ... |
role | string | Yes | No | n/a | Client1 |
enforceCaptureSignature | boolean | Yes | No | false | true / false |
roles | |||||
id | string | Yes | No | n/a | Client1 |
name | string | Yes | No | n/a | Client1 |
type | string | Yes | No | SIGNER | SIGNER / SENDER |
signers | |||||
string | Yes | Yes | n/a | preparer.email@example.com | |
firstName | string | Yes | Yes | n/a | John |
lastName | string | Yes | Yes | n/a | Smith |
phone | string | Yes | No | n/a | 514-555-8888 |
id | string | Yes | No | n/a | Client1 |
company | string | Yes | No | n/a | Acme Inc. |
title | string | Yes | No | n/a | Managing Director |