B-API documentation
SignWare B-API
The B-API (Browser API) was designed to add SignWare functionality in a thin-client environment, where the number of locally installed components is reduced to a minimum.The browser plugin adds capabilities to capture signatures and references from a pad and to scan an image in a web browser. Typically the plugin does not require a local installation, typically the web server passes a link that tells the browser where to load the plugin. However additional hardware drivers such as pad drivers or scanner drivers may need to be installed on the client computer.
The browser plugin capture dialogs are configured via a page description in XML, see Document Type Definition for PadEntryOptions and ScannerEntryOptions.
The browser plugin implements functions to capture one or more signatures from a pad and functions to scan one or more images from a scanner.
Each page description includes the function name, one or more Dialog pages (PadEntryDialog or ScannerDialog) elements, that each describe the layout of a dialog page.
Each dialog is composed of PlButton, PlComboBox, PlImage, PlSlider, PlText and PlTextEntry elements.
All element positions are based on the PlCoordinate obbject, and drawn according to draw flags in the desired drawing context (may be screen or tablet LCD).
Please note that all elements are rendered on the client, that means all referenced resources such as fonts must be locally accessible.
Detailed information on accessing and parametrization the plugin is found in SOFTPRO Capture plugin.
Installation
The b-api modules are included in the folder INSTALL-DIRECTORY-SIGNWARE\b-api\win32. The browser modules are available as a COM object for Internet Explorer, Version 6, 7 and 8 and as a Netscape plugin for Mozilla Firefox, Version 2.x and 3.x.Please note that you will still have to install the proper tablet and scanner drivers as provided by the tablet or scanner manufacturer, see Installation and configuration of various pads.
The scanner functions require the Microsoft gdi-plus modules. Please assure that gdi-plus is installed on the client computers where images are scanned.
Installation for Internet Explorer
The cabinet file ActiveCap.cab includes a COM object in ActiveCap.dll, Microsoft runtime libraries (msvcp71.dll, msvcr71.dll, msvcrt.dll) and Kofax tablet access modules (SP_SoDrv.dll, SP_TzDrv.dll, SwIlUniv.dll, WTablet.dll), see Installation and configuration of various pads. Internet Explorer will download the cabinet file and install the components during the first request to the referenced COM object.The cabinet files instructs the installer to copy ActiveCap.dll into the folder "%WINDIR%\Downloaded Program Files", all other files will be copied into the system32 folder. Finally ActiveCap will be registered (regsvr32 "%WINDIR%\Downloaded Program Files\ActiveCap.dll"). Please follow the above steps if you prefer to manually install the COM objects.
- Note:
- Installation of the COM object requires administrative rights. 'Internet Explorer' must be started as administrator, if the COM object should be installed.
The cabinet file ActiveCap.cab is signed with a Kofax certificate.
Installation for Mozilla Firefox
The package SpCapPlugin.xpi includes the netscape plugin (NpSpCap32.dll) and installation instructions for Firefox.You can automatically install the plugin on its first usage. Firefox will display a window 'Click here to download plugin'. Click this window to invoke the Plugin Finder service, which will respond 'No suitable plugins were found' (the plugin finder service exclusivly checks for plugins that are registered on the Mozilla web page). Click 'Manual Install', open the file SpCapPlugin.xpi with 'Firefox' (you may have to manually select Firefox to open files with the extension '.xpi'). The Firefox Software Installation handler will pop up, confirm installation and restart Firefox.
- Note:
- The Mozilla Firefox extension installer cannot handle system files. The Plugin does not include Microsoft runtime libraries or Kofax tablet access modules. It is recommended to install the Internet Explorer COM object, which includes additional modules, and then install the Mozilla Firefox extension.
The Mozilla Firefox setup installs the extension for the currently logged user, every user will thus have to run the above procedure.
The Mozilla Firefox extension includes a Manifest that is signed with a Kofax certificate.
Manual installation for Mozilla Firefox
Follow these steps to manually install the Mozilla Firefox extension for all users:- log in with administrative rights
- install Microsoft runtime libraries, execute vcredist_x86.exe and / or vcredist_x64.exe in the relative folder "system_software\msshared".
- copy Kofax tablet access modules (SP_SoDrv.dll, SP_TzDrv.dll, SwIlUniv.dll, WTablet.dll) into the system32 folder. Kofax tablet access modules are included in the SignWare package in subfolders of the relative path "drivers".
- copy the Mozilla extension (NpSpCap32.dll) into the MOZILLA_INSTALLATION\Browser\plugins folder (typically "%PROGRAMFILES%\\Mozilla Firefox\\Browser\\plugins"). The file NpSpCap32.dll can be extracted from SpCapPlugin.xpi (copy SpCapPlugin.xpi to SpCapPlugin.zip, then open the compressed file SpCapPlugin.zip and extract NpSpCap32.dll from the local subfolder "platform\WINNT_x86-msvc\plugins".
FAQs Frequently asked questions
Error handling and Debugging
All SignWare b-api functions return an error code in the variable rc as described in the function description (see Kofax Capture plugin).- More detailed information about errors is written into a logfile, if an environment variable SPDEBUG is set to a value in the range 0 .. 5, where 0 does not log any information, while 5 logs most information. The log file is defined by the environment variable SPDEBUGDIR, default is logfile.log. SPDEBUGDIR either points to a directory, in which case the logfile will be named %SPDEBUGDIR%\logfile.log, or points to a file, in which case the logfile will be named %SPDEBUGDIR%.
- No log information is written, if the file logfile.log cannot be created, e. g. if the specified path does not exist.
- Default trace level is 0.
- The logfile will be created, if it does not exist, all logs are appended.
- Always include a logfile with SPDEBUG set to 5, when sending a incident (bug) report to the SignWare contact address.
- The environment variables SPDEBUG and SPDEBUGDIR must be set on the client computer, the logfile will be created on the client computer.
Versions
B-API Version history
Please see ReleaseNotes.html for details on version history.Sample using SignWare B-API
This version supplies one sample to demonstrate usage of SignWare B-API components. It uses PHP to build the desired web contents.The purpose of the sample is to demonstrate usage of the browser plugin. It accesses some SignWare methods via the x-api layer of SignWare.
The sample is split into two core files, which abstract SignWare core objects:
- signware-bapi.php projects SignWare B-API objects as PHP classes
- signware-xapi.php projects SignWare X-API objects as PHP classes
See PHP Sample / PHP API using SignWare B-API for more information.