Implementing Internet Features

LEADTOOLS offers the following alternatives for Internet support:

image\sqrblit.gif To support your own input stream you can use the LEADTOOLS COM Objects with the methods described in Loading a Bitmap from Your Own Buffer.

image\sqrblit.gif For asynchronous loading through Microsoft Internet Explorer you can use the capabilities described in the remainder of this topic.

Loading a Bitmap over the Internet

The ILEADRasterIO object is a net-aware COM object. This means you can support new image formats and image processing on your web pages by adding the ILEADRasterIO object to your in HTML code. For examples using HTML with Java and VB Script, refer to the EXAMPLES\COM\WEBDEMOS subdirectory.

Use the following elements to manage asynchronous loading of a bitmap from a local file or from an Internet URL. Note that these elements require version 3.01 of the Microsoft Internet Explorer, which is available from http://www.microsoft.com.

BitmapDataPath method

BitmapDataPathWriteCache property

ReadyStateChange event

ReadyState property

Use the AutoSetRects property and its related properties to simplify the display rectangles when loading an image from the Internet.

Note: When using the LEAD RasterView Control on a web page, you should set the OLEDropAllowed property to False (0) in the Unload Event. For example, in VBScript this is done as follows:

Sub Window_OnUnload
     LEADRasterView1.OLEDropAllowed = False
end Sub

Using the LTOCX14.LIC file on the Internet

The LEADTOOLS RasterView Control requires the correct license string in order to load properly. In a development environment, the string is made available to the ActiveX control when the LTOCX14.LIC file is placed in the same directory as the ActiveX control. When creating an executable program, the development environment will extract the correct string from the ActiveX control and place it in the generated code. When the executable code is run, it provides the license string to the control. This allows the executable program to function properly without the LTOCX14.LIC file.

Since you cannot redistribute the LTOCX14.LIC file with HTML script, special handling is required for Internet web page development to insure proper operation. You can unlock support for certain LEADTOOLS features by including the keys in the .LIC file. Edit the LTOCX14.LIC file and append at the end of a line, and on the same line, one or more pairs in the form |L_SUPPORT_xxx=key. The keys that you can specify are :

L_SUPPORT_BARCODES_1D
L_SUPPORT_BARCODES_PDF_READ
L_SUPPORT_BARCODES_PDF_WRITE
L_SUPPORT_BARCODES_DATAMATRIX_READ
L_SUPPORT_BARCODES_DATAMATRIX_WRITE
L_SUPPORT_BITONAL
L_SUPPORT_CMW
L_SUPPORT_DICOM
L_SUPPORT_DIGITALPAINT
L_SUPPORT_DOCUMENT
L_SUPPORT_EXTGRAY
L_SUPPORT_GIFLZW
L_SUPPORT_J2K
L_SUPPORT_MEDICAL
L_SUPPORT_MEDICAL_NET
L_SUPPORT_MEDICAL_SECURITY
L_SUPPORT_MRC
L_SUPPORT_OCR
L_SUPPORT_TIFLZW
L_SUPPORT_VECTOR
L_SUPPORT_VECTOR_ALL
L_SUPPORT_VECTOR_DWF
L_SUPPORT_VECTOR_DWG
L_SUPPORT_VECTOR_DXF
L_SUPPORT_VECTOR_MISC
L_SUPPORT_VECTOR_VIEW

For example, if you wanted to unlock GIFLZW and TIFLZW support, you would include the following at the end of the first line:

|L_SUPPORT_GIFLZW=gifkey|L_SUPPORT_TIFLZW=tifkey

After editing the LTOCX14.LIC file, you must create an LPK file using Microsoft's LPK_TOOL.EXE (Available in the ActiveX SDK from Microsoft at http://www.microsoft.com/intdev/default.htm). This helps generate an encrypted LPK file containing all of the license strings that are required by your script's controls. This allows the use of the ActiveX and certain features in web pages, without putting the license keys in the web page. Microsoft's Internet Explorer only honors one LPK file per page, so you should generate a LPK file including license strings for every control that you intend to use. You should then insert the following into your HTML script:

<object classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
<param name="LPKPath" value="Relative URL path to LPK file">
</object>

Using a Cabinet File

LEADTOOLS provides many cabinet files (\REDIST\COM\CABS) that package the LEADTOOLS COM Objects, File Filter DLLs, and the required code-signing information. You can reference these cabinet file in the CODEBASE attribute of the <OBJECT> tag of your HTML code as shown in the following example:

<object 
   ID="Raster"
   name="Raster"
   classid="CLSID:00140700-B1BA-11CE-ABC6-F5B2E79D9E3F" 
   codebase="controls/Ltr14n.cab">
</object>

For more information about redistribution, refer to Files To Be Included With Your Application.

If you need to create your own cabinet file, refer to MFC 4.2b Component Download Information at http://www.microsoft.com/visualc/download/mfcdnld.htm.