Skip to main content

SigCaptX

Overview

The Wacom SigCaptX Library is an extension of the Wacom Signature Library. SigCaptX installs components which allow a signature enabled web application to be used in a range of browsers. Previously this was only possible using Internet Explorer with ActiveX technology. The product has been tested with Internet Explorer, MS Edge, Chrome and Firefox.

A prerequisite is the installation of the Wacom Signature Library. For simplicity we recommend installing the 32-bit/x86 version of the Signature Library with SigCaptX regardless of the Windows platform. A combined installer is provided to simplify the installation.

Installation

Run the installer to install the server components. Open the HTML sample PortCheck to verify the installation. Additional signature application samples can then be tested on the system using a suitable signature tablet.

Firefox/Chrome installations

The browsers must have been installed and run before installing SigCaptX. Additionally:

  Firefox 64-bit
- With .EXE (combined) installer: no action necessary
- With .MSI installer: must be run from command line with 'FF64=1'

Firefox Portable
- With .EXE (combined) installer:
- From command line (eg for silent install), add FFP="Firefox Portable Folder"
- From UI, click 'Options' then enter or browse to "Firefox Portable Folder"
- With .MSI installer: must be run from command line with FFP="Firefox Portable Folder"

Note that MSI log files are created in the folder %TEMP%

Introduction

Support for ActiveX is no longer available in Internet Explorer and is not generally available in alternative browsers such as Firefox and Chrome.

SigCaptX has been developed to resolve this issue by providing a cross-browser solution.

ActiveX method summary

The Signature SDK/Library is supplied as a set of ActiveX controls and these can accessed directly in versions of Internet Explorer which support ActiveX. Versions of Internet Explorer up to IE10 can be used in this way.

To view the method schematically: ActiveX

The general process is as follows:

  • The browser loads an HTML page containing JavaScript application code from the web server.
  • To perform signature library functions, the application calls directly into the Signature Library DLL (the ActiveX control installed in Windows).
  • The Signature Library DLL performs the necessary i/o with the signature tablet.
  • The Signature Library DLL renders the signature in its display on the HTML page.

To illustrate, an HTML page creates the ActiveX control:

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

JavaScript application code provides the necessary functionality. For example to capture a signature:

var sigCtl = document.getElementById("sigCtl1");          // get the signature control
var dc = new ActiveXObject("Florentis.DynamicCapture"); // create signature capture
var rc = dc.Capture(sigCtl, "who", "why"); // call signature sdk capture
if(rc == 0 )
print("Signature captured successfully"); // signature captured/displayed

The signature image is displayed automatically in the SigCtl object embedded in the HTML page:

ActiveX SigCaptX Obj

SigCaptX method summary

In a browser with no ActiveX support it is not possible to access the Signature Library directly. Instead calls are made indirectly via a localhost web server which is installed as an extension of the Signature Library. A JavaScript framework is provided to give access to the local web server. The JSONP communication technique is used as the interface to the local web server using HTTPS requests.

To view the solution schematically: ActiveX SigCaptX 2

The general process is as follows:

  • The web browser loads an HTML page containing JavaScript application code from the web server. The application code includes the framework required to access the localhost web server.
  • To perform signature library functions, the application code calls the localhost server through the framework. The framework functions each make a JSONP - HTTPS request to the localhost server and supply a dedicated callback function. The framework functions return immediately, leaving the server to run independently.
  • The server actions the framework function by calling the Signature Library DLL. For example, in the case of signature capture the DLL performs the necessary i/o with the signature tablet.
  • On completion the server uses the JSONP technique to start the callback function which was supplied in the request, passing the relevant return data.
  • The callback function retrieves the data and completes the operation.
  • For example, in the case of signature capture the HTML application calls the signature capture framework function. Its callback function calls the renderBitmap framework function to request the image of the signature. Its callback function displays the signature image in the html page.

To illustrate, an html page creates the signature image display area:

<div id="imageBox" class="boxed" style="height:35mm;width:60mm;border:1px solid #d3d3d3;">
</div>

JavaScript application code provides the necessary functionality. For example to capture a signature:

function Capture()
{
// call the Signature Library function with a callback function name
dynCapt.Capture(sigCtl, "who", "why", null, null, onDynCaptCapture);
return;

// the callback function runs when signature capture completes (OK or Cancel)
function onDynCaptCapture(dynCaptV, SigObjV, status)
{
if(wgssSignatureSDK.DynamicCaptureResult.DynCaptOK != status)
{
print("Capture returned: " + status);
}
switch( status )
{
case wgssSignatureSDK.DynamicCaptureResult.DynCaptOK:
sigObj = SigObjV;
print("Signature captured successfully");
var flags = wgssSignatureSDK.RBFlags.RenderOutputBase64 |
wgssSignatureSDK.RBFlags.RenderColor24BPP;
var imageBox = document.getElementById("imageBox");
sigObj.RenderBitmap("bmp", imageBox.clientWidth, imageBox.clientHeight, 0.7, 0x00000000, 0x00FFFFFF, flags, 0, 0, onRenderBitmap);
break;
case wgssSignatureSDK.DynamicCaptureResult.DynCaptCancel:
print("Signature capture cancelled");
break;
default:
print("Capture Error " + status);
break;
}
}

function onRenderBitmap(sigObjV, bmpObj, status)
{
if(wgssSignatureSDK.ResponseStatus.OK == status)
{
var imageBox = document.getElementById("imageBox");
if(null == imageBox.firstChild)
{
imageBox.appendChild(bmpObj.image);
}
else
{
imageBox.replaceChild(bmpObj.image, imageBox.firstChild);
}
}
else
{
print("Signature Render Bitmap error: " + status);
}
}
}

