|
|||||||||||||||||
|
SigPlus® Basic Software
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).
Back to FAQ main page 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:
"SIGTOOL1.SigTool1Ctrl.1"
"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. This code works with Windows 95/98/NT.
B1. Where is the full document describing all of the methods and properties of the SigPlus control ? The documentation is in both MS Word or PDF file format, and is available for download. Included are two documents - SigPlus & SigPlus_Tools. Click here to download: sigplusdocs.zipnow. B2. 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
The signature would have already been captured into the control by setting EncryptionMode = 0 and then TabletState = 1. SigPlus1.TabletState = 0; Always set TabletState = 0 when done with electronic signature capture.
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 B3. What is the difference between a .sig format electronic signature and a Bitmap ? Topaz .sig-format data is 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 will typically take 5K bytes. A .sig-format data file consists of the full-tablet high-resolution signature. It can be compressed using the CompressionMode property to under 500 bytes. 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. B4. 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. If you are not using an instance of the control to capture a signature from a tablet, you should leave TabletState = 0. Whenever an electronic signature is captured and completed, the TabletState should be set to zero. This will ensure that the first control has let go of the com port or interface when you go to capture a second signature. 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 that tablet state is off when selecting com port. COM port must be selected first, and then tablet state turned on. Also be sure to set tablet state off before exiting the application. B5. How do I get rid of the white space around a signature ? Be sure to set JustifyMode. 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. Add 16 Changes autojustify to justify the signature based on the median of the signature data Add 32 Changes autojustify to justify the signature based on the mean of the signature data Add 48 Changes autojustify to justify the signature based on the mode of the signature data The Add modes are useful in re-creating a consistent synthetic baseline when using the autojustify feature. For example, to Autojustify the median value of the signature data to the center of the OCX box, you would set JustifyMode to 16 + 5 = 21. When using autojustify modes 1-5 and Add modes, a border area around the signature limits can be set in logical tablet coordinates using the JustifyX and JustifyY values. B6. How do I save an electronic signature in a Memo-Field ? To save .sig data in a Memo field of a database, use the SigString property when getting data from the control or setting data into the control. This property in versions 3.00 and above are recommended over the older method of using TabletMode = 1024. To put the signature into the control: To get the electronic signature from the control: If you want to store an electronic signature in binary format, you may wish to refer to the Microsoft KB article ID # Q103257, ACC: Reading, Storing, and Writing Binary Large Objects (BLOBS). Binary data is the default setting for the control. For a full example of Memo-field storage in an Access Database, download an Access 2000 example SignMeUp.zip. B7. 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, if you need to support an application that does not support Active-X controls, you can still use a VB supervisor to capture, bind, and store signatures and documents. You put the signature into the (non-active-x app) by having the VB supervisor program retrieve the document and signature data and de-crypt and import the signature into a control and then create and image file from the re-generated signature which is placed as an image into a forms or reports program for printing. The method for writing an image file is: SigPlus1.WriteImageFile c:\test.bmp See the property "SetImageFileFormat" to set an image type other than bitmap. Other supported image formats include JPG, TIF, WMF, and EMF The full Filename must be provided, including the standard file extension. B8. How do I set the line width for display, printing, and images? The pen width for direct display and printing of the signature from the control is set by the DisplayPenWidth property. The width specified is in pixels: SigPlus1.DisplayPenWidth = 12 The pen width for creating image files and bitmaps of the signature from the control is set by the ImagePenWidth property. The width is specified in pixels. The decimal integer representing the number of pixels of width to make the pen width for image files. 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 B9. 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 reduce 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 0, which links image size to equal LogicalYSize value. B10. How do I Print directly from Visual Basic (VB) ? VB applications require printing in a different WMF format that other higher-resolution windows applications such as Word. Therefore to set the control to properly render in VB for printing, use DisplayWindowRes = 1 to print directly from VB. This new property is now recommended and is easier to set than the older technique of using TabletMode = add 32. B11. 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 .sig format data. As a user of the .sig format data, 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. If we were to format the display or printing of the signature to show biometric and forensic cues, we would potentially be providing cues to a potential forger. Therefore, by design, the Topaz displayed or printed signature is very "flat" with no stress shading or line width variations. This provides a valuable extra level of biometric and forensic security to your signature. B12. How do I automatically detect if the Tablet is plugged into the COM port? Use the TabletComTest = 1. This is the preferred method in version 3.00 and above instead of the older TabletMode = Add 128 mode. In this mode, If a Topaz tablet is plugged into the selected COM port, the TabletState can be set to 1. If tablet is not plugged into serial port, TabletState cannot be set to 1. A tablet plug-in detection scheme is shown below and assumes that the COM port was set in the Sigplus.ini file during install.
TabletState = 0
Dim TabletConnect as String SigPlus1.TabletComTest = 1 SigPlus1.TabletState = 1 TabletConnect = SigPlus1.TabletState; If TabletConnect = 1, then the tablet is connected, if 0, then not connected B13. Can I sign files that are not traditional documents ? YES. A simple VB supervisor program can be used to sign all kinds of files, drawings, notes, or documents for approval and archival purposes. To do so, the file to be signed would be file.ext in the example below. A simple VB dialog box utilizing the Autokey method can be used to sign a file of virtually any type or origin.
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.EncryptionMode = 1 B14. Explain the SigPlus.ini file The SigPlus setup.exe program installs the OCX control together (optionally) with the SigPlus.ini file in the windows directory. You can choose not to install the .ini file by selecting "SKIP" during install. If you have already installed the .ini file, you may edit it or delete it easily. This .ini is not functional unless it is placed in the windows directory. If the .ini file is not present, then the properties of the control in your application are unaffected and the application runs on it's own. When the .ini file is present in the windows directory, the values present are used to override the properties set in the control proper in the application. The properties set by the .ini file would also apply to any applications that you would subsequently compile. The .ini file allows a common application to use different tablet types and interfaces. For example, if one machine uses the signature pad on COM1, another on COM2 and yet a third on the USB port, the SigPlus.ini files for these three instances would be:
TabletType settings:
It is very important to note that the .ini settings can only be used to override the OCX default property settings. If coding or script is used to override a property setting in your application, the .ini settings will not override the scripted setting. For a full explanation of the SigPlus.ini, please download and read SigPlus Online WebHelp. B15. 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. B16. 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. B17. What is the installation system script ? In order to make your own installation script rather than using the Topaz Setup.exe, use and locate the following files where noted and then self-register OCXs and DLLs. If you installed the SigPlus control onto your system using the Topaz setup.exe, then the source location for the reference files is the same as the destination location listed below.
MFC42.dll install to Windows\System\
OLE32.dll install to Windows\System\ OLEAUT32.dll install to Windows\System\ MSVCRT.dll install to Windows\System\ SigPlus.ocx install to Windows\SigPlus\ SigPlus.ini install to Windows directory for .ini override of OCX tablet and Com source. B18. 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
SigPlus1.DisplayTimeStamp = True SigPlus1.SaveSigInfo = True B19. 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 B20. How do I capture a signature using Internet Forms ? Capture the signature and then export the electronic signature using SigString to a database or to an invisible memo field within the form. To view the signature, extract the SigString-format data from the forms memo field and import into the control using the SigString property. To transfer the electronic signature data from the client to the server, use a session variable. You may also use the FORM tag with either method=GET or POST, and pass the signature like you would any other string value. If you would like an HTML signature demo, please download: VBScript-based HTML Internet Signature Examples, HTMLDemo.zip Javascript-based HTML Internet Signature Examples, HTMLDemoJavascript.zip B21. Can you use the Topaz Active-X control with JavaScript and Lotus Script?
Lotus Script for Notes and Domino - YES
To run signature capture under Java, download SigPlusJava software, documentation, and basic demos. B22. Can I have multiple signatures in the same document ? YES, as many as you need without limitation. And 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 as many signatures you need into truly portable .pdf documents. B23. How do I Create an instance of the SigPlus Active-X Control Using Script ? B24. What Options do I have in UNIX-Terminal and UNIX-Windows environments? Topaz has a limited UNIX capture (SigX) utility available for download on our Software page. This code manages the com port and creates a .sig file in human-readable format. To directly display or print a signature captured with this code within UNIX, you will have to write the display and printer driver for your system. The source code for the capture utility is provided to facilitate this. In a terminal environment, you will normally need a second com port to connect the capture tablet to the computer. If you wish to share the RS-232 com port used by the terminal, the Topaz MicroGem and PortShare products may be appropriate, but only if you are prepared to work with the capture source code to optimize it to your system. This approach is not recommended for a small installation, and is not done "out-of-the-box" If your UNIX system supports Java, you may use the Topaz SigPlus Java bean signature capture control. To run signature capture under Java, download SigPlusJava software, documentation, and basic demos. If your system can link to Windows, you can capture in UNIX and then supply the .sig data and the text data to the Windows application running the Topaz SigPlus software tools to bind and store signatures into a database, and you can use the Windows software to create image files, (such as tif) for output back to the UNIX system. Alternatively, you can also use a Windows front-end to capture the signature and store the transactions in a data base. Upon retrieval, the signature and transaction can be verified by the SigPlus Active-X and a image file such as tif can be provided back to the UNIX system for printing or fax. B25. How do I create color signature images using SigToolImager? First, locate the SigPlus.ini file located in your WIN directory, and open it. Locate the EnableColor parameter. By default, EnableColor=0. To activate color capability, please change this to EnableColor=1, then save the SigPlus.ini file and close. Next, locate the SigToolImager.ini file, also located in your WIN directory, and open it. Find the foreground and background parameters, which are:
ForeColor
BackColor By default, ForeColor=-21474833630, and BackColor=-2147483633. The ForeColor represents the ink color, and the BackColor is the area behind the signature. To change the colors, please choose a color from the following list, and replace the decimal value of the ForeColor and BackColor with the new color's decimal value.
Black = 0
For example:White = 16777215 Light Blue = 16776960 Dark Blue = 16711680 Red = 255 Green = 65280 Yellow = 65535 Light Gray = 14671839 Dark Gray = 8355711 Pink = 12615935 Purple = 16711808 For dark blue ink on a yellow background, change the parameters in the SigToolImager.ini as follows:
ForeColor=16711680
BackColor=65535 To determine a specific color's decimal value, please first determine the hex value of your color (the RGB value). For example, perfect blue would be 0000FF (where there is 0 red, 0 green, and 255 blue). Next, flip the value backwards (so instead of 0000FF, it becomes FF0000.) Finally, using the Calculator program provided in Start...Programs...Accessories, click on the View menu. Choose the Scientific calculator. Choose Hex in the radio button selection. Type in your 6-digit hex value, as determined in the above instructions (for our example, type in 0000FF for perfect blue). Finally, choose Dec in the radio button selection, and the Hex value will be converted into the Decimal value necessary for the ForeColor and BackColor parameters in the SigToolImager.ini (as you will see, the Decimal value for perfect blue is 16711680). For assistance, please contact , or call at (805) 520-8286. B26. Where should I place the SigUsb.dll when using SigPlus Java with HSB/USB tablets? For fastest results when capturing signatures, Topaz recommends SigUsb.dll be placed in your machine's SYS directory (either System or System32, dependingon your OS). The DLL will be found by Windows much more quickly here than if it resides in anohter folder. B27. 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):
B28. 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
B29. How can I clear and reset SigPlus, if I already have bound a signature, to be ready to capture and bind a new signature?
Dim sign As Bitmap Dim strSign As String strSign = "http://www.topazsystems.com/images/Sign.bmp" sign = New System.Drawing.Bitmap(WebClient.OpenRead(strSign)) Dim HIcon As IntPtr = sign.GetHbitmap AxSigPlus1.TabletState = 1 AxSigPlus1.DisplayWindowRes = True AxSigPlus1.SetBackgroundHandle(HIcon.ToInt32, 0)
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
'SigPlus is now clear and reset...ready to capture and bind a new signature
B30. When I instantiate SigPlus at runtime, do I need to do anything in particular?
SigPlus1.KeyString = "0000000000000000" SigPlus1.SigCompressionMode = 0 SigPlus1.EncryptionMode = 0 SigPlus.TabletState = 1 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
B31. How do I sign using a Topaz pad in a Citrix environment?Set SigPlus1 = CreateObject("SIGPLUS.SigPlusCtrl.1") SigPlus1.InitSigPlus SigPlus1.TabletInvisible = True For information regarding the use of Topaz HSB (HID USB) signature pads in a thin client environment, please refer to this page - Citrix and Terminal Server Support. Please take these steps to implement 9-pin serial pads in a Citrix environment:
Also, make sure the Windows\SigPlus.ini file (you have installed to the server) gets copied over to the user's local Windows folder under Documents and Settings\%login%\Windows Once complete, you should be able to sign using the client machine. B32. How do I sign using a Topaz pad in a Terminal Server 2003/2008 environment (without Citrix)?For information regarding the use of Topaz HSB (HID USB) signature pads in a thin client environment, please refer to this page - Citrix and Terminal Server Support. To use 9-pin serial pads in a TS environment, first, make sure SigPlus is installed for your particular signature pad and COM1 on the server. If possible, you can even test the pad locally on the server's com port before continuing. Next, go to Start->Programs->Accessories->Communications->Remote Desktop Connection to login. From the dropdown, choose your Terminal Server. Then click the Local Resources tab and make sure serial ports is checked in the local devices section. Make sure the login name and password are ready to go, and click the Connect button. If there is a security warning about serial ports being made available, just click Ok. The server desktop should now be visible on the client machine. Make sure a working Topaz pad is plugged into the client machine. Run DemoOCX.exe (or SigPlus-based test utility). Click Start and sign on your pad. Also, make sure the Windows\SigPlus.ini file (you have installed to the server) gets copied over to the user's local Windows folder under Documents and Settings\%login%\Windows for Server 2003, and Users\%login%\Windows for 2008. B33. I get a winword error in Microsoft Word when signing with your pad. How do I fix it?
Certain print drivers in the Microsoft Word environment cause the tablet capture process to function incorrectly. This is especially true of HP Printers. B34. 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 Vista
For Microsoft Windows XP
For Microsoft Windows 2000
|
||||||||||||||||
|
|||||||||||||||||