Tablet creation options
Signware offers four options to create a tablet- TabletCreate: The TabletCreate function passes a driver id as the only parameter. This is the easiest method to create a tablet object, which is typically used if exactly one tablet is connected to the host, or the application will use any tablet which may be found first.
These driver ID's are defined in SignWare:- SP_UNKNOWN_DRV access any driver
All drivers and access modules will be accessed to find a connected tablet. The first valid tablet will be used. - SP_WINTAB_DRV access a Wintab driver
Kofax offers many tablet access modules which are loaded as wintab devices, including SignPad family.
All devices with wintab interface are accesssed to find a connected tablet. The first valid tablet will be used. - SP_PADCOM_DRV access a MobiNetix driver
- SP_REMOTETABLET_DRV access a Kofax remote driver, see SPRemoteTablet
- SP_TABLETSERVER_DRV access a Kofax TabletServer driver, see SPTabletServer
- SP_GENERIC_DRV access a Kofax Generic access module, see SPGenericTablet
- SP_UNKNOWN_DRV access any driver
- CreateTabletEx: The CreateTabletEx function passes two parameters, a TabletClass and a TabletConfiguration string.
These tablet class names are supported:- SPTabletHidDrv interface to the Kofax HID driver to access TabletPCs
- SPTabletInterlink interface to the Kofax Interlink driver (SWILUniv)
- SPTabletMobinetix interface to Mobinetix driver
- SPTabletStepOver interface to StepOver BlueM and BlueM-LCD tablets
- SPTabletTopaz interface to Topaz 1X5, 4X3 and 4X5 SE LCD tablets
- SPTabletWSignPad interface to Wacom SignPad tablets
- SPTabletWacom interface to Wacom Intuos, Graphire, etc. tablets
- SPTabletWTablet interface to Kofax eInk driver to access TabletPCs
- SPTabletVerifone interface to Kofax driver to access Verifone Mx 800 series tablets
- SPTabletTabletServer interface to Kofax driver to access tablets via Kofax TabletServer
- SPTabletRemoteTablet interface to Kofax driver to access remote tablets
- SPTabletGeneric interface to Kofax generic access modules
Optional configuration data may be passed in the TabletConfiguration parameter. Configuration data equals the options as described in tablet.ini, depending on the detected tablet model:- SPTabletHidDrv no configuration parameters
- SPTabletInterlink no configuration parameters
- SPTabletMobinetix no configuration parameters
- SPTabletStepOver pass the contents of the file tablet.ini, see Installation and configuration of various pads
- SPTabletTopaz pass the contents of the file tablet.ini, see Installation and configuration of various pads
- SPTabletWSignPad pass the contents of the file tablet.ini, see Installation and configuration of various pads
- SPTabletWacom no configuration parameters
- SPTabletWTablet no configuration parameters
- SPTabletVerifone pass the contents of the file tablet.ini, see Installation and configuration of various pads
- SPTabletTabletServer pass the tablet device identifyer
- SPTabletRemoteTablet optional configuration parameters
- SPTabletGeneric optional configuration parameters
TabletCreateEx may be used to address a specific tablet if more than one tablet is connected to the host.
- CreateTabletByAlias: The CreateTabletByAlias function passes a TabletAlias string.
The TabletAlias is used as a lookup in the windows registry to read a unified resource location description, which includes the TabletClass and TabletOptions to create the tablet using TabletCreateEx.
Under Windows the ULOC will be located in the registry folder HKLM\SOFTWARE\SOFTPRO\tabletconfig\AliasName.
Under Linux the ULOC will be located in a configuration file ~/.config/SOFTPRO/tabletconfig.config in section [AliasName].
The Key ULOC contains a resource locator which describes the tablet class and further configuration properties.
ULOC format:
sptablet://class=ClassName[&connection={usb|tcpip|com}]&[connection_value=port_id]&options
where- class contains the name of the tablet class, see SPTabletCreateEx for a list of valid tablet classes
- connection contains the interface used to connect to the tablet
- connection_value contains a interface identifyer, e. g. '-2' for second USB device, or '2' for COM2, or '192.168.1.15:1002' to address a tcpip interface
- options contains a '&' separated list of options as defined in the tablet.ini, see Installation and configuration of various pads
CreateTabletByAlias is a convenience function with the same capabilities as TabletCreateEx but the application uses an alias that will finally be converted to the actual tablet creation parameters based on information that is loaded from the registry on the host where the application is running, and the tablets are connected.
- CreateTabletByEnum: The CreateTabletByEnum function passes a SPPropertyMap object to address a specific device.
The SPPropertyMap object must be created from a SPTabletEnum object. The SPPropertyMap object includes device specific configuration options to address the selected device.
If the SPPropertyMap object is NULL then CreateTabletByEnum behaves exactly like TabletCreate(SP_UNKNOWN_DRV).
Typical Creation of a tablet
Most applications may assume that only one tablet is connected. The simple tablet creation (SPTabletCreate with driver SP_UNKNOWN_DRV)should thus satisfy most requirements.An entry in the tablet.ini (see Installation and configuration of various pads) may be required to use an externally connected tablet on a tablet PC.
Applications that must address more than one tablet should setup the Alias in the registry of the client and pass an Alias for the desired Tablet.
Example: let's assume that the application will sign a document. Both, the customer and the consultant, have to sign the document. Two tablets are connected to the host, one located at the customer side, and one located at the consultant side.
It is recommended to add a tag to each signature field which defines the Alias used and to create the tablet object based on the Alias.
(C) int CreateTablet(pSPTABLET_T *ppTablet, const char *pszAlias) { int rc = 0; if(pszAlias && *pszAlias) { rc = SPTabletCreateByAlias(ppTablet, pszAlias); // if the alias cannot be resolved then use any tablet found in the system if(rc == SP_INVALIDERR) rc = SPTabletCreate(ppTablet, SP_UNKNOWN_DRV); } else { // if no alias passed then use any tablet found in the system rc = SPTabletCreate(ppTablet, SP_UNKNOWN_DRV); } return rc; }
(C#) const int SP_NOERR = 0; const int SP_INVALIDERR = -24; const int SP_UNKNOWN_DRV = 0; SPTablet *CreateTablet(String pszAlias) { int rc = 0; SPTablet spTablet = new SPTablet(); if(pszAlias && pszAlias != "") { rc = SPTablet.CreateByAlias(pszAlias); // if the alias cannot be resolved then use any tablet found in the system if(rc == SP_INVALIDERR) rc = SPTablet.Create(SP_UNKNOWN_DRV); } else { // if no alias passed then use any tablet found in the system rc = SPTablet.Create(SP_UNKNOWN_DRV); } if(rc != SP_NOERR) spTablet = null; return spTablet; }
(Java) SPTablet CreateTablet(String strAlias) throws SPSignwareException { // if no alias passed then use any tablet found in the system if(strAlias == null || strAlias.isEmpty()) return new SPTablet(SPTablet.SP_UNKNOWN_DRV); try { return new STablet(strAlias); } catch (SPSignwareException ex) { // if the alias could not be resolved then use any tablet found in the system if(ex.getErrorCode() == SPSignwareException.SP_INVALIDERR) return new SPTablet(SPTablet.SP_UNKNOWN_DRV); else throw ex; } }