Wacom SigCaptX SDK wrapper created for easier access to basic functionallity of signature capture device (STU-500).
It allows requesting signature and getting signature as transparent PNG image in base64 format.
licenceStringTo remove "Evalute" message from screen, you will need valid Wacom licence string. Defaults to empty string.bitmapSettings.widthWidth of rendered signature image. Defaults to STU-500 that has width of640px.bitmapSettings.heightHeight of rendered signature image. Defaults to STU-500 that has height of480px.bitmapSettings.paddingXPadding of X axis for rendered signature image. Defaults to0.bitmapSettings.paddingYPadding of Y axis for rendered signature image. Defaults to0.bitmapSettings.inkWidthInk width for rendered signature image. Defaults to0.7.outputOutput debug data. Iftrue, it will log to console, as alternative, you can provide your own function to output debug info. Defaults tofalse.sdkDetectTimeoutTimeout value in miliseconds for reaching SDK on client computer. Defaults to1500servicePortService port value for SDK on client computer. Defaults to8000.
init(options, callback)Initializes engine with given optionsclearSignature()Clears signature from screencapture()Starts signature capture processdisplaySignatureDetails()Requests signature detailssetSignatureText(text)Sets signature textrestartSession()Restarts engine session
sigCapt:readyTriggered when engine connection to SDK on client computer is ready.sigCapt:noSdkDetectedTriggered if SDK was not detected during engine init sequence.sigCapt:restartSessionTriggered when engine restart was requested.sigCapt:renderBitmapTriggered when signature was captured and bitmap image is ready. First argument is image string in base64 format.sigCapt:txtSignatureUpdatedTriggered when signature text were updated.sigCapt:captureCancelledTriggered when user canceled signature process.sigCapt:captureErrorTriggered when any other error is returned. First arguments is error message, second is error code (see below).sigCapt:signatureDetailsTriggered after signature details was requested. First three arguments are who, why and when.
100DynCaptPadError (device not connected)101DynCaptError (could not capture)102DynCaptIntegrityKeyInvalid (invalid integrity key)103DynCaptError (invalid licence)200DynCaptAbort (could not parse contents)
Include vendor scripts and library
<script type="text/javascript" src="vendor/base64.js"></script>
<script type="text/javascript" src="vendor/wgssSigCaptX.js"></script>
<script type="text/javascript" src="SigCapt.js"></script>Initialize SigCapt
window.SigCapt.init({
licenceString: '\* Wacom licence string goes here *\'
});Listen for captures
$(window).on('sigCapt:renderBitmap', function(e, imageBase64) {
console.log('Signature captured:', imageBase64);
});Request capture
window.SigCapt.capture(
'Gordon Freeman',
'By signing below, you agree that your signature will be stored digitally.'
);