# Creation of Custom Electronic Signature Boxes

> This article describes the customization of electronic signature boxes. It contains further explanations including the creation of templates and shows all code snippets required. The step-by-step guide brings all parts together – from template design to the creation and implementation of the class for custom settings.

- **Author:** Malin Teegen
- **Published:** 2021-06-15
- **Modified:** 2026-07-17
- **Description:** This article describes the customization of electronic signature boxes. It contains further explanations including the creation of templates and shows all code snippets required. The step-by-step guide brings all parts together – from template design to the creation and implementation of the class for custom settings.
- **2 min read** (348 words)
- **Tags:**
  - Angular
  - ASP.NET
  - Document Processing
  - DocumentViewer
  - DS Server
  - Electronic Signature
  - Forms
  - MVC
  - PDF
- **Web URL:** https://www.textcontrol.com/blog/2021/06/15/creation-of-custom-electronic-signature-boxes/
- **LLMs URL:** https://www.textcontrol.com/blog/2021/06/15/creation-of-custom-electronic-signature-boxes/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2021/06/15/creation-of-custom-electronic-signature-boxes/llms-full.txt
- **GitHub Repository:** https://github.com/TextControl/TextControl.Web.MVC.DocumentViewer.CustomSignatureBox

---

### Template Creation

Consider a contract that should be signed electronically where you would like to pass additional data along with the signature.

