Document Viewer: SignatureSettings Explained
The SignatureSettings must be defined on initializing an instance of the document viewer. This object defines instructions of the signing process and how signature fields are handled.

When preparing the document viewer to acquire signatures from users, the Signature
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()
Signer Information
The following screenshot shows the specified values in the document viewer:
Additionally, in the above code, the Signature
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 }}
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.
When initializing the document viewer, the first two defined signature fields are activated to request signatures.
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.
Related Posts
ASP.NETASP.NET CoreDocument Viewer
High-Performance Text Replacement in Large DOCX Files using C# .NET
Learn how to efficiently replace text in large DOCX files using C# .NET and the ServerTextControl component from Text Control. This article demonstrates the performance benefits of using the…
ASP.NETASP.NET CoreDocument Viewer
Document Viewer 33.2.1 Released: New Event and Bug Fixes
This service pack includes important bug fixes and improvements to enhance the stability and performance of the Document Viewer. In addition, a new event has been introduced to provide developers…
Building an ASP.NET Core Backend (Linux and Windows) for the Document Editor…
This article shows how to create a backend for the Document Editor and Viewer using ASP.NET Core. The backend can be hosted on Windows and Linux and can be used in Blazor, Angular, JavaScript, and…
TX Text Control Document Editor and Viewer for Blazor Released
We are very happy to announce the immediate availability of TX Text Control packages for Blazor. This article gives an overview of the available packages and how to use them.
Getting Started: Document Viewer for Blazor in ASP.NET Core
This article shows how to integrate the Document Viewer for Blazor into an ASP.NET Core application running on Windows and Linux. The Document Viewer is a powerful and flexible component to…