Products Technologies Demo Docs Blog Support Company

Integrate E-Signing into ASP.NET C# Applications using APIs

The use of electronic signatures has grown in popularity in recent years and especially during the pandemic. It became the standard for signing contracts and other business-critical documents. This article describes why integrating e-signatures using an API is better than using end-user solutions.

Integrate E-Signing into ASP.NET C# Applications using APIs

The use of electronic signatures has grown in popularity in recent years and especially during the pandemic. It became the standard for signing contracts, agreements and other business-critical documents. When using consumer-facing services such as DocuSign or Adobe Sign, documents must first be exported from ERP systems before they can be added to a signature workflow. This can feel a bit complicated to end users.

Better yet, users should be able to send signature requests directly from the ERP system they use every day, without having to go through the extra step of exporting a document. With TX Text Control, the entire workflow is managed, including document generation via mail merge, document delivery and signature requests.

Download Whitepaper

We published a whitepaper that gives an overview of how to integrate on-premises electronic signature processes into web applications. Download the full whitepaper and learn how Text Control can be utilized to integrate the complete electronic signature workflow.

Electronic Signatures

Download Whitepaper

An API-based library such as TX Text Control offers the following advantages over out-of-the-box end-user solutions

  • Transparent and predictable costs
    TX Text Control is licensed per developer and production server, not per user or generated document.
  • Deep integration
    Electronic signature workflows can be deeply integrated into existing structures without changing processes.
  • Data protection
    Documents and data are not sent to third parties. All data remains on-premises.

Powerful C# API

A digital certificate is applied to the signed electronic signature representation using the SignatureFields property. This property specifies an array of DigitalSignature objects, each of which defines an X.509 certificate and is associated with a SignatureField in the document. These certificates can be used to digitally sign a PDF or a PDF/A file. The code snippet below adds a signature field to a new document and adds an SVG image as a visual representation of the signature. The generated digital signature is associated with the signature field and then provided by the SaveSettings to export the document as an Adobe PDF document.

public static void SignFields() {
  using (ServerTextControl tx = new ServerTextControl()) {

    tx.Create();

    // create a signature field
    SignatureField signatureField = new SignatureField(
      new System.Drawing.Size(2000, 2000), "txsign", 10);

    // set image representation
    signatureField.Image = new SignatureImage("signature.svg", 0);

    // insert the field
    tx.SignatureFields.Add(signatureField, -1);

    // create a digital signature (for each field, if required)
    DigitalSignature digitalSignature = new DigitalSignature(
      new System.Security.Cryptography.X509Certificates.X509Certificate2(
        "textcontrolself.pfx", "123"), null, "txsign");

    // apply the signatures to the SaveSettings
    SaveSettings saveSettings = new SaveSettings() {
      SignatureFields = new DigitalSignature[] { digitalSignature }
    };

    // export to PDF
    tx.Save("signed_fields.pdf", StreamType.AdobePDF, saveSettings);
  }
}

Learn More

Adding Digital Signatures to PDF Documents in C#

Document Preparation

The document signing process starts with an MS Word compatible document rather than a sealed PDF document. This gives developers the flexibility to integrate the entire digital document processing pipeline into their workflows. Typically, the signing process starts with a template that contains merge fields that can be programmatically merged before the document is deployed to capture signatures. Form fields can be pre-populated to prepare forms for users and improve the user experience.

When is it a good idea to create a PDF that is essentially "read-only"? It is possible to make changes to a created PDF document, such as replacing small pieces of text or removing entire pages. But if you think of a PDF as a printed sheet of paper, you get an idea of how dynamic digital document processing should be.

A document should be editable for as long as possible. It is a dynamic structure that should be able to be updated at any time until the process is complete and a document is created for further processing or archiving.

Electronic Signatures with TX Text Control

Document Editing

Integrate a full-featured, browser-based document editor to create proposals, quotes or contracts and prepare them directly for signature collection. MS Word documents, such as Office Open XML (DOCX) or RTF, can be directly imported and used as templates before being used to request signatures.

Electronic Signatures with TX Text Control

Include Form Elements

Add form fields to your documents and let users fill them out directly in a browser or PDF. Form fields can be pre-populated and used with conditional statements to validate values or automate form fields based on user input.

Electronic Signatures with TX Text Control

All On-Premise

You control the document workflow and documents are stored within your controlled infrastructure. All required components and libraries are integrated directly into applications and no additional service or public web API is required to integrate document signing into applications.

Live Demo

We have released a live demo that shows all aspects of electronic signature workflows within your own applications.

Electronic Signatures with TX Text Control

https://esign.textcontrol.com

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

AngularASP.NETReact

Integrating Document Lifecycle Management with ASP.NET Core and C#

In this article, we will explore how to integrate document lifecycle management with ASP.NET Core and C#. We will illustrate why document lifecycle management is important and how it can be…


AngularASP.NETDocumentEditor

Announcing New Signature Features: Initials and SVG

We are working on new DocumentViewer features for electronic signatures. The next version supports initials and SVG signatures for better export quality.


AngularASP.NETDocumentViewer

Electronic Signatures: Document Audit Trails

In order to implement a legally binding document signing process, a complete document audit trail must be recorded to verify every action taken on a document. This article shows how the eSign demo…


AngularASP.NETDocumentViewer

Combine Form Fields, Merge Fields and Signature Boxes to Request Signatures

The eSign Demo shows how to use TX Text Control to implement electronic signatures into your applications. This article shows how to combine form fields, merge fields and signature boxes to…


AngularASP.NETDocumentViewer

eSign Demo: Requesting Signatures from Multiple Signers

We just published an enhanced version of our electronic signature demo that supports the request of signatures from multiple signers. This article gives an overview of the new features.