When preparing the document viewer to acquire signatures from users, the SignatureSettings TX Text Control .NET Server for ASP.NET
Web.MVC.DocumentViewer Namespace
DocumentViewerSettings Class
SignatureSettings Property
Specifies Web.MVC.DocumentViewer.SignatureSettings for document signing processes.
property must be set with an instance of a SignatureSettings TX Text Control .NET Server for ASP.NET
Web.MVC.DocumentViewer Namespace
SignatureSettings Class
The SignatureSettings class describes the settings that are required for a document signing process using the DocumentViewer.
object.

SignatureSettings Object

The following table lists the used SignatureSettings in the above MVC Html helper code.

Setting Value description
ShowSignatureBar Specifies whether to show the blue signature bar on opening the document.
OwnerName The name of the signature requester that is displayed in the signature bar.
SignerName The name of the signer that is displayed in the "Setup your Signature" dialog.
SignerInitials The initials of the signer that is displayed in the "Setup your Signature" dialog.
UniqueId A unique ID that is included in the graphical representation of the electronic signature.
RedirectUrlAfterSignature An Url that provides an endpoint to accept the signed document and signature data.
SignatureBoxes An array of SignatureBoxes to define which signature fields should be used based on the given name. Additionally, the style of the signature box can be provided.

Consider the following HTML Helper code that is adding a document viewer instance to an MVC Razor page:

@Html.TXTextControl().DocumentViewer(settings => {
settings.DocumentPath = Server.MapPath("~/App_Data/signature.tx");
settings.Dock = DocumentViewerSettings.DockStyle.Fill;
settings.IsSelectionActivated = false;
settings.ShowThumbnailPane = true;
settings.SignatureSettings = new SignatureSettings() {
ShowSignatureBar = true,
OwnerName = "Paul Paulsen",
SignerName = "Tim Typer",
SignerInitials = "TT",
SignatureBoxes = new SignatureBox[] {
new SignatureBox("txsign") {
SigningRequired = true, Style = SignatureBox.SignatureBoxStyle.Signature },
new SignatureBox("txsign_init") {
SigningRequired = true, Style = SignatureBox.SignatureBoxStyle.Initials }}
};
}).Render()
view raw test.cshtml hosted with ❤ by GitHub

Signer Information

The following screenshot shows the specified values in the document viewer:

SignatureSettings

Additionally, in the above code, the SignatureBoxes TX Text Control .NET Server for ASP.NET
Web.MVC.DocumentViewer Namespace
SignatureSettings Class
SignatureBoxes Property
Specifies a collection of signature boxes.
property is defined with an array of SignatureBox TX Text Control .NET Server for ASP.NET
Web.MVC.DocumentViewer Namespace
SignatureBox Class
The SignatureBox class represents the shown signature box in the UI.
objects.

Property Description
ID Specifies the identifier of the signature box.
Name Specifies the name of the signature box.
SigningRequired Specifies whether the signing is required.
Style Specifies how the box is styled.

Activate Signature Fields

When taking a look again at the code, two signature boxes are activated: txsign and txsign_init. txsign is defined as a signature box to acquire a signature and txsign_init is initialized as an initials box. Both fields are defined as a required field during the signature process.

SignatureBoxes = new SignatureBox[] {
new SignatureBox("txsign") {
SigningRequired = true, Style = SignatureBox.SignatureBoxStyle.Signature },
new SignatureBox("txsign_init") {
SigningRequired = true, Style = SignatureBox.SignatureBoxStyle.Initials }}
view raw test.cshtml hosted with ❤ by GitHub

Now consider the following template with 4 signature fields. The first two fields have the names that match the signature boxes in the above code. The other two fields have different names.

SignatureSettings

When initializing the document viewer, the first two defined signature fields are activated to request signatures.

SignatureSettings

Why is that useful? Consider a document that should be signed by 2 or more different parties. If the document is deployed to signer A, only those signature boxes are activated to acquire the visual signature representation.