Products Technologies Demo Docs Blog Support Company

Document Viewer for Angular: SignatureSettings Explained

Learn how to use the SignatureSettings in the Document Viewer for Angular. This article explains how to load a document using JavaScript and how to set up the viewer for digital signatures.

Document Viewer for Angular: SignatureSettings Explained

When using the Document Viewer to collect signatures from users, the SignatureSettings property must be set.

<tx-document-viewer
    width = "800px"
    height = "800px"
    basePath = "https://backend.textcontrol.com?access-token=yourtoken"
    documentData = "..." 
    [signatureSettings] = "{ 
      showSignatureBar: true, 
      ownerName: 'Paul',
      signerName: 'Jacob',
      defaultSignatureFont: 'Pacifico',
      signatureBoxes: [ {name: 'txsign', signingRequired: true, style: 1} ]
    }">
</tx-document-viewer>

SignatureSettings Object

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

Setting Value Type Value description
showSignatureBar boolean Specifies whether to show the blue signature bar on opening the document.
ownerName string The name of the signature requester that is displayed in the signature bar.
signerName string The name of the signer that is displayed in the "Setup your Signature" dialog.
signerInitials string The initials of the signer that is displayed in the "Setup your Signature" dialog.
uniqueId string A unique ID that is included in the graphical representation of the electronic signature.
redirectUrlAfterSignature string An Url that provides an endpoint to accept the signed document and signature data.
signatureBoxes SignatureBox[] 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.
defaultSignatureFont SignatureFontSettings A SignatureFontSettings object that defines the used font in the signature soft pad.

SignatureFontSettings Object

Property Value Type Description
family string Specifies the font family of the signature.

SignatureBox Object

Property Value Type Description
name string Specifies the name of the signature box.
signingRequired boolean Specifies whether the signing is required.
style SignatureBoxStyle Specifies how the box is styled.

SignatureBoxStyle Enumeration

Value
SignatureBoxStyle.Signature
SignatureBoxStyle.Initials

Activate Signature Fields

In this example, signature fields named txsign are enabled as signature fields and are required to submit the document.

{ 
  showSignatureBar: true, 
  ownerName: 'Paul',
  signerName: 'Jacob',
  defaultSignatureFont: 'Pacifico',
  signatureBoxes: [ { name: 'txsign', signingRequired: true, style: 0 } ]
}

Loading Documents using JavaScript

In Angular applications, the document is typically loaded via JavaScript, not statically via the component settings. When loading documents using JavaScript, the SignatureSettings object must be set in the loadDocument method.

var signatureSettings = {
  showSignatureBar: true,
  redirectUrlAfterSignature: 'https://yourbackend.com/document/sign',
  ownerName: 'Paul',
  signerName: 'Jacob',
  signerInitials: 'PK',
  signatureBoxes: [ { name: 'txsign', signingRequired: true, style: 0 } ]
};
  
TXDocumentViewer.loadDocument(this.documentData.document, this.documentData.name, signatureSettings);

When the document is loaded, the signature fields are displayed in the document. The user can click on the signature field to sign the document.

Signature Fields in Angular

Learn More

Learn how to add electronic and digital signatures to PDFs in ASP.NET Core C# and Angular. This tutorial shows how to create an Angular application with an ASP.NET Core backend that uses the Document Viewer to display and sign PDF documents.

How to Add Electronic and Digital Signatures to PDFs in ASP.NET Core C# and Angular

Conclusion

The SignatureSettings object is used to define the signature settings in the Document Viewer for Angular. The object defines the signature fields, the signer, and the signature style. The signature fields are displayed in the document and can be signed by the user. The signed document can be submitted to a server endpoint for further processing.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Angular

Integrate document processing, editing, sharing, collaboration, creation, electronic signatures, and PDF generation into your Angular Web applications.

Learn more about Angular

Related Posts

AngularJavaScriptDocument Viewer

Getting Started: Document Viewer Version 33.0 with Angular CLI 19.0

This article shows how to use the TX Text Control Document Viewer version 33.0 npm package for Angular within an Angular CLI 19.0 application. It uses the trial backend running on our servers, but…


AngularJavaScriptAngular v18

Getting Started: Document Viewer with Angular CLI v18.0

This article shows how to use the TX Text Control Document Viewer npm package for Angular within an Angular CLI v18.0 application. It uses the trial backend running on our servers, but can also be…


AngularASP.NET CoreDigital Signature

How to Add Electronic and Digital Signatures to PDFs in ASP.NET Core C# and…

Learn how to add electronic and digital signatures to PDFs in ASP.NET Core C# and Angular. This tutorial shows how to create an Angular application with an ASP.NET Core backend that uses the…


AngularASP.NETJavaScript

Building an ASP.NET Core Backend Application to Host the Document Editor and…

This article explains how to create an ASP.NET Core backend application to host the Document Editor and Document Viewer. This backend application is required to provide the required functionality…


AngularJavaScriptDocument Viewer

Getting Started: Document Viewer with Angular CLI

This article shows how to use the TX Text Control Document Viewer npm package for Angular within a Angular CLI application.