|
Licensing
If you are developing a clientside application to run on a single server, but distributed to many possible client machines, only a single user licence for TwainControlX is required. This is regardless of how many clients will access the server, or whether the application is running over the internet or a local intranet.
You may wish to run your application on the server, while at the same time maintaining a development system for testing and troubleshooting. This would mean that the software is being used on two computers simultaneously, and for this a 2 user licence is required.
For the control to run on the client machines, it needs to be able to read the licence information normally held in the .LIC file. To enable this, you must create a licence package (.LPK) file which is stored on the server and read by the browser when needed. Microsoft supplies a "License Package Authoring Tool" for this purpose which can be downloaded here.
Adding the Control to a Web Page
TwainControlX is added to the web page by inserting two OBJECT tags into the body of the HTML. See the example page for the details of these tags.
The first OBJECT tag holds the path and name of the .LPK file on the server. This tag includes a 32 character class id. This must never be changed, it is the same class id for every OCX control used in this way.
The second OBJECT tag holds the path and name of the ActiveX control. This can either be the .OCX file, as supplied by Ciansoft, or it can be compressed as a .CAB file. Any suitable file compression utility can be used to produce the .CAB file. This tag includes the 32 character class id of the control. The one used in our example is for the trial version of TwainControlX. If you have purchased the full version, you should replace this class id with "C46A890E-8107-11D8-8671-00C1261173F0".
Scripting
To use the control a suitable scripting language such as Javascript or VBScript must be used. Our example uses Javascript. An id is assigned to the control when it is declared in the second OBJECT tag and this id is used to identify the control object in the script. In our example the id is "tcx1". We have used a button with the onclick event assigned to a Javascript function "rundemo". This function contains the code that acquires and saves the image.
Digitally Signed CAB Files
If you purchase a licence for the full version of TwainControlX, a digitally signed CAB file will be available for download. The digital signature identifies Ciansoft as the control author and guarantees to your users that the control is genuine. We do not provide a signed CAB file for the trial version.
|