Signers & positioning
Since version 2.1.1, documents can declare their signers and the position of each signature. Signers are declared when the document is uploaded to MobbSign Server; the Web SDK assigns each signature to a signer.
Declare the signers
Fill in the signers array when you upload the document with POST /documents:
| Field | Required | Description |
|---|---|---|
name | Yes | Name of the signer. It is written in the reason of their signature. |
rol | No | Role of the signer, for example Client or Employee. |
signaturePosition | No | Where their signature is placed. See Signature positioning. |
- Request
- Response
{
"signers": [
{
"name": "Jane Doe",
"rol": "Client",
"signaturePosition": {"x": 20, "y": 100, "width": 50, "height": 50, "numPage": 1}
},
{"name": "John Smith", "rol": "Employee"},
{"name": "Signer 3"}
]
}
{
"signers": [
{"id": "4438", "name": "Jane Doe", "rol": "Client", "signaturePosition": {"x": 20, "y": 100, "width": 50, "height": 50, "numPage": 1}, "status": "PENDING"},
{"id": "4439", "name": "John Smith", "rol": "Employee", "status": "PENDING"},
{"id": "4440", "name": "Signer 3", "rol": null, "status": "PENDING"}
]
}
The response returns the identifier (id) and the status of each signer. If a document has no signers, it can be signed without restrictions.
Signature positioning
signaturePosition places the signature of a signer in the document. Coordinates are expressed in PDF points (1/72 of an inch); an A4 page measures 595 × 842 points.
| Field | Description |
|---|---|
x, y | Horizontal and vertical position of the signature. |
width, height | Maximum width and height of the signature. A larger signature is scaled down, keeping its proportions. |
numPage | Page of the signature, starting at 1. |
The signing act
A signing act is a session in which a MobbSign instance presents a document and captures one or more signatures. You can let the SDK assign the signatures to the signers of the document in order, or name the signers of the act.
Without signers in the act
If the signers option is empty, each signature is assigned to the next pending signer of the document, in order:
- With
onlyFinishWhenEveryoneSignset to1or2, Finish appears when all the signers of the document have signed, in one act or in several. With0, it appears after the first signature. - With
allowSignAfterDocumentIsSignedset totrue(default), more signatures are allowed once all the signers have signed; withfalse, only the signatures of the declared signers.
With signers in the act
Pass the identifiers of the signers who sign in this act. Each signature is assigned to the next signer of the array, in the order of the array:
new MobbSign({
...options,
signers: [4440, 4439],
}).then((mobbsign) => mobbsign.load(documentId));
- Finish appears after the first signature with
onlyFinishWhenEveryoneSign: 0, when the signers of the act have signed with1, and when all the signers of the document have signed with2. allowSignAfterDocumentIsSignedis alwaysfalse: only the signers of the act can sign. For additional free signatures, create another instance withoutsigners.