visit Kofax web site

Tablet creation options

Signware offers four options to create a tablet

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;
    }
}