![Custom signature box](https://s1-www.textcontrol.com/assets/dist/blog/2021/06/15/a/assets/capture.webp "Custom signature box")

This is just an example. You can store much more depending on your personal or business requirements. The signature box must be a TextFrame object with a name. Along with the image placeholder for the electronic signature, you can add static content, merge fields or barcodes. The elements will be merged with the associated data.

### Custom Data Definition

A class called SignatureData.cs is defined in the Models section of your project. The class contains getter and setter for the custom data. A typical class could look like this:

```
public class SignatureData
{
    public string Barcode { get; set; }
    public string Signer { get; set; }
    public string IPAddress { get; set; }
}
```

### Connecting the Dots

After you created the template and class to pass your data, you can set the values in the controller. In order to do so, create a new instance of SignatureData class in the controller. They will be used to merge the custom signature box content. The code could look like this:

```
SignatureData data = new SignatureData()
{
    Barcode = "https://www.textcontrol.com/",
    IPAddress = "102.72.278.0",
    Signer = "Tim Typer"
};
```

Lastly, create a CustomSignatureData object in the HTML helper of the view. Make sure to import the model in the view. Then, simply pass the properties of the model to the SignatureSettings:

```
@Html.TXTextControl().DocumentViewer(settings =>
{
    settings.DocumentPath = Server.MapPath("~/App_Data/contract.tx");
    settings.Dock = DocumentViewerSettings.DockStyle.Window;
    settings.IsSelectionActivated = true;
    settings.ShowThumbnailPane = true;
    settings.SignatureSettings = new SignatureSettings()
    {
        OwnerName = "Paul Paulsen",
        SignerName = Model.Signer,
        ShowSignatureBar = true,
        UniqueId = Guid.NewGuid().ToString(),
        CustomSignatureData = new ElectronicSignatureDocumentViewer.Models.SignatureData()
        {
            Barcode = Model.Barcode,
            Signer = Model.Signer,
            IPAddress = Model.IPAddress
        }
    };
}).Render()
```

The following screenshot shows the resulting PDF document with the custom signature box.

![Custom signature box](https://s1-www.textcontrol.com/assets/dist/blog/2021/06/15/a/assets/results.webp "Custom signature box")

### Download Sample

You can test this on your own by downloading the sample from our GitHub repository.

---

## About Malin Teegen

Malin Teegen is Head of Strategic Accounts and Marketing at Text Control in Bremen, Germany. She specializes in business development and the strategic expansion of customer relationships in the field of digital document processing. With a master's degree in marine biology from the University of Bremen and a certification in online marketing from Hamburg Media School, she combines analytical thinking with entrepreneurial vision. Her diverse experience in sales, online marketing, and digital journalism highlights her commitment to digital transformation and sustainable growth.

- [LinkedIn](https://www.linkedin.com/in/malin-teegen-32ba91255/)

---

## Related Posts

- [Don't Print Your Documents! Streamlined Document Processes in Your Applications](https://www.textcontrol.com/blog/2021/06/09/dont-print-your-documents/llms.txt)
- [Document Viewer: Uploading Signatures](https://www.textcontrol.com/blog/2022/02/24/document-viewer-uploading-signatures/llms.txt)
- [Electronic Signatures: Document Audit Trails](https://www.textcontrol.com/blog/2021/10/14/electronic-signatures-document-audit-trails/llms.txt)
- [Combine Form Fields, Merge Fields and Signature Boxes to Request Signatures](https://www.textcontrol.com/blog/2021/10/12/combine-form-fields-merge-fields-and-signature-boxes-to-request-signatures/llms.txt)
- [eSign Demo: Requesting Signatures from Multiple Signers](https://www.textcontrol.com/blog/2021/10/07/esign-demo-requesting-signatures-from-multiple-signers/llms.txt)
- [DocumentViewer: Deploying Forms](https://www.textcontrol.com/blog/2021/07/02/document-viewer-deploying-forms/llms.txt)
- [Smart Documents: Embedding Documents in PDF Containers](https://www.textcontrol.com/blog/2021/06/24/smart-document-containers-embedding-documents-in-pdf/llms.txt)
- [DocumentViewer Annotations: Highlight Text](https://www.textcontrol.com/blog/2021/06/18/document-viewer-annotations-highlight-text/llms.txt)
- [DocumentViewer Preview: Completing Form Fields](https://www.textcontrol.com/blog/2021/04/15/document-viewer-preview-completing-form-fields/llms.txt)
- [Electronic Signature Reference Implementation Demo](https://www.textcontrol.com/blog/2021/04/01/electronic-signature-reference-implementation-demo/llms.txt)
- [Customizing the Electronic Signature Box](https://www.textcontrol.com/blog/2021/03/03/customizing-the-electronic-signature-box/llms.txt)
- [Creating Adobe PDF Forms in C#](https://www.textcontrol.com/blog/2021/02/10/creating-adobe-pdf-forms-in-csharp/llms.txt)
- [Programmatically Fill, Flatten, and Export DOCX Form Templates to PDF in C# .NET](https://www.textcontrol.com/blog/2026/04/10/programmatically-fill-flatten-and-export-docx-form-templates-to-pdf-in-csharp-dotnet/llms.txt)
- [Create Fillable PDFs from HTML Forms in C# ASP.NET Core Using a WYSIWYG Template](https://www.textcontrol.com/blog/2026/03/17/create-fillable-pdfs-from-html-forms-in-csharp-aspnet-core-using-a-wysiwyg-template/llms.txt)
- [Designing the Perfect PDF Form with TX Text Control in .NET C#](https://www.textcontrol.com/blog/2025/12/16/designing-the-perfect-pdf-form-with-tx-text-control-in-dotnet-csharp/llms.txt)
- [Extending DS Server with Custom Digital Signature APIs](https://www.textcontrol.com/blog/2025/10/09/extending-ds-server-with-custom-digital-signature-apis/llms.txt)
- [Streamline Data Collection with Embedded Forms in C# .NET](https://www.textcontrol.com/blog/2025/08/02/streamline-data-collection-with-embedded-forms-in-csharp-dotnet/llms.txt)
- [Convert MS Word DOCX to PDF with Form Fields in C# .NET: Preserve or Flatten Form Fields](https://www.textcontrol.com/blog/2025/02/26/convert-ms-word-docx-to-pdf-with-form-fields-in-csharp-dotnet/llms.txt)
- [Export and Import Adobe PDF XFDF XML Files in .NET C#](https://www.textcontrol.com/blog/2025/01/22/export-and-import-adobe-pdf-xfdf-xml-files-in-net-c-sharp/llms.txt)
- [Creating Advanced Tables in PDF and DOCX Documents with C#](https://www.textcontrol.com/blog/2024/09/30/creating-advanced-tables-in-pdf-and-docx-documents-with-csharp/llms.txt)
- [Sign Documents with a Self-Signed Digital ID From Adobe Acrobat Reader in .NET C#](https://www.textcontrol.com/blog/2024/08/12/sign-documents-with-a-self-signed-digital-id-from-adobe-acrobat-reader-in-net-c-sharp/llms.txt)
- [Customizing Electronic Signature Fonts for Typed Signatures in Angular and ASP.NET Core](https://www.textcontrol.com/blog/2024/03/11/customizing-electronic-signature-fonts-for-typed-signatures-in-angular-and-asp-net-core/llms.txt)
- [How to Load and View PDF Documents in ASP.NET Core C#](https://www.textcontrol.com/blog/2023/10/20/how-to-load-and-view-pdf-documents-in-aspnet-core-csharp/llms.txt)
- [How to Create and Deploy PDF Forms in ASP.NET Core C#](https://www.textcontrol.com/blog/2023/10/17/how-to-create-and-deploy-pdf-forms-in-aspnet-core-csharp/llms.txt)
- [Impressions from Web Developer Conference WDC 2023 in Hamburg, Germany](https://www.textcontrol.com/blog/2023/09/21/impressions-from-web-developer-conference-wdc-2023-in-hamburg-germany/llms.txt)