ActiveX SigCaptX Image

Installation

Install SigCaptX by running the installer after installing the Signature SDK components.

The SigCaptX installation includes the:

  • Web server
  • JavaScript SDK Framework

Web server

The web server contains four significant parts:

Web Service

wgssSigCaptX_Service.exe is installed as a Windows Service and provides an arbitration service.

At startup it reads a configuration value and attaches to the specified localhost port.

By default the service is attached to https://localhost:8000

The web service function is to arbitrate between different instances of the web server: each user logged in to Windows runs a unique instance of the server.

  • The service tells a new server instance which port to attach to.
  • The service tells a new browser application which port the server is attached to.

Web Server

wgssSigCaptX_Server.exe is the Server which performs the Signature SDK functionality. It is installed so that it starts automatically when a user logs in to Windows.

A new instance of the server is started when a user first logs in to Windows. On startup the server gets a port number from the web service and attaches to that port.

By default the first server is attached to https://localhost:8001

The next user’s server will attach to https://localhost:8002 and so on.

The server responds to HTTPS requests and carries out the requested function by calling the Signature SDK ActiveX DLLs. Each function in the SDK framework has a corresponding function in the server to perform the operation. The server retains the Signature SDK data and uses references to allow the browser application to read and write data values.

On completion of a function call the server completes the HTTPS request which allows the browser application to resume.

Root Certificate

During SigCaptX installation a unique self-signed root certificate is created and installed in the Windows Certificate Store. The certificate is used by the web server to provide the secure HTTPS access required for JSONP communication.

Following installation the certificate can be viewed in the Windows Certificate Manager as:

Unique Localhost Wacom Certificate Authority

Configuration

During installation registry values are created in:

	[HKEY_LOCAL_MACHINE\SOFTWARE\Wacom\SigCaptX]

or for a 32-bit server on 64-bit Windows:

	[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Wacom\SigCaptX]

The values are generally reserved for internal use but the following value is used to define the web service start port:

 	start_port  REG_DWORD   0x00001f40 (8000)

If a web service port other than 8000 should be used it can be defined here.

If required, the upper limit of web server port allocation can also be changed from the default value:

	end_port    REG_DWORD   0x0000ffff (65535)

JavaScript SDK Framework

Overview

The JavaScript SDK framework is provided in the file signaturesdk.js.

A web application includes the framework script in the normal way:

    <script src="wgssSigCaptX.js"></script>

The framework provides:

  • Wacom Signature SDK functions
  • JSONP communication functions

The framework replicates the API of the Wacom Signature Library. API-equivalent Signature Library objects are created in the framework and control is passed to the web server through the use of JSONP communication. The same object methods and properties are available through the framework while the data is held in the web server. That is, the framework provides indirect access to the Signature Library.

The concept of JSONP communication can be illustrated with a simple example:

In a web page containing:

<script type="text/javascript">
function my_callback(data)
{
window.alert("my_callback data: " + data.number);
}
</script>
<script src="scriptfile.js"></script>

The contents of scriptfile.js:

my_callback({"number": 10})

When the web page is opened in a browser the static file scriptfile.js is loaded and executed, resulting in a popup message displaying “my_callback data: 10”.

The SDK framework uses an extensive elaboration of this technique by requesting script from the local web server. The web server creates the script dynamically and is able to insert the return data and the callback function name supplied in the request.

API

The SDK framework is accessed through its main class WacomGSS_SignatureSDK.

An application can create objects equivalent to those using the Signature SDK directly:

WacomGSS_SignatureSDK
SigCtl
DynamicCapture
SigObj
Hash
Key
WizCtl
InputObj

Refer to the Wacom Signature Components API for details of the object methods and properties.

Note that SigCtl is maintained for API compatibility. The SigCtl properties relate to its appearance as an ActiveX control and are not applicable to the framework implementation.


SDK Samples

SigCaptX's samples can be accessed on our GitHub here.

PortCheck

Use the PortCheck test page to verify the SigCaptX installation:

The samples can usually be copied to disk and opened in a browser, for example:

                file:///C:/SigCaptX-SDK-Samples/PortCheck.htm             

Depending on security settings this can raise a warning, for example: Security Settings

Allow the blocked content to continue.

If no messages appear in the test page the browser may not be prompting to allow scripts to run. This can be the case when the Windows 10 Edge browser opens a local file.

Security warnings can be avoided by hosting the samples on a secure site, as would be the case in a production system. If required, the test page PortCheck.htm is available on the Wacom GSDT site:

                https://gsdt.wacom.eu/support/SigCaptXDemo/PortCheck.htm

Use the PortCheck test page to verify the SigCaptX installation: Security Settings

Web Service: If the service is not running or is not accessible the following message appears:

  • Detecting SigCaptX
  • SigCaptX service not detected

Web Server: If the web service is running but the server has not been started the following message appears:

  • Detecting SigCaptX
  • SigCaptX service detected, but not the server

Root certificate:

If the certificate has not been successfully installed the browser will display a warning similar to: Root Certificate

Signature Capture

The SigCaptX SDK samples reproduce the functionality of HTML ActiveX samples supplied with the Signature SDK.

TestSDKCapture.html demonstrates basic signature capture:

Press Start to sign on the signature tablet and display the signature:

Browser

Double-click the signature to display information stored in the signature (Name/Date/Reason)