For all Properties, the function names are documented in the form of a Get/Set pair for (Visual C++). For Visual Basic, VBA, Powerbuilder, etc. users, just use the property name itself, without the Get/Set prefix.

The full name is used when the object is referenced from a Visual C++ application. There are syntax differences between the Visual C++ syntax noted herein and VB or VBA syntax, most notably involving the use of the parenthesis in the argument.

To create a single instance of the control calledSigPlusControl_1:

Set SigPlusControl_1 = CreateObject( "SIGPLUS.SigPlusCtrl.1" )

The control names for usingCreateObjectScript are:

"SIGPLUS.SigPlusCtrl.1"

"SIGSIGN.SigSignCtrl.1"

The following is how to write a BMP to the SignatureGem® LCD 4X3 signature pad using a Windows API bitmap handle call within PowerBuilder.

Step One:

Declare the following external function to the Windows API:

FUNCTION ULONG LoadImageA (ULONG a_hInst, REF STRING a_lpszName, &

ULONG a_uType, LONG a_cxDesired, LONG a_cyDesired, ULONG a_fuLoad) &

LIBRARY "USER32.DLL"

Step Two:

The following code gets the bitmap handle using the above windows API function and writes the BMP to the pad.

string ls_filename

ulong hbitmap

ls_filename = "c\sigplus.bmp"

hbitmap = LoadImageA(0, ls_filename, 0, 0, 0, 16)

ole_SigPlus.object.LCDWriteBitmap(1, 2, 0, 0, 240, 128, hbitmap)

General Software Development FAQ

How do I bind a signature to a document?

A signature is bound to a document or data by using common cryptography and secure hashing techniques. If the document data is changed, the binding prevents the electronic signature from being viewed or printed. Binding only applies to .sig-format data and not to image or bitmap data. If you need to use image files for reports, viewing, or printing, they can be generated from the control using the WriteImageFile whenever the signature is rendered in the control.

To bind an electronic signature to a document when the signature is stored separately from the document:

1. Capture the signature with EncryptionMode set to 0.

