|
||||||||
SigPlus Pro™ Development Tools
Applications and
Plug-ins
Additional SDK Development Tools
Verification Software
Developer's Demos
and Examples
|
Electronic Signature Software and Development FAQThis page provides information and examples for electronic signature software developers looking to create custom applications using Topaz signature software tools. For an out-of-the-box software solution, you may download SigPlus electronic signature software for Word, Excel, Acrobat, and the creation of electronic signature images (BMP, TIF, etc). Section A. Software Notes:
Important Note for Visual Basic, VBA, PowerBuilder, etc. users: 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 called SigPlusControl_1: Set SigPlusControl_1 = CreateObject( "SIGPLUS.SigPlusCtrl.1" ) The control names for using CreateObject Script are:
"SIGPLUS.SigPlusCtrl.1"
"SIGSIGN.SigSignCtrl.1" The following is how to write a BMP to the SignatureGemLCD4X3 signature pad using a Windows API bitmap handle call within PowerBuilder.
1. Where is the full document describing all of the methods and properties of the SigPlus control? The documentation for SigPlus ActiveX is available for download here. The documentation for Java and C++ library are also available in their respective download links. 2. 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:
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:
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
Dim text3 As String
text3 = ActiveDocument.Content; This is a Word VBA command SigPlus1.AutoKeyStart SigPlus1.AutoKeyData = text3 SigPlus1.AutoKeyFinish SigPlus1.EncryptionMode = 1; or Encryption Mode = 2; SigPlus1.ExportSigFile (""); ("") is used to store the electronic signature within the control End Sub
Private Sub Document_Open(); This is a Word event that occurs on document opening 3. 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 CompressionMode property 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. 4. 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 Auto-justify 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. 5. 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. 6. 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: To get the electronic signature from the control: For a full example of Memo field storage in an Access Database, download one of these examples here. 7. 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. 8. 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 9. 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 ImageSize defaults to the tablet's LogicalXSize and LogicalYSize values. 10. 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. 11. How do I automatically detect if the tablet is plugged in? Use the TabletConnectQuery()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 12. 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 13. 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. TabletType settings: 0 = Serial mode. This tells SigPlus that a 9-PIN serial signature pad is connected. 6 = HSB mode. This tells SigPlus that a Topaz HID USB (HSB) signature pad is connected. TabletCOMport settings: This parameter is used to specify the COM port a signature pad is plugged in to when tablet type is set to 0 for serial mode. If tablet type is set to 6 for HSB, then tablet COM port is not relevant. It is very important to note that these .ini settings can be overridden by an application using SigPlus. For a full explanation of the SigPlus.ini, please download and read SigPlus Online WebHelp. 14. Explain signature compression and when it should be used. 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. 15. 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. 16. How do I create my own ActiveX SigPlus install? In order to make your own installation script rather than using the Topaz sigplus.exe, please refer to this location for a silent installer that takes command line parameters. Alternately, to add the dependencies of SigPlus to your own installer, please refer to this location. 17. How do I save and display the time and date stamp and annotation? 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 18. 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 19. How do I capture a signature using Internet Forms? Please refer to these HTML examples: VBScript-based HTML Internet Signature Examples, HTMLDemo.zip Javascript-based HTML Internet Signature Examples, HTMLDemoJavascript.zip PHP-based HTML example is available here. C# and VB-based ASP.NET demos are available here. Topaz also offers a Java API for applet development. Applet demo is included. 20. 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, the Acrobat plug-in will publish multiple signatures into truly portable .pdf documents. 21. How do I create an instance of the SigPlus ActiveX Control using a scripting language such as Javascript, VBscript, or PHP? Refer to FAQ #19. 22. What options do I have for Linux and Unix environments? Topaz offers a C Library and also a SigPlus Java API you can use in Linux or Unix. 23. 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. 24. 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): 25. How do I assign a bitmap handle to the SigPlus ActiveX from an image retrieved from a URL using .NET? .NET provides a means to obtain a bitmap from the web, and return a handle to that bitmap, which can be used in several SigPlus methods requiring bitmap handles, such as LCDWriteBitmap() and SetBackgroundHandle(). See the code example below: Dim WebClient As New System.Net.WebClient 26. 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. 27. 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 28. How do I sign using a Topaz pad in a Citrix or Terminal Server environment? Please see the Citrix and Terminal Server Support page. 29. 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
For Microsoft Windows Vista
For Microsoft Windows XP
|
|||||||
|
||||||||