This article shows how to use the Document Viewer to acquire an electronic signature and to digitally sign the signature fields by routing the request to a custom controller method.

Redirect URL

In version 31, a redirect URL can be provided using the RedirectUrlAfterSignature TX Text Control .NET Server for ASP.NET
Web.MVC.DocumentViewer Namespace
SignatureSettings Class
SignatureSettings.RedirectUrlAfterSignature Property
Specifies an Url that is used for a controller-side redirection after a successful signature acquisition process.
property that is used to forward the signature data from the integrated DocumentViewer server-side controller. The following code shows how to attach the custom controller method Home/SignDocument:

Loading...

The following screenshot shows the Document Viewer that is used to acquire the electronic signature (drawing) from the user:

Document signing

Custom Processing

After the user signed the document, the electronic signature is patched to the document and forwarded to the given URL including signature data such as the signature image and timestamp information. The following sequence diagram shows this workflow:

Document signing sequence diagram

The implemented HttpPost endpoint SignDocument is requested by the Document Viewer after the signing process. In this method, a digital certificate is applied to the signed electronic signature representation using the SignatureFields TX Text Control .NET Server for ASP.NET
TXTextControl Namespace
SaveSettings Class
SignatureFields Property
Specifies an array of DigitalSignature objects, each of which defines an X.509 certificate and is associated with a SignatureField in the document.
property. This property specifies an array of DigitalSignature TX Text Control .NET Server for ASP.NET
TXTextControl Namespace
DigitalSignature Class
An instance of the DigitalSignature class represents an X.509 certificate which can be used to digitally sign a PDF or PDF/A document.
objects, each of which defines an X.509 certificate and is associated with a SignatureField TX Text Control .NET Server for ASP.NET
TXTextControl Namespace
SignatureField Class
An instance of the SignatureField class represents a signature field in a Text Control document.
in the document. These certificates can be used to digitally sign a PDF or a PDF/A file.

Loading...

Return Signed PDF

In this sample project, the created PDF document is returned as a Base64 encoded string. Whatever is returned by this endpoint is automatically forwarded to the client-side method specified through the setSubmitCallback TX Text Control .NET Server for ASP.NET
JavaScript API
Signatures Object
SetSubmitCallback Method
Sets a callback function which will be invoked when the document is submitted.
method.

Loading...