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.


info

Release 4.10 of the Signature SDK features configuration options for STU devices, licensing and the CaptureWindow.

4.10's updates can be configured via a CONFIG file. This CONFIG file defines the settings for the signature capture window and is encoded in JSON format.

Creating the config file

In order for users to be able to use these configuration options, a CONFIG file must be created within the File Explorer with the following paths:

  • %ProgramData%\Wacom\SignatureCapture\.config will set settings for all users.
  • Meanwhile, %AppData%\Wacom\SignatureCapture\.config and %LocalAppData%\Wacom\SignatureCapture\.config will configure the settings of an individual user. The settings set for individual users override those set for all users.

An example CONFIG file can be viewed below:

"License": "<JWT license string>",
"STU": {
"USB": {
"exclusiveLock": true,
"openRetries": 3,
"openRetrySleepMS": 500
}
},
"CaptureWindow": {
"Language": "en",
"Caption": "Wacom Signature Capture v4.9",
"BackgroundColor": "#7FE3FF",
"Size": {
"Width": "160mm",
"Height": "120mm"
},
"OutsideFont": {
"Facename": "Verdana",
"Weight": "normal",
"Style": "normal",
"Size": 12,
"Color": "#000000"
},
"InsideFont": {
"Facename": "Georgia",
"Weight": "normal",
"Style": "italic",
"Size": 12,
"Color": "#880000"
},
"Buttons": {
"Font": {
"Facename": "Consolas",
"Weight": "bold",
"Size": 12,
"Style": "normal",
"Color": "#CC0000"
},
"Order": [
"OK",
"Clear",
"Cancel"
],
"Labels": {
"OK": "Accept",
"Clear": "Restart",
"Cancel": "Quit"
}
},
"ElementPlacement": {
"Why": "outside",
"Who": "inside",
"When": "inside",
"Buttons": "inside"
},
"DateTimeFormat": "HH:mm dd MMMM yy",
"SignatureArea": {
"GuideType": "line",
"Color": "#F0F0F0",
"Width": "108mm",
"Height": "55mm",
"Ink": {
"Color": "#0000CC",
"Width": "3px"
}
}
}

General notes:

  • All fields Weight and Style are case-sensitive. Valid options for Weight are: "light", "normal" & "bold", while options for Style are: "normal" & "italic".
  • The field Facename is also case-sensitive and should match a font that is already installed on the system.
  • Valid dimensions for Width and Height are mm (millimetres), px (pixels) and in (inches).
  • Both Color and BackgroundColor should be given a hexadecimal RGB value.

License settings

Licenses are structured in JWT (JSON Web Token) format.

For more information on licensing, click here.

STU settings

"STU": {
"USB": {
"exclusiveLock": true,
"openRetries": 3,
"openRetrySleepMS": 500
},
"Serial": {
"Devices": [
{
"DisplayName": "Serial STU 540",
"Port": "COM1",
"baudRate": 128000
},
]
}
},

Settings for the STU variety of signature capture devices can be configured further here. It is split into two categories

  • USB settings
  • Serial settings

USB settings

  • exclusiveLock: boolean that when true, sets exclusive access to the USB device, meaning no other processes can use it simultaneously.
  • openRetries: This defines the number of times that the system will attempt to reopen the USB connection, in the event of failure.
  • openRetrySleepMS: Amount of time in milliseconds that a system waits, in the event of a connection attempt failing.

Serial settings

  • Devices: An array of serial devices. Each device will have the following values:
    • DisplayName: The name of the connected device (e.g., "Serial STU 540").
    • Port: Value of the assigned serial port.
    • baudRate: The communication speed. By default, values are set in bits per second.

CaptureWindow settings

BackgroundColor

BackgroundColor
The background color of the capture window.
Should be set to hex RGB value with '#', eg "#0000CC"
Example value
#C0C0C0

Language

Language
The language of the capture window.
Should be set to a language tag, e.g. "en"
Example value
en

Caption

Caption
The caption or title of the capture window.
Example value
Wacom Signature Capture

Size

Width & Height are both required values, with mm, in and px accepted as valid units of measurement.

If Width and Height are not given a value, the size of the capture window reverts to its default dimensions.

NB: The values set in this category take precedence over the Width and Height values within SignatureArea. For more information click here.

Size
Defines the size of the capture window.

Properties
WidthThe capture window's width.
HeightThe capture window's height.
Example values
Width800px
Height75mm

OutsideFont

Valid options for Weight are: "light", "normal" & "bold", while options for Style are: "normal" & "italic". Size is set via an int value, while Color is set via an RGB hex value like in BackgroundColor.

OutsideFont
Defines the font settings for outside text.

Properties
FacenameThe font's name.
WeightHow emboldened the font is.
StyleThe font's style.
SizeThe font size.
ColorThe font's color.

Example values
FacenameVerdana
Weightnormal
Stylenormal
Size12
Color#0000CC

InsideFont

As with OutsideFont, InsideFont's valid options for Weight are: "light", "normal" & "bold", options for Style are: "normal" & "italic". Size is set via an int value, while Color is set via an RGB hex value like in BackgroundColor.

InsideFont
Defines the font settings for inside text.

Properties
FacenameThe font's name.
WeightHow emboldened the font is.
StyleThe font's style.
SizeThe font size.
ColorThe font's color.

Example values
FacenameVerdana
Weightlight
Styleitalic
Size10
Color#000000

Buttons

Buttons
Defines the settings for buttons.

Properties
OrderSet in which order the buttons appear on the screen.
NB: If used, each of the 3 strings - "OK", "Clear" & "Cancel" - must be used.
LabelsSet a label for one of the buttons.
FontDefines the font settings for the button.
FacenameThe font's name.
WeightHow emboldened the font is.
SizeThe font size.
ColorThe font's color.

Example values
Order["Cancel", "OK", "Clear"]
Labels{"OK": "Accept"}
Font
FacenameVerdana
Weightbold
Size10
Color#CC0000

ElementPlacement

Elements able to be placed include Why, Who, When & Buttons. Placement options for these elements include:

  • "inside"
  • "outside"
  • "" (unspecified, will use default location)

As mentioned above, when not specified, these elements are placed in their default locations. By default:

  • Who & When are set as inside.
  • Why & Buttons are set as inside for signature devices & outside for all other devices.
ElementPlacement
Defines the placement of "Why" and "When" elements (i.e. the reason for and date of signing).

Properties
WhyReason for signing.
WhenWhen the signature is being completed.
WhoThe identity of the signer.
ButtonsThe buttons to interact with the capture window.

Example values
Whyinside
When""
Who""
Buttons""

DateTimeFormat

DateTimeFormat uses the default Windows formatting for date/time (HH:mm dd MMMM yy).

DateTimeFormat
Format for displaying date and time (HH:mm dd MMMM yy).

Example values
13:51 30 July 24

SignatureArea

SignatureArea
Defines the settings for the signature area.

Properties
GuideTypeSets the type of guide for the signature.
Accepted values are line, box and none.
ColorSets the background color for the signature area.
The value should be set to an RGB hex value.
WidthSets the width of the signature area.
HeightSets the height of the signature area.
InkSets the values for the digital ink.
ColorSets the color of the ink stroke.
WidthSets the width of the ink stroke.

NB: If only Height or Width but not the other is specified, the aspect ratio of the tablet is used to calculate the other. For STU devices, if both are specified, Height is ignored as the aspect ratio is fixed. Additionally, these values are ignored if CaptureWindow.Size is set.


Example values
GuideTypeline
Color#FFFFFF
Width300px
Height200px
Ink
Color#0000CC
Width3px

Sample Code

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

Windows Samples:

Android Samples: