Products Technologies Demo Docs Blog Support Company

New DocumentViewer Signature Tutorial Sample

We just published a new tutorial sample in our demo hub that shows how to prepare documents with signature boxes to request signatures using the DocumentViewer.

New DocumentViewer Signature Tutorial Sample

The online demos show features and cover most typical usage scenarios of TX Text Control components. The section Tutorials contains interactive tutorials that demonstrate how to combine modules and components and how to include TX Text Control into typical workflows.

Signature Boxes

We just published a new tutorial that shows how to insert signature boxes by inserting TextFrames into a document in the document editor. These boxes can be inserted using the ribbon bar by inserting TextFrames or programmatically using JavaScript:

function InsertTextFrame(name) {
    TXTextControl.textFrames.addAnchored(
        { width: 3000, height: 2000 },
        TXTextControl.HorizontalAlignment.Center,
        0, // TextPosition
        TXTextControl.TextFrameInsertionMode.AboveTheText,

        (addedTextFrame) => {
            addedTextFrame.selection.setText("Signature Box");
            addedTextFrame.setBackColor("LightGrey");
            addedTextFrame.setName("txsign");
        }
    );
}

Signing documents with TX Text Control

In the next step, the document is saved and loaded into the DocumentViewer by passing a SignatureSettings object to the loadDocument method:

function LoadViewer() {

  var bDocument;

  var signatureSettings = {
      signerName: "Tim Typer",
      signerInitials: "TT",
      uniqueId: "12345-ABCDE",
      redirectUrlAfterSignature: "CreatingSignatures?signed=true",
      ownerName: "Document Requestor",
      signatureBoxName: "txsign",
      showSignatureBar: true
  }

  // save document
  TXTextControl.saveDocument(TXTextControl.StreamType.InternalUnicodeFormat, function (e) {
      bDocument = e.data;

      TXDocumentViewer.loadDocument(
          bDocument,
          "pleasesignme.tx",
          signatureSettings);
  });
}

After the document is loaded, the signature boxes are rendered and the signature bar is shown automatically:

Signing documents with TX Text Control

You can test this live sample tutorial directly in our demo hub:

Launch Demo

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

ASP.NET

Integrate document processing into your applications to create documents such as PDFs and MS Word documents, including client-side document editing, viewing, and electronic signatures.

ASP.NET Core
Angular
Blazor
JavaScript
React
  • Angular
  • Blazor
  • React
  • JavaScript
  • ASP.NET MVC, ASP.NET Core, and WebForms

Learn more Trial token Download trial

Related Post

AngularASP.NETDocument Signing

DocumentViewer Feature: Uploading Signature Images

A very popular feature of the DocumentViewer is the possibility to request signatures from multiple users for a document. A new feature allows users to upload and adjust prepared signature images.