GdTwain2 Reference

Before starting

To brows this documentation you must have a Java Virtual Machine installed on your computer.
We recommend installing Java 6 or higher from Sun Microsystems' web site.


1. Introduction

GdTwain 2 ActiveX control provides an image acquisition & processing class for Windows application developers. Using Visual Basic, Visual FoxPro, MS Access, Delphi, VB.NET, C#, Visual C++, RealBasic (or another ActiveX-aware development tool), developers can build a custom interface including the capability to acquire image from TWAIN devices (scanners & cameras).
This SDK is based on the GdPicture V5 Technology.


2. Installing & Redistributing the Control

All needed files can be found on the "Redist" folder of the directory where the toolkit has been installed.

• Required files:

You must copy the msvbvm60.dll, gdtwain.dll and the gdtwain2.ocx into c:\%Windows%\System32\ .
Note: gdtwain2.ocx need to be registered on your system by running the folowing command: regsvr32 c:\%Windows%\System32\gdtwain2.ocx

• Optional files:

- If your application runs under windows 98, NT4, ME or 2000 you must copy the gdiplus.dll into c:\%Windows%\System32\ or into your application directory.

- The gdimgplug.dll library can be redistributed in order to increase the speed of image decoding and to extend the supported image formats to jpeg 2000, TGA, EXR, PSP...
You must copy this file into c:\%Windows%\System32\ or into your application directory. You don't need to register this library on your system.

- OCR functions are included in gdocrplug.tesseract.dll. This library is needed if your application includes OCR support.
You must copy this file into c:\%Windows%\System32\ or into your application directory. You don't need to register this library on your system.
Additionally, some files depending of the language of recognition must be accessible.
IE: If your application must recognize english text you have to deploy eng.DangAmbigs, eng.freq-dawg, eng.inttemp, eng.normproto, eng.pffmtable, eng.unicharset, eng.user-words and eng.word-dawg.
Note: Separate licenses are required to use OCR features.

- 1D Barcode Recognition functions are included in gdbarcode.1dreader.dll. This library is needed if your application includes 1D Barcode Recognition support.
You must copy this file into c:\%Windows%\System32\ or into your application directory. You don't need to register this library on your system.

- DataMatrix Barcode Recognition functions are included in gdbarcode.dmreader.dll. This library is needed if your application includes DataMatrix Barcode Recognition support.
You must copy this file into c:\%Windows%\System32\ or into your application directory. You don't need to register this library on your system.



3. Using the Control

This manual assumes that you are familiar with using controls in your development tool.

The GdTwain Control can be instantiated just like any other control. Before using the GdTwain ActiveX you need to add a reference to it within your development tool.

All samples will be given in Visual Basic and usage from other ActiveX-aware development tools is not specifically covered in this manual, but should be similar to the Visual Basic usage.

To add a reference to the GdTwain control in Visual Basic 5 or 6:

• Select the “Components...” command on the “Projects” menu, then check the box next to “GdTwain 2 - TWAIN ActiveX".
Note: If you can't see the GdTwain 2 - TWAIN ActiveX box you can add it by clicking into the "Brows.." button.

To add a reference to the GdTwain control in Visual Studio .NET:

• Right-click into the Toolbox Items and select "Add/Remove Items" for visual studio 2003 or "Choose Items" for visual studio 2005 and visual studio 2008.
• Choose the COM tab and check the classe(s) you want to use: (GdTwain2.Twain).
Note: If you can't see the desired box you can add it by clicking into the "Brows.." button.


4. Class information's

• Component: GdTwain 2 - TWAIN ActiveX

Marked as Safe for Scripting and Initialization: NO
File: gdtwain2.ocx
Class count: 1

Class 1: Twain (Non-Visual Class)
 -> Access string: GdTwain2.Twain
 -> CLSID: {8998A200-6183-4686-BC93-B6AD11154B17}



• Component: GdTwain 2 - TWAIN ActiveX (Safe)

Marked as Safe for Scripting and Initialization: YES
File: gdtwain2s.ocx
Class count: 1

Class 1: Twain (Non-Visual Class)
 -> Access string: GdTwain2S.Twain
 -> CLSID: {A240B805-D70B-4B80-A585-28739B88BD68}





© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.