2. Use AutokeyData, with or without first using AutoKeyStart (see AutoKeyStart in the SigPlus Developers' Guide for details). When done passing in data, use AutoKeyFinish.

3. Set the EncryptionMode > 0.

4. Use GetSigString to return the signature as an ASCII-hex string (alternately, ExportSigFile writes the signature as a file to a location you specify).

NOTE: When using EncryptionMode = 2 especially, the sequence of steps is important.

To read in and verify the binding of the signature to the document file, the steps are similar:

1. Set EncryptionMode to 0 and clear the control (ClearTablet).

2. Use AutokeyData, with or without first using AutoKeyStart (see AutoKeyStart in the SigPlus Developers' Guide for details). When done passing in data, use AutoKeyFinish.

3. Set the EncryptionMode > 0.

4. Use SetSigString to return the ASCII-hex string to the new instance of SigPlus (alternately, ImportSigFile imports the signature from the file location you specified).

5. To verify the binding view the signature and check automatically to determine the number of strokes, or simply inspect the return value that is generated when using the ImportSigFile or SetSigData methods. If returned successfully, the signature will render automatically.

In Visual Basic, to Autokey to a path and file name, use the following technique:

Dim text1 As String

text1 = "c:\windows\file.ext"; note that this should contain your path and file name, the quotes are needed.

SigPlus1.AutoKeyData = text1

SigPlus1.AutoKeyFinish

SigPlus1.EncryptionMode = 2

In Visual Basic, to Autokey to string literals, use the following technique:

Dim text1 As String

text1 = "c:\windows\file.ext"; note that this should contain your path and file name, the quotes are needed.

SigPlus1.AutoKeyStart

SigPlus1.AutoKeyData = "this is my sample data"

SigPlus1.AutoKeyData = "i can add as much as i want"

SigPlus1.AutoKeyFinish

SigPlus1.EncryptionMode = 2

To bind an electronic signature to a document when the signature is stored within the document (within each instance of the control placed in the document, note the following example written in VBA for Word:

Private Sub Done_Click(); This is the signature encryption step, binding to the document. The signature would have already been captured into the control by setting EncryptionMode = 0 and then TabletState = 1.

SigPlus1.ImportSigFile ("") ; ("") is used to retrieve the electronic signature within the control.

End Sub

What is the difference between a .sig format electronic signature and a Bitmap?

Topaz® .sig format data is a vector file containing the original signature data from the tablet at high speed. The signature data is captured directly and is not passed through a driver layer. This means that the .sig data represents the entire signature and the exact sequence of all of the points, loops, strokes, and timing data. A standard .sig file can typically be up to 5KB in size. A .sig-format data file consists of the full-tablet, high-resolution signature. It can be compressed using the CompressionModeproperty at 5:1 compression or better. An image or bitmap file on the other hand does not store a signature in a vector stroke format but in an X-Y matrix of points. It is typically much larger than a .sig file, and it contains none of the biometric or forensic information, such as the sequence and timing of the loops, strokes, and segments.

When do I set TabletState to true and false?

The TabletState is what turns on and off the capture of signatures via the pen and tablet. Use TabletState = 1 to capture signatures, and use TabletState = 0, the default, to turn capture off.

If you are using the JustifyMode = 5 (AutoJustify) to zoom the signature to fill the control and eliminate white space from the control, the TabletState must be set to zero. The AutoJustify action will only occur when TabletState = 0.

Be sure to set TabletState = 0 when changing tablet type. Also be sure to set TabletState = 0 before exiting the application.

How do I get rid of the white space around a signature?

Be sure to set JustifyMode in your application code. The signature will zoom with the correct aspect ratio into any size of control, from anywhere on the tablet, if TabletState = 0 and if the justify mode is being used.

0 Normal, no justification

1 Auto-Justify signature to upper left corner of signature box.

2 Auto-Justify signature to upper right corner of signature box.

3 Auto-Justify signature to lower right corner of signature box.

4 Auto-Justify signature to lower-left corner of signature box.

5 Auto-Justify signature to center of signature box.

How do I save an electronic signature in a Memo field in MS Access?

To save a Topaz signature in a Memo field of a database, extract the signature using the SigString property of SigPlus.

To put the signature into the control:

SigCtl.SigString = SigData

To get the electronic signature from the control:

SigData = SigCtl.SigString

For a full example of Memo field storage in an Access Database, download one of these examples here.

Where is the forensic and biometric information?

All of the data needed for forensic and biometric verification of an electronic signature is stored in the Topaz format signature. The Topaz format signature can either be a .sig file or the ASCII hex-converted SigString. You cannot view this forensic and biometric information. The objective of the Topaz system is to only allow forensic or biometric characteristics to be available to a handwriting expert and forensic document examiner.

How do I automatically detect if the tablet is plugged in?

Use theTabletConnectQuery() function. This is the preferred method in SigPlus 4.29 and above. A tablet plug-in detection scheme is shown below and assumes that the COM port was set in the Sigplus.ini file during install.

Dim TabletConnect as Boolean

TabletConnect = SigPlus1.TabletConnectQuery()

If TabletConnect = True Then

MsgBox "Tablet connected"

Else

MsgBox "No Tablet Detected"

End If

Can I sign files that are not traditional documents?

Yes. A simple custom application can be made to sign all kinds of files, drawings, notes, or documents for approval and archival purposes. To do so, the electronic file to be signed is represented by the file.ext in the example below.

Dim text1 As String

text1 = "c:\windows\file.ext" 'note that this should contain your path and file name, the quotes are needed.

'SigPlus1.AutoKeyStart 'MAKE SURE THIS IS COMMENTED OUT

SigPlus1.AutoKeyData = text1

SigPlus1.EncryptionMode = 2

Explain the SigPlus.ini file.

The SigPlus.exe installer places the SigPlus.ini file in the Windows directory. The .ini file can be edited after installation is complete. If the .ini file is not present in the Windows directory, then SigPlus will use the default values normally obtained from the .ini file. When the .ini file is present in the Windows folder, any application that uses SigPlus will use that .ini file to pull in information about the signature pad and tablet connection. The important settings in the .ini file pertain to the tablet model, the tablet's connection type, and if applicable, the tablet COM port assignment.

TabletModel settings:

The tablet model is used to specify what Topaz tablet model you have connected to the computer. For example:

TabletModel=SignatureGemLCD1X5

The example above tells SigPlus that the tablet connected is a T-L462.

Signature compression is to be used whenever it is absolutely essential to get the smallest signature file size, because hundreds of thousands of electronic signatures will be stored together with very limited document data. A retail POS signature system makes good use of compression, since the data is only a few dozen bytes, such as the amount of the purchase, time, date, and credit card information. If a document is to be signed, there is usually little to be gained from signature compression because the document size is greater than 10K bytes. In the application source code, use the SigCompressionMode property. Set to 1, you get lossless compression at about 4:1. Modes beyond that signature points are thrown out to perform the further compression.

What should be the settings for LogicalX and LogicalY sizes?

The LogicalX and LogicalY sizes control the scaling of the signature data output. These are set to the appropriate tablet resolution using the Topaz.ini file in the Windows directory. Normally, LogicalXSize is set to XStop minus XStart and LogicalYSize is set to YStop minus YStart. Topaz does not recommend changing these values.

You will also find guides regarding the Javascript and VBScript demos at this location.

PHP-based HTML example is available here. C# and VB-based ASP.NET demos are available here. Topaz also offers a Java APIfor applet development.

Can I have multiple signatures in the same document?

Yes, you can add multiple signatures to the same document. There are several ways to do so. You can use SigPlus controls as placeholders and import the signatures from an external forms program or a database. Or you can store each signature within the control instance itself, such as we do in the supplied MS Word Plug-In. In this case, each signature is stored within the instance of the control and the signature travels along in the control and embedded in the document. Also, theAcrobat Plug-In will publish multiple signatures into truly portable .pdf documents.

My fonts on my LCD display appear thick and unclear. Is there a way to get the fonts to look sharper?

Font smoothing/ClearType can interfere with the way text is drawn to the LCD. This feature should be disabled in Windows for use of text on the Topaz LCD.

For Microsoft Windows 7

1.Open the Start menu.

2. In the Start menu seach line, type cttune.exe and press Enter.

3. Uncheck the Turn on ClearType box and click Next.

4. If you have multiple monitors. select to tune all of them and click Next.

5. Unless you wish to change the screen resolution, simply click Next again.

6. As required by Windows, choose the "text that looks best to you" and click Next until complete.

7. Click on Finish.

For Microsoft Windows Vista

1. Right-click on the Desktop and choose the "Personalize" option.

2. Choose the "Window Color and Appearance" option from the list when the window appears.

3. Press the button named "Effects..."

4. From the drop-down menu, change "ClearType" fonts to "Standard."

For Microsoft Windows XP

1. Open "Display" in Control Panel. To open Display click "Start," point to "Settings," click "Control Panel," and the double-click "Display.

2. On the "Appearance" tab click "Effects."

3. In the "Effects" dialogue box, uncheck the box next to "Use the following method to smooth edges of screen fonts" check box.

SigPlus ActiveX FAQ

Where is the full document describing all of the methods and properties of the SigPlus® control?

The software guide for SigPlus ActiveX is available for download here. The software guide for Java and C++ library are also available in their respective download links.

When and how should I create an image file?

Image files of an electronic signature are useful in many applications for printing, viewing or merging into reports. They allow a significant level of versatility with a wide range of application programs. For example, in an environment where you cannot instantiate a SigPlus control, an image of the signature might serve as a good means for rendering the signature. The method for writing an image file is:

SigPlus1.WriteImageFile c:\test.bmp

See the property "ImageFileFormat" to set an image type other than bitmap. Other supported image formats include JPG, TIF, WMF, and EMF The full file name must be provided, including the standard file extension.

How do I set the ink thickness for display, printing, and images?

The ink thickness for direct display and printing of the signature from the control is set by the DisplayPenWidth property, called from your code. The width specified is in pixels:

SigPlus1.DisplayPenWidth = 12

The ink thickness for creating image files and bitmaps of the signature from the control is set by the ImagePenWidth property. The width is specified in pixels. Default is 1. This property does not affect the pen width shown in the control signature window. You will notice a natural interaction in perceived pen thickness depending upon the x and y resolution selected for the image.

SigPlus1.ImagePenWidth = 4

How do I set the resolution of a signature file or an image file?

The resolution of a signature file or image file is normally set by default upon software installation to match the resolution of the tablet being used. To change the resolution of an image file, use the ImageXSize and ImageYSize properties to directly set the resolution of the image file. We recommend that the aspect ratio of the image file match the aspect ratio of the control. Normally, with the SignatureGem tablet settings, you would get a bitmap resolution of 2000 x 600, which are the LogicalX and Y values. To reduce the resolution by a factor of 2, you would use:

SigPlus1.ImageXSize = 1000

SigPlus1.ImageYSize = 300

ImageSize defaults to the tablet's LogicalXSize and LogicalYSize values.

How do I automatically detect if the tablet is plugged in?

Use theTabletConnectQuery() function. This is the preferred method in SigPlus 4.29 and above. A tablet plug-in detection scheme is shown below and assumes that the COM port was set in the Sigplus.ini file during install.

To set the time and date and annotation stamps to display and to be sure to save the time and date and annotation data within the .sig date, you must set the following properties:

SigPlus1.DisplayAnnotate = True

SigPlus1.DisplayTimeStamp = True

SigPlus1.SaveSigInfo = True

SigPlus1.AutoTimeStamp

SigPlus1.Annotation="My Annotation String"

How do I set the size of the time and date stamp and annotation?

To set the time and date and annotation stamp sizes use the properties shown below. The size of the text is specified proportional to the LogicalYSize settings of that particular control instance. If the LogicalYSize is 600 for example, the size of the text in the example below would be 1/3 of the control height (200/600).

SigPlus1.DisplayAnnotateSize = 200

SigPlus1.DisplayTimeStampSize = 200

How can I clear and reset SigPlus to be ready to capture and bind a new signature?

In order to successfully clear and reset SigPlus so it is ready to capture and bind a new signature, when it has already been used to capture and bind a signature using the AutoKey methods, and setting the EncryptionMode property > 0, use the following code:

SigPlus1.ClearTablet

SigPlus1.KeyString = "0000000000000000"

SigPlus1.SigCompressionMode = 0

SigPlus1.EncryptionMode = 0

SigPlus.TabletState = 1

SigPlus is now clear, reset, and ready to capture and bind a new signature.

When I instantiate SigPlus at runtime, do I need to do anything in particular?

Anytime SigPlus is created dynamically, rather than at Design Time, it is important that you call the InitSigPlus() method. Additionally, setting the TabletInvisible property to True is important if SigPlus is not going to be visible on any form. For example (VB sample code):

Dim SigPlus1 As Object

Set SigPlus1 = CreateObject("SIGPLUS.SigPlusCtrl.1")

SigPlus1.InitSigPlus

SigPlus1.TabletInvisible = True

SigWeb FAQ

What is the SigWebTablet.js file, and do I need to use it?

The SigWebTablet.js file contains function calls from the SigWeb service and your web page's call to SigWeb. It is not included in the SigWeb installer, but is installed on the webpage by the developer. The SigWebTablet.js file should be placed into the same location on your web server as the page that hosts SigWeb. Alternately, you may put the SigWebTablet.js file anywhere on your web server that you prefer, as long as you reference this location in the <script> tag's "src" parameter.

You will need to add a <script> tag to your web page to reference the SigWebTablet.js file.

NOTE: Topaz recommends that you do not alter the SigWebTablet.js file.

When I sign in Chrome using SigWeb, I do not see the signature as I am signing. However, I do see the signature in other browsers. How do I fix this?

As you sign, SigWeb draws the signature into the canvas signing area in real time. Unlike other browsers, Chrome saves temporary files associated with this process on your computer. Chrome deletes these temporary files when the browser closes normally. In rare cases, when Chrome does not close normally, the files may not be deleted properly.

Delete the temporary files left by Chrome from the following folder:

Windows\Users\%UserName%\AppData\Local\Temp

After the files have been deleted, update your web server to use the latest version of SigWebTablet.js to mitigate this.

Is it important to deactivate signature capture before the web page closes?

It is critical that you deactivate the connection to the signature pad every time before you close the page.

The appropriate call to do this is:

SetTabletState(0, tmr);

Note that the second argument in the SetTabletState() call above is the target of the call to SetTabletState() when used to open it originally. For example:

var tmr;

tmr = SetTabletState(1, ctx, 50) || tmr;

assuming that 'ctx' is the context for your web page's canvas.

SigPlus Java FAQ

Where should I place the SigUsb.dll when using SigPlus Java with HSB tablets in Windows?

For fastest results when capturing signatures, Topaz recommends SigUsb.dll be placed in your machine's SYS directory (either System32 or SysWOW64, depending on your OS). The DLL will be found by Windows much more quickly here than if it resides in another folder. Alternately, you can place the SigUsb.dll in any location specified in the PATH variable.

How do I run the Topaz java bean headless under Linux?

You'll need to set the java.awt.headless property to true (allowing use of the awt library), using the line of code below (under main is the suggested location):

System.setProperty("java.awt.headless","true");

Additionally, you will need to have XWindows installed, however it does not have to be running.

SigPlusNET FAQ

Do I need separate versions of SigPlusNET for 32-bit and 64-bit Windows?

The current version of SigPlusNET is 'AnyCPU' compatible, meaning that it will run appropriately in either 32-bit or 64-bit mode depending upon your .NET project's platform.