The Text Control DocumentViewer is designed to sign documents by multiple users. This article explains how to setup documents for multiple signers and gives an overview of the document deployment strategy.
Designing the Template
Using the DocumentEditor, you will need to add as many signature boxes to the document as required. In our sample, we create two different signature boxes for two different signers. A signature box is a Text
╰ TextFrame Object
The TextFrame object represents a rectangle that can be filled with text by an end-user and can be edited like the main text. element that can be positioned anywhere in the document. In the following sample template, the text frames are inserted inline with text into table cells:
These two text frames receive unique names:
Technically, you can use any name for those signature boxes as you provide the name of the box to be signed when initializing the DocumentViewer. It is helpful to create your own logic to have a consistent naming.
Deploying the Document
The document should be stored in the internal Text Control format to keep all elements for the signature process. At the very end, the final document gets digitally signed and sealed. The following illustration shows the sequential signature process:
First, the document is deployed to signer A to be signed. The DocumentViewer is initialized with the signature box name txsign_signerA:
The DocumentViewer will send the signed document in the internal TX Text Control format to your callback. In our demo code, this document will be sent to a controller method SaveSignedDocument. This controller method should take the results of the signing process in order to send the signed document to the second signer.
After the second signature, the completely signed document will be sent back to the server to create the final PDF document. The following code takes the fully signed document in the internal TX Text Control format and creates a PDF/A with a digital signature:
The final signed document contains both electronic signatures and is digitally signed and sealed: