Sig Capture Web SDKGuide
Sig Capture Web SDKGuide
Version 1.2
August 3, 2022
Table of Contents
2
SigCaptureWeb SDK Guide
1.0 – Introduction
The ePadLink SigCaptureWeb SDK offers a mechanism and platform for developers and
integrators to capture handwritten signatures securely for web applications running in the
Google Chrome, Mozilla Firefox, Opera, and Microsoft Edge (Chromium) browsers. The SDK
provides capabilities for capturing secured biometric handwritten signatures using electronic
signature pads from ePadLink.
The SDK exports the images of the captured signatures, as well as the raw biometric signature
data in different formats. The images can be used in any application requiring signature
images. The biometric signature data for the captured signature is obtained in encrypted form
and can be saved in any database for future use.
3
SigCaptureWeb SDK Guide
The diagram below shows the high level overview of the solution with critical components
involved.
Browser
(Chrome/Firefox/Opera/Edge (Chromium))
ePadLink
Pad
4
SigCaptureWeb SDK Guide
The ePadLink SigCaptureWeb SDK has been developed as a standard C#.Net application. It
has a built–in mechanism to capture signatures using ePadLink signature capture devices and
also to expose the raw biometric signature data in ENC or SIG format and the signature as an
image (JPG, PNG, etc.). It has all the input and output interfaces implemented as Standard
Input and Output streams as required by the Chrome and Firefox Browser Extension
frameworks. The SDK processes the input text messages from the browsers and executes the
requests asynchronously, and when a task is complete sends back the status or output data as
an output text message. It will host all the User Interface functions for capture and display of
signatures from devices.
Browsers run this SDK in a separate process, launch it through Google Connect APIs or Web
Extension APIs, and send a notification back to the Extension when the application is ended by
the user.
Chrome and Firefox Extensions are HTML, JavaScript, and CSS based code modules that are
launched during startup of the browser or launched on demand from web page JavaScript.
Both extensions use JavaScript based Chrome Native Messaging APIs to launch and
communicate with the ePadLink SigCaptureWeb SDK for signature capture and other relevant
features. The extension listens for the output messages from SigCaptureWeb and processes
them accordingly. Chrome Native Messaging has a Connect API to launch the applications
(which can process the standard input and output messages) and a Disconnect event to let the
web page know about termination of the native host application. Using Connect and
Disconnect, the life cycle of the native host application can be controlled. Also, Chrome Native
Messaging APIs have mechanisms to send input messages to the SigCaptureWeb SDK and
receive output messages from applications.
The Opera and Edge browsers also support installation and use of Chrome extensions.
ePadLink SigCaptureWeb SDK leverages this to capture signatures within Opera and Edge
browsers.
5
SigCaptureWeb SDK Guide
The samples have been tested in the latest version of Chrome, Firefox, Opera, and Edge
(Chromium) browsers. It is recommended that you install the latest version of the Google
Chrome, Mozilla Firefox, Opera, and Microsoft Edge (Chromium) browsers.
Note: NET Framework 3.5 should be available on the end users Windows computer.
6
SigCaptureWeb SDK Guide
Before the extensions are installed, the ePadLink SigCaptureWeb SDK must be installed on
the client machines. To install the ePadLink SigCaptureWeb SDK on your computer follow the
following steps:
1. Download and save the ePadLink SigCaptureWeb installer to your computer’s desktop
from the following URL: [Link]/SigCaptureWeb/[Link]
2. Right-click on the “[Link]” installer and choose “Run as Administrator”.
Then, follow the steps in the setup wizard.
3. Install the “Universal Installer” on your PC to provide the communication between your
application programs and your ePadLink electronic signature pad. You can download
and run the “Universal Installer” from the following URL: [Link]/universal-
[Link].
6.2 – Checking extension installation
The following code snippet demonstrates a way to detect if the ePadLink SigCaptureWeb SDK
extension is not installed or disabled in the browser. If not installed or disabled it displays an
alert.
if (!isInstalled) {
return
7
SigCaptureWeb SDK Guide
Note: In case clicking the URL does not work, try copy pasting the URL in the Chrome
browser.
3. Click the “Add to Chrome” button displayed on the top right of the page that is
displayed (see the screenshot below).
4. Click on the “Add extension” button in the confirmation dialog that is displayed.
8
SigCaptureWeb SDK Guide
6.3.3 – Opera
Opera supports the installation of Chrome Extensions from the Chrome store. ePadLink
SigCaptureWeb leverages the Chrome Extension to capture signatures in the Opera web
browser. Follow the following steps to install the Chrome extension in the Opera web browser.
2. Go to the Opera Add-ons page and install the “Install Chrome Extensions” Add-on by
navigating to the following URL:
[Link]
9/?display=en.
3. Click the “+ Add to Opera” button displayed on the top right of the page (see the
screenshot below). To view the installed extension, type Ctrl+Shift+E.
4. Go to the ePadLink SigCaptureWeb SDK Extension page on the Chrome web store:
[Link]
sd/idldbjenlmipmpigmfamdlfifkkeaplc
Note: In case clicking the URL does not work, try copy pasting the URL in the Opera
browser.
5. Click on the “Add to Opera” button displayed on the top right of the page that is
displayed (see the screenshot below).
6. Click on the “Add extension” button in the confirmation dialog that is displayed.
9
SigCaptureWeb SDK Guide
Note: In case clicking the URL does not work, try copy pasting the URL in the Edge
browser.
3. A window showing the Chrome Extension similar to the one in Section 6.3.1 will be
displayed. Click the “Add to Chrome” button displayed on the top right of the page (see
the screenshot below).
10
SigCaptureWeb SDK Guide
4. Click on the “Add extension” button in the confirmation dialog that is displayed.
After making sure the ePadLink SigCaptureWeb SDK software is installed (see Section 6.1)
and the signature pad is connected to the PC, open this page in your preferred browser:
[Link]
[Link].
Click on the “Sign” button to display the signature capture window. The signature window user
interface is explained in detail in the next section.
11
SigCaptureWeb SDK Guide
Sign on your signature pad, and the signature will appear in the signature capture window. To
re-sign, click the red “X” in the upper right corner of the window. To accept the signature, click
the green check mark icon. To cancel, click the red circle with the “X” in it.
Sign on your signature pad, and the signature will appear in the signature capture window. To
re-sign, click the “Clear” button. To accept, click the “OK” button. To cancel, click the “Cancel”
button.
To control the signature capture window interface, follow the steps given below.
• For Chrome, Opera and Microsoft Edge (Chromium), typically the path will be
“C:\Program Files (x86)\SigCaptureWeb SDK\Chrome”
12
SigCaptureWeb SDK Guide
3. Open the configuration file in a text editor to change the configuration parameter. The
contents of the configuration file will be as follows:
5. To display the “Modern” signature capture window the value must be set to “1”. For the
“Classic” signature capture window the value must be set to “2”. By default, the
“Modern” signing window will be displayed.
The SigCaptureWeb SDK extensions rely on custom HTML events for communication between
the web page and the extensions and vice versa.
The Chrome, Firefox, Opera, and Edge (Chromium) Extensions load during browser start up
and register a custom HTML event named “SigCaptureWeb_SignStartEvent”. Web pages
wishing to capture the signature using the SigCaptureWeb SDK in Chrome and Firefox
13
SigCaptureWeb SDK Guide
browsers have to raise the custom HTML event “SigCaptureWeb_SignStartEvent” and send an
input message to the SDK as an event attribute.
Once the signature capture task is completed, the SigCaptureWeb extensions raise a custom
HTML event named “SigCaptureWeb_SignResponse” and pass the output message as an
event attribute. Web pages should register and implement the
“SigCaptureWeb_SignResponse” event for processing the output from the extension.
The following code snippet demonstrates raising the custom HTML event
“SigCaptureWeb_SignStartEvent” to initiate signature capture and also register and implement
the “SigCaptureWeb_SignResponse” event for processing the output from the SDK. Input and
output messages are passed as event attributes. The input to the SDK must be set using the
attribute name “SigCaptureWeb_MsgAttribute” and response from the SDK must be read from
event attribute “SigCaptureWeb_msgAttri”
var message = { "firstName": "", "lastName": "", "eMail": "", "location": "",
"imageFormat": 1, "imageX": imgWidth, "imageY": imgHeight, "imageTransparency": false,
"imageScaling": false, "maxUpScalePercent": 0.0, "rawDataFormat": "ENC", "minSigPoints":
25, "penThickness": 3, "penColor": "#000000" };
[Link]('SigCaptureWeb_SignResponse', SignResponse, false);
var messageData = [Link](message);
var element = [Link]("SigCaptureWeb_ExtnDataElem");
[Link]("SigCaptureWeb_MsgAttribute", messageData);
[Link](element);
var evt = [Link]("Events");
[Link]("SigCaptureWeb_SignStartEvent", true, false);
[Link](evt);
function SignResponse(event) {
var str = [Link]("SigCaptureWeb_msgAttri");
var obj = [Link](str);
SetValues(obj, imgWidth, imgHeight);
}
14
SigCaptureWeb SDK Guide
The Output message payload will contain the signature signed status, the image data (in the
specified format), the raw signature data in base 64 format, connected signature pad
information, and a parameter to carry the error message in case signing fails.
The Chrome Google native messaging API (through which the Extension sends and receives
data to the SDK) mandates the text data to be in JSON format, hence the input and output
messages should be in JSON format and for convenience the same JSON format is followed
for Firefox as well. The format of the JSON message is
where ‘text’ and ‘text1’ are the names of the JSON parameters.
The ePadLink SigCaptureWeb SDK supports only one input message which will trigger the
signature capture using the ePadLink signature pads. It gathers all the required inputs (like
signature information (First Name, Last Name, Email, Location), the signature image and raw
data format (Image: JPG/PNG, RawData: ENC or SIG), width and height of the image,
background image transparency, etc.) for export after the capture and other parameters
described in the next section.
15
SigCaptureWeb SDK Guide
PARAMETER DESCRIPTION
firstName Signature Detail First Name as String.
lastName Signature Detail Last Name as String.
eMail Signature Detail Email as String.
The signing location as String, could be a physical location or
location
longitude and latitude.
Format of the signature image to be exported after signature
imageFormat
capture. Send 1 for JPG and 2 for PNG. The default format is PNG.
imageX Physical width of the signature image to be exported in pixels.
imageY Physical height of the image to be exported in pixels.
imageTransparency Signature image background transparency as Boolean.
imageScaling Whether to scale the image or not as Boolean.
maxUpScalePercent Maximum allowed upscale percentage as float (0 to 100).
Raw data can be exported after signature capture as string. Use
rawDataFormat ENC as value for this field for exporting signature raw data in pDoc
format and SIG to export it in Topaz .Sig format.
Color of the pen to be used for drawing the signature on the screen
penColor and image to be exported. The value should be passed as a
Hexadecimal RGB value. The RGB value must be prefixed with ‘#’.
Once the required JSON input message is formatted, you should pass it to the Chrome or
Firefox extension. It should be set as an attribute to the custom html event
SigCaptureWeb_SignStartEvent raised by a Web page.
16
SigCaptureWeb SDK Guide
The following interface appears for signature capture by default. If connection with the
signature pad device is successful, you will see the “Pad initialized, start signing” message in
the status bar (at the bottom) of the window.
The toolbar will have options to Clear the Signature, Accept the Signature, and Cancel the
signature.
If the configuration parameter “uitype” value is set to “2” (see Section 7.0), the following
“Classic” interface will appear for signature capture. If connection with the signature pad device
is successful, you will see the “ePad device initialized properly. Start signing…” message on
the signature capture window.
The signature capture window will have options to Clear the Signature, Accept the Signature
(“OK”), and Cancel the signature.
17
SigCaptureWeb SDK Guide
The SigCaptureWeb SDK sends back an output message in the following scenarios after the
signature capture is initiated using an input command.
1. Failed to initialize the signature capture dialog due to incorrect input data or any other
device/driver related failures.
2. User cancelled signing.
3. User accepted a signature.
4. Signature not captured/accepted.
The output message has a ‘status’ Boolean parameter indicting whether the signature capture
is successful or not. Applications can rely on this parameter to identify if a signature is
captured or not.
PARAMETER DESCRIPTION
The OUTPUT message is sent back as an event attribute for the event
SigCaptureWeb_SignResponse raised by the extensions and handled by the web page.
18
SigCaptureWeb SDK Guide
19