Skip to main content

Usage

General Use

The Signature Library includes examples in a range of languages including:

  • HTML
  • Java
  • JavaScript
  • C++
  • C#
  • VB

A full description of the API can be found in the Signature-Components-API document.

The following examples demonstrate use of the API in Javascript:

Capture a signature:

sigCtl = new ActiveXObject("Florentis.SigCtl");
dynCapt = new ActiveXObject("Florentis.DynamicCapture");
rc = dynCapt.Capture(sigCtl,"Who","Why");

Following successful capture, save the text format of the Signature Object:

SignatureText = sigCtl.Signature.SigText; // save Base64 encoded signature

Create a PNG image of the signature:

rc = sigCtl.Signature.RenderBitmap(filename, 300, 150, "image/png", 0.5, 0xff0000, 0xffffff, 0.0,0.0, flags );

In a Windows Forms application it is not necessary to create an image file to display the signature. The ActiveX component provides automatic rendering of the signature and this is demonstrated in the HTML samples for Internet Explorer:

...
var sigCtl = document.getElementById("sigCtl1");
sigCtl.Signature.SigText=SignatureText;
...

<div>
<object id="sigCtl1" style="width:60mm;height:35mm"
type="application/x-florentis-signature">
</object>
</div>

ActiveX support has been removed from new versions of Internet Explorer and is generally not available in alternative browsers. For this reason SigCaptX is available as an extension of the Signature Library to give web browser applications full access to the Signature Library API.


Sample Code

Sample code for the Windows Ink SDK for signature is hosted on GitHub:

Windows Samples:

iOS Sample:

Android Samples: