TwainPRO User Assistance Dashboard

Accusoft.TwainPro7.ActiveX
TwainPRO User Assistance Dashboard
Send Feedback

Glossary Item Box

Welcome

  • Overview of Product Family
    • What is the ImagXpress Product Family?
  • New Features
    • What is TwainPRO?

Getting Started

  • Operating Requirements & Installation
    • Operating Requirements
    • Upgrading from TwainPRO 6 to TwainPRO 7
    • Installing on a Development Machine
  • Licensing & Deployment
    • Licensing
    • Distributing TwainPRO
    • Software License Agreement
    • Accusoft Corporation Copyrights & Trademarks

Developer's Guide

  • User Guide

    • Concepts

      • Overview of TWAIN
      • Supported File Formats
      • Glossary
    • How To
      • Select the DSM Version
      • Quick Start - Acquire a TWAIN Image
      • Open a TWAIN Session
      • Negotiate Capabilities
      • Acquire Images and Image Information
      • End a TWAIN Session
      • Debug
  • API Reference Guide
    • Accusoft.TwainPro7.ActiveX.dll

Additional Resources

  • White papers & Case Studies
  • FAQs, TwainPRO 7 FAQs
  • Support Overview
  • Support Plans/Agreement

Feedback

  • Tell us what you think
    • Email us
    • Take our survey

©2012. Accusoft Corporation. All Rights Reserved.


TwainPRO 7 for ActiveX - User Guide

Accusoft.TwainPro7.ActiveX
TwainPRO 7 for ActiveX - User Guide
Send Feedback

Glossary Item Box

This User Guide provides information about the following:

  • Introduction
  • Getting Started
  • Licensing
  • Distributing Applications & Deployment
  • Concepts
  • How To


Introduction

Accusoft.TwainPro7.ActiveX
Introduction
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Introduction

Glossary Item Box

This section provides information about the following:

  • What is TwainPRO?
  • What is the ImagXpress Product Family?
  • Getting Support
  • Accusoft Corporation Copyrights & Trademarks


What is TwainPRO?

Accusoft.TwainPro7.ActiveX
What is TwainPRO?
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Introduction > What is TwainPRO?

Glossary Item Box

TwainPRO™ Version 7 is a windowless control that enables creation of sophisticated TWAIN compliant imaging applications.

The TwainPRO control is designed to communicate with any acquisition device that supplies a standard TWAIN device driver. This includes devices such as flatbed scanners, handheld scanners, and digital cameras.

TwainPRO supports multiple image transfers and is compliant with TWAIN v2.0.

New Features in Version 7

  • Support for retrieving and setting the Data Source Manager version used.
  • The ToHdib() method is provided to more easily pass information to other Accusoft components.
  • Ability to save scanned images in PNG format.
  • Ability to save to a memory handle.
  • Ability to save to a variant.
  • Ability to save tiff images with embedded jpg compression.
  • Return the version/build number programmatically.
  • A new licensing model.

Primary Features

  • TWAIN data source selection and image acquisition
  • Option to select data source and acquire image without TWAIN user interface
  • TWAIN capability negotiation
  • File export including: TIFF, Bitmap, JPEG, PIC and PDF (encoded as TIFF, JBIG2, Sequential JPEG)
  • FTP transfer of file exports

See Also

Software License Agreement
Operating Requirements
Getting Support


What is the ImagXpress Product Family?

Accusoft.TwainPro7.ActiveX
What is the ImagXpress Product Family?
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Introduction > What is the ImagXpress Product Family?

Glossary Item Box

ImagXpress® Version 11 lets you quickly add the world's most trusted imaging functions to your Windows application. With our powerful imaging tools, you can quickly develop applications that require complex imaging tasks for document imaging, photo processing, or medical applications, while you concentrate on the unique needs of your program.

ImagXpress is the image handling engine behind most of our advanced recognition and image processing products. It's the fastest way to develop professional applications involving images.

The ImagXpress v11 Product Family includes the following Components:

  • ImagXpress v11 – image compression, decompression, viewing, and processing
  • NotateXpress™ v11 – image annotation support
  • ThumbnailXpress™ v4 – thumbnail image support
  • TwainPRO™ v7 – TWAIN image acquisition support
  • PrintPRO™ v6 – image printing support

ImagXpress Editions

The components within the ImagXpress v11 Product Family are available in two editions, designed to meet specific imaging needs:

  • Professional: includes ImagXpress, NotateXpress, TwainPRO, PrintPRO, and ThumbnailXpress
  • Standard: includes ImagXpress, TwainPRO, and ThumbnailXpress

Additional Accusoft Components

Additional components are available for purchase separately, and integrate easily to provide a comprehensive imaging solution:

  • ISIS® Xpress™ – ISIS image acquisition support; license sold separately
  • PDF Xpress™ – PDF creation, viewing, and annotating
  • OCR Xpress™ – full page OCR
  • Barcode Xpress™ – recognize barcodes
  • ScanFix Xpress™ – advanced image cleanup
  • FormFix™ – form ID, dropout, and OMR
  • SmartZone™ ICR / OCR – character recognition
  • ImageGear for .NET - Fully managed code to create cutting edge imaging applications
  • ImageGear for Silverlight - Comprehensive SDK for building Web imaging applications
  • ImageGear for .NET Compact Framework - Create reliable and secure imaging applications for mobile devices

See www.accusoft.com for product packaging and sales information.

See Also

Getting Support
Software License Agreement
Operating Requirements


Getting Support

Accusoft.TwainPro7.ActiveX
Getting Support
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Introduction > Getting Support

Glossary Item Box

For information about Accusoft Support, please refer to the Software Support and Maintenance Policy on the Accusoft web site or call Accusoft at 813-875-7575.

See Also

Operating Requirements
Installing on a Development Machine


Accusoft Corporation Copyrights & Trademarks

Accusoft.TwainPro7.ActiveX
Accusoft Corporation Copyrights & Trademarks
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Introduction > Accusoft Corporation Copyrights & Trademarks

Glossary Item Box

©1997-2012 Accusoft Corporation. All rights reserved.

Information in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Accusoft® Corporation.

This manual and the software described in it are both products of the USA.

Accusoft Corporation
4001 North Riverside Drive
Tampa, FL 33603
Sales: 813-875-7575
www.accusoft.com

Accusoft Trademarks

The following are trademarks (™) or registered marks (®) of Accusoft Corporation:

  • Accusoft®
  • Accusoft Logo™
  • Accusoft Pegasus Logo™
  • Adeptol®
  • AIMTools™
  • Barcode Xpress™
  • CapturePro™
  • Digital Mark Recognition® (DMR)
  • FolderBots™
  • FormAssist™
  • FormDirector™
  • FormFix™
  • FormSuite™
  • ImageGear® for .NET
  • ImageGear® for .NET Compact Framework
  • ImageGear® for Silverlight
  • ImageGear® Medical
  • ImageGear® Professional
  • ImageGear®
  • ImageTransport MD™
  • ImagXpress®
  • ISIS® Xpress™
    • ISIS is a registered trademark of EMC Corporation
    • ISIS Xpress is a trademark of Accusoft Corporation
  • MICR Xpress™
  • NetVue™
  • NotateXpress™
  • PDF Xpress™
  • Pegasus®
  • PICTools™
  • PICTools™ Document
  • PICTools™ Fingerprint
  • PICTools™ Medical
  • PICTools™ Photo
  • PICVideo™ M-JPEG Codec
  • PrintPRO™
  • Prizm®
  • Prizm® Viewer
  • ScanFix® Xpress™
  • SmartZone™
  • The JPEG Wizard™
  • ThumbnailXpress™
  • TwainPRO™

Accusoft and/or its agents use these marks and brand names in connection with its goods and/or services, in the United States and other countries.

Microsoft, Internet Explorer, Microsoft.NET, Silverlight, Visual Basic, Visual Studio, and Visual Studio.NET are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Itanium is a registered trademark of Intel Corporation in the United States and other countries.

All other product and brand names are the property of their respective owners.


Getting Started

Accusoft.TwainPro7.ActiveX
Getting Started
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started

Glossary Item Box

This section provides information about the following:

  • Operating Requirements
  • Using Accusoft 64-bit ActiveX Components
  • Installing on a Development Machine
  • Importing TwainPRO as a COM Object
  • Handling Events with the TwainPRO COM Object
  • Using TwainPRO as an ActiveX Control
  • Upgrading from TwainPRO 6 to TwainPRO 7


Operating Requirements

Accusoft.TwainPro7.ActiveX
Operating Requirements
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started > Operating Requirements

Glossary Item Box

Operating Systems

TwainPRO™ runs on 32-bit and 64-bit Microsoft Windows operating systems:

  • Windows XP, XP Professional
  • Windows Vista
  • Windows 7
  • Windows Server 2003
  • Windows Server 2008

TwainPro runs in 64-bit and 32-bit executables.

Although it may run, it is not supported on previous Windows versions (for example, Windows 2000).

Threading

Accusoft considers thread-safe to be when an application using this component can use multiple controls running in the same process, where they don't interfere with each other. The thread creating the control owns the control and is the only thread that can interact with it.

Development Environment

  • Microsoft Visual Basic 6
  • Microsoft Visual C++ 6 or higher
  • Any other development environment that supports ActiveX/COM

See Also

Getting Support
Installing on a Development Machine


Using Accusoft 64-bit ActiveX Components

Accusoft.TwainPro7.ActiveX
Using Accusoft 64-bit ActiveX Components
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started > Using Accusoft 64-bit ActiveX Components

Glossary Item Box

Accusoft 64-bit ActiveX components are built for maximum compatibility with our 32-bit ActiveX counterparts, providing the customer ease of upgrading an existing 32-bit application.
The primary development platforms that we tested are Visual Studio C++, VBScript, JavaScript, C#, and VB.Net.

Upon inspection of these controls, you will notice that filenames will end in ActiveX for traditional 32-bit ActiveX controls or end in ActiveX64 for newer 64-bit ActiveX controls. If you use a tool such as OLEView, you will notice that when the control is registered they share the same GUID which allows the operating system ease of automatic selection.

Visual Studio is still a 32-bit development environment. The Accusoft installer will automatically place the 32-bit versions of the ActiveX in the toolbox. Since the components share the same interface and the same GUID, you can use all the ease of the Visual Studio development environment and still have all the power of 64-bit under the hood.

C++

When developing a C++ application you can #import in the progid, and compile targeting either Win64 or Win32. While progid is the recommended approach, if you #import by filename, we suggest you use the Sysnative redirector instead of the System32 directory as Visual Studio may get confused.

When creating a C++ dialog application, you can “Insert ActiveX Control…” onto the dialog. You will be presented with a dialog showing all the registered 32-bit controls. Select the desired ActiveX from the dialog. The second step of “Add Variable…” will automatically create accusoftcontrol1.h and accusoftcontrol1.cpp files that are compatible in both Win32 and Win64. The compiler will automatically use the correct version of the ActiveX based on the targeted platform.

Scripting

When using a scripting environment such as VBScript and JavaScript, the ActiveX controls will be able to seamlessly run under both Internet Explorer 32-bit and Internet Explorer 64-bit. Just code your HTML as you always have. Register both ActiveX and ActiveX64 on the target machine. You will be able to run under either the 32-bit or 64-bit version of Internet Explorer.

.Net

When creating a .Net AnyCPU application, you can import the ActiveX controls and have the application automatically switch if you are on a 32 or 64-bit machine. Just drag and drop the ActiveX control on your form as normal. Make sure the application is set for AnyCPU. Register both ActiveX and ActiveX64 on the target machine. The application will run as native code on any 32-bit or 64-bit machine (except Itanium).

If your application will only run on 64-bit machines, you can set the application to target x64, and only distribute the ActiveX64.

Handles

All handles are treated as 32-bit values. This creates full compatibility between all Accusoft controls, freeing the developer from worrying about what bit depth they are running in. If you use a third party control that has 64-bit handles, it is mandatory that you use the Microsoft provided LongToHandle and HandleToLong macros.


Installing on a Development Machine

Accusoft.TwainPro7.ActiveX
Installing on a Development Machine
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started > Installing on a Development Machine

Glossary Item Box

To Install TwainPRO™ Component

Run the downloaded setup program which installs the development kit on your development machine.

The downloaded development kit includes code samples for supported platforms. Samples are available through the Start | Programs | Accusoft | TwainPRO 7 menu.

By default this will register trial licensing which allows you to develop applications but not to distribute them. The trial license allows testing of all the functions and features.

Please see the section Distributing TwainPRO to understand the limits and details to convert licensing editions.
In order to distribute your finished application you must purchase and install a fully paid license from Accusoft. The paid licenses override trial licenses.

To Use TwainPRO Help Files

Once you have installed ImagXpress, you will have access to the following stand-alone help file:

  • Accusoft.TwainPro7.ActiveX.chm

    The stand-alone file is created with MS Help system version 1. To view stand-alone help files, you must have:

See Also

Operating Requirements
Software License Agreement
Distributing TwainPRO

Licensing
Licensing


Importing TwainPRO as a COM Object

Accusoft.TwainPro7.ActiveX
Importing TwainPRO as a COM Object
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started > Importing TwainPRO as a COM Object

Glossary Item Box

TwainPRO provides the dual interface necessary to import a component as a COM object. The following technique illustrates how to use TwainPRO as an imported COM object in Visual C++. References will be made to files in the TwainPRO Visual C++ sample, twnpro.dsw, and the pertinent statements are shown in boldface.

1. Import a Control into Visual C++

The #import directive line can be added to the stdafx.h file to provide the appropriate functionality to all source files in the project.

C++ Example Copy Code
#include "TwainPro7Events.h"
// CTwnPRODlg dialog
class CTwnPRODlg : public CDialog, CTwnPROEventHandler
{
// Construction
public:
CTwnPRODlg(CWnd* pParent = NULL); // standard constructor
// this will be the pointer to our COM instance
CTwainPRO *ppCTwainPRO;
ITwainPROPtr pTwainPRO;

2. Initialize COM

You need to initialize the COM library before you can call COM functions. Also, you need to close the COM library and delete the TwainPRO COM object when your program ends. This is illustrated in the TwnPRO.cpp file as follows:

C++ Example Copy Code
// This code demonstrates how the COM library must be initialized

// Initialize the COM library on the current apartment and
// identify the currency model as single-thread apartment (STA).
// Applications must initialize the COM library before they
// can call COM library functions other than CoGetMalloc and
// memory allocation functions.
CoInitialize(NULL);
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
CTwnPRODlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Closes the COM library on the current apartment,
// unloads all DLLs loaded by apartment,
// frees any other resources that the apartment maintains, and
// forces all RPC connections on the apartment to close.
CoUninitialize();
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;

3. Create the TwainPRO COM Object

You need to create an instance of the TwainPRO COM object. In the TwnPRO project, the COM object is created in the OnInitDialog function in the TwnPRODlg.cpp file. After creating the object, the first thing that must be done is to set the hParentWnd property. This tells the TwainPRO object what window to use as a parent. If this property is not set, the Twain device will not function correctly. Normally, this is handled by the container, but when #importing a control, there is no container. If you want to handle events fired from the TwainPRO object, you will have to create a sink. This is also done in the OnInitDialog function. The relevant portions of the OnInitDialog are as follows:

C++ Example Copy Code
// This code demonstrates how the TwainPRO COM object is created
BOOL CTwnPRODlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Open TwainPRO Initialization
// Set the icon for this dialog. The framework does
// this automatically when the application's main window
// is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// Create a TwainPRO object
ppCTwainPRO = new CTwainPRO(this, 1);
pTwainPRO = ppCTwainPRO->pTwainPRO;
// Set the application window handle to TwainPRO.
// This property was added specifically for creating
// TwainPRO in-proc and the control will not work
// unless this property is set with the application's
// window handle.
pTwainPRO->hParentWnd = HandleToLong(m_hWnd);
// Set up the PostScan event Handler
ppCTwainPRO->SetPostScanEvent(PostScan);
// Must close the initialization AFTER the first
// instance of the TwainPRO control is created
return TRUE; // return TRUE unless you set the focus to a control
}
// Create an in-proc instance of the COM object inside our ActiveX

When creating a new TwainPRO object, you must pass the following parameters:

  • LPVOID classPtr - The Dialog's this pointer.
  • DWORD objID - A unique object ID that you assign to the object’s instance. This ID can be used in event handling to determine which instance of an object has triggered the event.

4. Use the TwainPRO COM Object to Set Properties and Call Methods

After an instance of the TwainPRO COM object is created, the object can be used to set TwainPRO properties and call TwainPRO methods.

C++ Example Copy Code
// This code demonstrates the property used to show the scanner's user interface and the method used to start a TWAIN session

pTwainPRO->ShowUI = true;
pTwainPRO->StartSession();

5. Delete the TwainPRO COM Object

The TwainPRO COM object must be deleted when it is no longer needed. The object is usually deleted before the application exits. In the TwainPRO sample, this is done in the OnDestroy message handler as follows:

C++ Example Copy Code
// This code demonstrates how to delete the TwainPRO COM object
void CTwnPRODlg::OnDestroy()
{
CDialog::OnDestroy();
pTwainPRO = NULL;
if (ppCTwainPRO)
{
delete ppCTwainPRO;
}
}


Handling Events with the TwainPRO COM Object

Accusoft.TwainPro7.ActiveX
Handling Events with the TwainPRO COM Object
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started > Handling Events with the TwainPRO COM Object

Glossary Item Box

The TwainPRO sample demonstrates how to handle events with the TwainPRO COM object.

The Event handler prototypes are located in TwainPro7Events.h in the private section of the CTwainPRO class. The Event handler parameters contain a DWORD instance pointer and a DWORD object ID followed by the same parameter list as the corresponding ActiveX event.

The following tutorial demonstrates adding a PostScan event to the TwainPRO sample.

1. Add the Event Handler Prototype to TwnPRODlg.h

C++ Example Copy Code
// This code demonstrates how to use the static keyword when defining the event handler
class CTwnPRODlg : public CDialog
{
static HRESULT PostScan(void* instancePtr, DWORD objID, VARIANT_BOOL Cancel);

2. After Creating the Objects in TwnPRODlg.cpp, Set the PostScan Event to the Function Name PostScan

C++ Example Copy Code
// This code demonstrates how to create a TwainPRO object
ppCTwainPRO = new CTwainPRO(this, 1);
pTwainPRO = ppCTwainPRO->pTwainPRO;
// Set the application window handle to TwainPRO.
// This property was added specifically for creating
// TwainPRO in-proc and the control will not work
// unless this property is set with the application's
// window handle.
pTwainPRO->PuthParentWnd(HandleToLong(m_hWnd));
// Set up the PostScan event handler
ppCTwainPRO->SetPostScanEvent(PostScan);

3. Implement the Event Handler

The first line in the event handler typecasts the instance pointer to a CTwnPRODlg class pointer in order to gain access to the objects on the dialog.

The Object ID is the object ID that is passed as the second parameter when a new TwainPRO object is created. If there are multiple TwainPRO objects, use the Object ID to determine which object generated the event.

C++ Example Copy Code
// This code demonstrates how to implement an event handler
HRESULT CTwnPRODlg::PostScan
(
void* instancePtr,
DWORD ObjID,
VARIANT_BOOL Cancel
)
{
CTwnPRODlg *p = (CTwnPRODlg *) instancePtr;
char buf[_MAX_PATH];
p->GetDlgItemText(IDC_FILENAME, buf, _MAX_PATH);
p->pTwainPRO->SaveFile(buf);
return S_OK;
}

See Also

PostScan Event


Using TwainPRO as an ActiveX Control

Accusoft.TwainPro7.ActiveX
Using TwainPRO as an ActiveX Control
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started > Using TwainPRO as an ActiveX Control

Glossary Item Box

TwainPRO can be used as an ATL COM ActiveX control in development environments, like Visual Basic, that accept ActiveX controls. The following discussion assumes that your development environment is Visual Basic.

Creating an Application with Visual Basic and TwainPRO

  1. Add the TwainPRO control to a project.
  2. Use the TwainPRO control on a form.
  3. Write code that controls the TwainPRO properties and methods.

Loading the TwainPRO Control Involves Adding it to a Project

  1. Open the project that will use the TwainPRO control. This can be a new or existing project.
  2. From the Project menu, choose Components. The Control window appears with a list of available controls.
  3. Select the Accusoft control (i.e. TwainPRO). Click the OK button.

Other Environments

The TwainPRO control is supported by a variety of host environments. To use TwainPRO in other environments, consult the development tool's documentation for information on how to use ActiveX controls. As soon as the control is loaded, the following things happen:

  1. The control becomes part of the current project.
  2. A new tool is added to the Toolbox. This tool is used to draw the TwainPRO control on the form.

The new control can now be used as if it were a standard control. The TwainPRO control has its own set of properties and methods which can be seen by using the Properties and Code windows.


Upgrading from TwainPRO 6 to TwainPRO 7

Accusoft.TwainPro7.ActiveX
Upgrading from TwainPRO 6 to TwainPRO 7
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started > Upgrading from TwainPRO 6 to TwainPRO 7

Glossary Item Box

This section describes how to upgrade from TwainPro 6 to TwainPro 7. While generally you'll be able to replace TwainPro 6 with TwainPro 7, there are a few important changes you may need to consider. This section provides information about those changes.

Library Name, GUID, and ProgID

  • The library name has changed from AccusoftTwainPro6 to AccusoftTwainPro7.
  • The GUID for the TwainPro ActiveX control has changed in TwainPro 6 from {5BF29F4C-DED9-4171-91F5-3CAE286ADCE0} to the new value in TwainPro 7 of {7482FEFA-931C-4a64-8276-9DC307C56844}.
  • The ProgID has changed from ‘Accusoft.TwainPro.6’ to ‘Accusoft.TwainPro.7’ in TwainPro 7.

Changes and New Properties/Methods

  • Added the DataSourceManagerVersion property. The default value of TP_DataSourceManager_LatestSupportedVersionAvailable means that TwainPro will attempt to load the latest available Twain DSM (Data Source Manager), if that fails, it will load the older version automatically. Or you can specify to load only the TWAIN 2.x DSM or only the TWAIN 1.x DSM. In the prior release of Twain Pro (v6), it only loaded the TWAIN 2.x DSM and failed if not found. The TWAIN DSM can be downloaded from http://www.twain.org.
  • Added the DataSourceManagerVersionInUse property to the TwainPro object.
  • Added the ability to save the scanned image to the PNG format along with PNG save options.
  • Added SaveToFile() method, which allows the user to save the TwainPro-compressed image to a file.
  • Added SaveToHandle() method, which allows the user to save the TwainPro-compressed image to a memory handle.
  • Added SaveToVariant() method, which allows the user to save the TwainPro-compressed image to a variant.
  • Added SaveSourceCompressedImageToHandle() method, which allows a user to save the Source-compressed image to a handle.
  • Added SaveSourceCompressedImageToVariant() method, which allows a user to save the Source-compressed image to a variant.
  • Added SaveSourceCompressedImageToFile() method, which allows a user to save the Source-compressed image to a file.
  • Added ToHdib() method, which allows the user to save the image to an Hdib.
  • Added GetExtendedImageInfo() method.
  • Added TP_SaveTIFFCompressionType_JPEG7.
  • Added CapStepOut to allow setting the Step value of a TWCAP_RANGE container type.
  • Added Version property.
  • Added the following properties to support the capability ICAP_FRAMES: CapFrameLeft, CapFrameTop, CapFrameRight, CapFrameBottom, CapDefaultFrameLeft, CapDefaultFrameTop, CapDefaultFrameRight, CapDefaultFrameBottom, CapItemFrameLeft, CapItemFrameTop, CapItemFrameRight, CapItemFrameBottom, CapFrameLeftOut, CapFrameTopOut, CapFrameRightOut, CapFrameBottomOut, CapItemFrameLeftOut, CapItemFrameTopOut, CapItemFrameRightOut, CapItemFrameBottomOut, CapNumFrameItemsOut.
  • Added Accusoft's new licensing structure to the ImagXpress 11 Product Family. See Licensing for information about the new licensing, and Upgrading Runtime Licensing for information about updating your licensing from an earlier version of TwainPRO.

If you encounter any porting issues, please contact support@accusoft.com for assistance.


Upgrading Runtime Licensing

Accusoft.TwainPro7.ActiveX
Upgrading Runtime Licensing
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Getting Started > Upgrading Runtime Licensing

Glossary Item Box

This section describes how to upgrade to Accusoft's new Runtime Licensing.

Prior to TwainPRO 7, runtime licensing was accomplished using the UnlockRuntime method.

In TwainPRO 7, the default licensing model is Automatically Reported Runtime Licensing. However, based on your contracted usage of this software, you may be eligible for Manually Reported Runtime Licensing. Your Accusoft Sales Representative (sales@accusoft.com) can help you determine which model is appropriate.

Refer to the following sections for information about upgrading to the new Runtime Licensing models:

  • Upgrading to Automatically Reported Runtime Licensing
  • Upgrading to Manually Reported Runtime Licensing

Upgrading to Automatically Reported Runtime Licensing

Automatically Reported Runtime Licensing requires a license to be installed on the end-user's machine. See the Licensing section for more information.

In your TwainPRO 6 codebase, find any existing calls to the UnlockRuntime or UnlockWeb method.

C++ Copy Code
 TwainPro1->UnlockRuntime(12345,12345,12345,12345);
VB6 Copy Code
 TwainPro1.UnlockRuntime 12345,12345,12345,12345
JavaScript Copy Code
TwainPro1.UnlockWeb("ServerLicenseString…");

In your TwainPRO 7 codebase, replace the UnlockRuntime or UnlockWeb method with calls to the SetSolutionName and SetSolutionKey methods.

C++ Copy Code
 TwainPro1->SetSolutionName("YourSolutionName");
 TwainPro1->SetSolutionKey(12345,12345,12345,12345);
VB6 Copy Code
 TwainPro1.SetSolutionName "YourSolutionName"
 TwainPro1.SetSolutionKey 12345,12345,12345,12345
JavaScript Copy Code
TwainPro1.SetSolutionName("YourSolutionName");
TwainPro1.SetSolutionKey(12345,12345,12345,12345);

Upgrading to Manually Reported Runtime Licensing

In your TwainPRO 6 codebase, find any existing calls to the UnlockRuntime or UnlockWeb method.

C++ Copy Code
 TwainPro1->UnlockRuntime(12345,12345,12345,12345);
VB6 Copy Code
 TwainPro1.UnlockRuntime 12345,12345,12345,12345
JavaScript Copy Code
TwainPro1.UnlockWeb("ServerLicenseString…");

In your TwainPRO 7 codebase, replace the UnlockRuntime or UnlockWeb method with calls to the SetSolutionName, SetSolutionKey, and SetOEMLicenseKey methods.

C++ Copy Code
 TwainPro1->SetSolutionName("YourSolutionName");
 TwainPro1->SetSolutionKey(12345,12345,12345,12345);
 TwainPro1->SetOEMLicenseKey("1.0.AStringForOEMLicensing…");
VB6 Copy Code
 TwainPro1.SetSolutionName "YourSolutionName"
 TwainPro1.SetSolutionKey 12345,12345,12345,12345
 TwainPro1.SetOEMLicenseKey "1.0.AStringForOEMLicensing…"
JavaScript Copy Code
TwainPro1.SetSolutionName("YourSolutionName");
TwainPro1.SetSolutionKey(12345,12345,12345,12345);
TwainPro1.SetOEMLicenseKey("1.0.AStringForOEMLicensing…");

There is no longer a separate method for web licensing. That functionality has been integrated into the SetOEMLicenseKey method.

If you encounter any porting issues, please contact support@accusoft.com for assistance.


Licensing

Accusoft.TwainPro7.ActiveX
Licensing
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing

Glossary Item Box

Accusoft has introduced a new licensing structure, which provides the following benefits:

  • Toolkit Licensing (also known as Developer or SDK licensing) has been simplified, no longer requiring manual entry of license registration codes.
  • Runtime Licensing (also known as Deployment licensing) has been made more flexible, enabling support for a number of different deployment scenarios.

During evaluation of Accusoft products, Evaluation Toolkit licenses can be used to try out products. However, the product behavior is limited by trial dialog pop-ups or timeouts.

Accusoft requires customers to purchase licenses for both development and deployment.

  • Development/Toolkit Licensing: When you determine the product is a good fit, you can purchase a Toolkit license to eliminate trial dialog pop-ups and timeouts while you develop your application.
  • Deployment/Runtime Licensing: Once you have an application that is ready for distribution, you have several options for deployment. Your own deployment scenario will dictate which option is the most appropriate. There are also cost considerations for each licensing model; see the product's "pricing" page or speak with an Accusoft Sales Representative (sales@accusoft.com) for more information.
    • Manually Reported Runtime Licensing: In this model, you embed all of the licensing information directly into your application. You must manually provide royalty reporting to Accusoft for the actual licenses deployed. This model will be the best choice for you if you are not connected to the Internet at runtime, as might be the case in an defense or financial application.
    • Automatically Reported Runtime Licensing using the Server Licensing Utility (SLU): In this model, you run a small GUI tool one time on each deployment target to configure licensing. This model will be the best choice for you if you handle the deployments yourself.
    • Automatically Reported Runtime Licensing using the Licensing Development Kit (LDK): In this model, you embed function calls into your application that perform the license verification at runtime. This model will be the best choice for you if you wish to hide licensing from your end users.

See Also

Licensing Glossary


Evaluation Licensing

Accusoft.TwainPro7.ActiveX
Evaluation Licensing
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Evaluation Licensing

Glossary Item Box

During evaluation of Accusoft products, Evaluation Toolkit licenses can be used to try out products. However, the product behavior is limited by trial dialog pop-ups or timeouts. When you determine the product is a good fit, you can purchase a Toolkit license to eliminate trial dialog pop-ups and timeouts.

An evaluation dialog similar to the following is displayed when you have a valid evaluation license.

However, if you attempt to execute a function that is not licensed in the edition license you are using (e.g., if you have a paid license for ImagXpress Standard and attempt to execute a function available only in ImagXpress Professional), an evaluation dialog similar to the following is displayed.

If no license is found in the registry, a dialog similar to the following will be displayed.


Toolkit Licensing

Accusoft.TwainPro7.ActiveX
Toolkit Licensing
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Toolkit Licensing

Glossary Item Box

Accusoft requires customers who are developing code that uses Accusoft components to have a Toolkit license for each developer.

This section provides information about the following:

  • Assigned Toolkit License
  • License Manager
  • Product Editions
  • Registration
    • Registering When Connected to the Internet
    • Registering When Disconnected from the Internet
  • Developing Code


Assigned Toolkit License

Accusoft.TwainPro7.ActiveX
Assigned Toolkit License
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Toolkit Licensing > Assigned Toolkit License

Glossary Item Box

When licenses are purchased for developers at an organization, a representative is designated to assign the licenses to developers at the organization. Each developer must create an account on Accusoft’s website prior to the assignment of licenses. The organization’s designated representative may request that licenses be reassigned as a result of personnel changes.


License Manager

Accusoft.TwainPro7.ActiveX
License Manager
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Toolkit Licensing > License Manager

Glossary Item Box

The License Manager is a GUI application that is used by a developer to register and activate Toolkit licenses on their development system. When a paid Toolkit license is registered, the License Manager:

  • Communicates the developer credentials and the hardware information for the development system to the licensing web service.
  • Installs the returned license key on that system.

Activation involves choosing a Toolkit license, either evaluation or paid, so that the license is active on the system.


Product Editions

Accusoft.TwainPro7.ActiveX
Product Editions
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Toolkit Licensing > Product Editions

Glossary Item Box

Accusoft products may have multiple editions, each of which supports different features. Products that support multiple editions are installed with multiple evaluation Toolkit licenses, one evaluation Toolkit license per edition.

Selecting An Edition (Activating a Toolkit License)

Evaluation licenses allow developers to try features in different product editions. Since each license supports only a single edition of a product, the developer can switch between editions by activating the corresponding Toolkit license, either purchased or evaluation, using the License Manager.

When a customer downloads an evaluation Toolkit, the evaluation Toolkit license for the edition with the most features is installed by default. However, the developer may run the License Manager to change the Toolkit license to a lower edition in order to determine if that edition will serve their needs.

If a customer has purchased multiple editions of the same product, they may install both editions on a development system, but only one edition may be active at a time. Once a license has been activated for a particular system, it may be deactivated (replaced by activating another edition) or reactivated at any time. Similarly, customers who own a lower featured edition may activate a higher featured edition evaluation Toolkit license and then switch back to their paid, lower-featured Toolkit edition license at any time. For example, you can go from a paid Standard edition to an evaluation Professional edition by activating the Professional edition evaluation Toolkit license.


Registration

Accusoft.TwainPro7.ActiveX
Registration
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Toolkit Licensing > Registration

Glossary Item Box

Registration is the process of creating a paid Toolkit license key for a particular system. Registration for Toolkit licenses is always done through the License Manager. This enables the features for the purchased edition to operate without nag dialogs or timeouts. Registration for each license is only required to be performed once per development system. After a license has been registered on a system, you can use the license without further interaction with the License Manager.

Also refer to the following sections:

  • Registering When Connected to the Internet
  • Registering When Disconnected from the Internet


Registering When Connected to the Internet

Accusoft.TwainPro7.ActiveX
Registering When Connected to the Internet
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Toolkit Licensing > Registration > Registering When Connected to the Internet

Glossary Item Box

When the development system is connected to the Internet, registration is a fairly simple process.

  1. Start the License Manager.
  2. When prompted, enter your Accusoft login and password.

    The License Manager then displays the available evaluation and purchased licenses assigned to you.

  3. Select a toolkit and click the link to activate the license for that toolkit.

    The License Manager then requests a new license key from the licensing web service and installs it; this completes the registration process.

    If the selected license cannot be installed on the development system due to connection failures or other reasons, a temporary, 15 day "grace" license is installed so as not to interrupt development while a new license is obtained for the development system.


Registering When Disconnected from the Internet

Accusoft.TwainPro7.ActiveX
Registering When Disconnected from the Internet
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Toolkit Licensing > Registration > Registering When Disconnected from the Internet

Glossary Item Box

When the development system is not connected to the Internet during registration, as is the case in some defense or financial institutions, registration is only slightly less simple.

  1. Run the License Manager and attempt to log in.
    The License Manager detects that the system is not registered and displays the following dialog:

  2. Select the Install Offline option to begin the offline registration process.

  3. Copy the URL to removable media, such as a thumb drive.

  4. Take the thumb drive to a system that is connected to the Internet.
  5. From the connected system, paste the URL into a browser, which automatically displays the toolkits available.
  6. Upon selecting a toolkit, a license is generated, which you then save to the removable media device.
  7. Return to the offline system where the new license is to be installed.
  8. Use the License Manager to browse to the file and install the Toolkit license.


Developing Code

Accusoft.TwainPro7.ActiveX
Developing Code
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Toolkit Licensing > Developing Code

Glossary Item Box

Once an evaluation or paid Toolkit license has been activated on the development system, no additional code is required to use the Accusoft products on this system. If moving the resulting executable code to a new system, you will need to install Toolkit licenses or incorporate Runtime licenses into your code.


Runtime Licensing

Accusoft.TwainPro7.ActiveX
Runtime Licensing
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing

Glossary Item Box

When an application that uses one or more Accusoft products is deployed, it requires a Runtime License for each installation. There are two main types of Runtime Licenses:

  • Automatically Reported. Distribution of Automatically Reported Runtime licenses is handled automatically through the use of licensing software components and web services.
  • Manually Reported. Manually Reported Runtime licensing requires you to provide the number of licenses distributed on a contractually agreed upon basis.
  • ActiveX Website Runtime Licensing. Using an Accusoft ActiveX on a webpage is similar to Manually Reported Runtime (Non-Node-Locked), as it requires calls to SetSolutionName, SetSolutionKey, and SetOEMLicenseKey. However, the web licenses are not node-locked to particular hardware but are node-locked to a set of specific domains or sub-domains.

These licensing types are each described in detail in the following sections:

  • Automatically Reported Runtime (Node-Locked)
    • Licensing API
    • License Pools
    • License Configuration Files
    • LDK vs. SLU
      • Server Licensing Utility (SLU)
      • Licensing Development Kit (LDK)
    • Deployment Proxy Service (DPS)
  • Manually Reported Runtime (Non-Node-Locked)
    • Solution Name
    • Solution Key
    • OEM License Key
  • ActiveX Website Runtime Licensing
If you are upgrading from an earlier version of TwainPRO, please see the Upgrading Runtime Licensing section for important information.


Automatically Reported Runtime (Node-Locked)

Accusoft.TwainPro7.ActiveX
Automatically Reported Runtime (Node-Locked)
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked)

Glossary Item Box

Automatically Reported Runtime licenses use a mechanism similar to Toolkit licensing to activate a license for a particular system. In this case, each installation has a unique license that is pulled from the pool of licenses purchased by the customer. When the license key is generated, it contains hardware information that identifies the system on which the license is to be installed.

The Licensing Development Kit component, which interacts with the licensing web service and installs the newly generated license key, may be used directly by the application or it may be used through a simple tool known as the Server Licensing Utility.

  • The Licensing Development Kit requires integration with the application or installation utility to perform license activation.
  • The Server Licensing Utility is a stand-alone application that integrates the Licensing Development Kit to perform the registration.

This topic provides information about the following:

  • Licensing API
  • License Pools
  • License Configuration Files
  • LDK vs. SLU
    • Server Licensing Utility (SLU)
    • Licensing Development Kit (LDK)
  • Deployment Proxy Service (DPS)


Licensing API

Accusoft.TwainPro7.ActiveX
Licensing API
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked) > Licensing API

Glossary Item Box

The Licensing API is used in the developer’s code to specify Runtime Licensing deployment information. This is used to unlock the Accusoft products and enable all licensed features at runtime. Both the "Solution Name" and "Solution Key" values used in the API described below are provided by Accusoft, along with the License Configuration file, at the time of purchase of a Runtime License.

Solution Name

The solution name is the name assigned by Accusoft to the licenses purchased for runtime deployment. It is a character string that is set for a component prior to use in a deployment environment and is typically the name of the organization that purchased the runtime licenses. It is set via the SetSolutionName method. For example:

Copy Code
TwainPro1.SetSolutionName("ACMEImaging");

The Solution Name must be set in order to use runtime licensing.

Solution Key

The Solution Key is a set of four numbers assigned when the licenses are purchased for runtime deployment; the Solution Key also identifies the organization that purchased the runtime licenses. The Solution Key is set via the SetSolutionKey method. For example:

Copy Code
TwainPro1.SetSolutionName("ACMEImaging");
TwainPro1.SetSolutionKey(0x1C3A023F, 0xA018F260, 0x37AF0E51, 0x557F2389);

The Solution Key must be set in order to use runtime licensing.


License Pools

Accusoft.TwainPro7.ActiveX
License Pools
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked) > License Pools

Glossary Item Box

When Automatically Reported Runtime licenses are purchased, they are organized into pools of a specific version and platform for a particular toolkit. For example, if a customer developed two applications using ImagXpress, one using 32-bit ActiveX and the other using .NET, they would purchase two pools of runtime licenses, one for the ActiveX platform and one for the .NET platform. At installation, a new license would be pulled from the appropriate pool, depending upon which platform the application is using.


License Configuration Files

Accusoft.TwainPro7.ActiveX
License Configuration Files
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked) > License Configuration Files

Glossary Item Box

When an Automatically Reported Runtime license is purchased, a License Configuration file is created and distributed to the customer along with their assigned Solution Name and Solution Key. The License Configuration file contains information about the Runtime licenses for a particular platform and version of a toolkit. It is used by the Server Licensing Utility or License Development Kit to activate licenses when the customer’s application is installed on their users' systems.

See Also

Licensing API


LDK vs. SLU

Accusoft.TwainPro7.ActiveX
LDK vs. SLU
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked) > LDK vs. SLU

Glossary Item Box

Both the Licensing Deployment Kit and the Server Licensing Utility perform the same function of registering the Runtime license for the system on which it will be run. Both are provided in order to give you some options.

  • If you are deploying to your own systems (e.g., for enterprise IT staff), the use of an Accusoft branded Server Licensing Utility may meet your needs. Similarly, if you handle the deployment onto end users systems, you may also find the Server Licensing Utility to be sufficient.
  • If you wish to hide this licensing registration from end users, you will likely choose the Licensing Deployment Kit, which allows you to integrate the registration process into your application. The Licensing Deployment Kit also allows for the optional assignment of Access Keys to specific users, which lets you manage your licenses more directly and limits the distribution of licenses.


Server Licensing Utility (SLU)

Accusoft.TwainPro7.ActiveX
Server Licensing Utility (SLU)
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked) > LDK vs. SLU > Server Licensing Utility (SLU)

Glossary Item Box

The Server Licensing Utility is a simple Windows application that uses License Configuration Files to request a license key from the purchased Runtime licenses. The Server Licensing Utility registers that Runtime license on the system where your application will be running. This utility can be used by developers for testing, by your deployment team, or by your end users to register their Runtime license.

In the Server Licensing Utility dialog, add your License Configuration file(s) as follows:

  1. Click Add and navigate to your License Configuration file(s).
  2. Select the appropriate License Configuration file(s) and click Open.
  3. After all applicable License Configuration files have been added, click Auto Register or Manually Register, depending on whether or not you are connected to the Internet. Refer to the sections below for more information.

Auto Register Toolkit (Connected to Internet)

Automatic registration works in much the same way as connected Toolkit registration and requires an Internet connection on the system where your application software will be deployed. The license information along with the system’s hardware information is sent over the Internet to the Accusoft licensing web service. If an unused license is available, a new license key containing information for the system is generated, returned, and is then automatically installed by the Server Licensing Utility.

Manually Register Toolkit (Disconnected from Internet)

Manual registration is used when the system where your application software will be deployed is not connected to the Internet and therefore cannot be registered automatically. This operation is similar to Disconnected Registration with the License Manager.

  1. Copy the Hardware Key and URL to a removable media device, such as a thumb drive, and then take it to a system that is connected to the Internet.
  2. From the connected system, paste the URL into a browser. A page will appear that contains a field into which you enter the hardware key.
  3. After this hardware key is entered, a license file with the license key is downloaded, which you then save to the removable media device.
  4. Return to the offline system with the removable media device onto which you have saved the license file.
  5. Click Open License File and navigate to the license file. Click OK in the file selection dialog.
    Alternatively, you can open the license file with a text editor, copy the license key to the clipboard, and click Paste License Key to paste the new license key into the License Key field.
  6. Click the License button; the new license will be installed.


Licensing Development Kit (LDK)

Accusoft.TwainPro7.ActiveX
Licensing Development Kit (LDK)
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked) > LDK vs. SLU > Licensing Development Kit (LDK)

Glossary Item Box

The Licensing Development Kit is an ActiveX component that may be used instead of the Server Licensing Utility. (Actually, the Server Licensing Utility is only a user interface for the Licensing Development Kit.) The Licensing Development Kit provides an interface for a developer to set the License Configuration File path and other properties as well as initiate requests to the licensing web service to generate license keys.

This topic contains these sections:

  • AccuLicClient.DLL
  • Assigned Access Keys
  • Automatic (Connected) Mode Registration
  • Manual (Disconnected) Mode Registration
  • Evaluation
  • Licensing Development Kit Interface
  • Licensing Development Kit Properties
  • Licensing Development Kit Methods

AccuLicClient.DLL

The AccuLicClient.DLL is located with the Server Licensing Utility. It is a 32-bit ActiveX/COM DLL which is used to execute runtime licensing activation functions. The bulk of the functionality provided by the Server Licensing Utility (SLU) is contained within the AccuLicClient.DLL and can be used within your own custom applications to achieve the same thing.

Assigned Access Keys

Unlike the Server Licensing Utility, the Licensing Development Kit allows for the optional assignment of Access Keys to specific users. By doing this, you can specify which of your licenses are assigned to your users. This also limits the distribution of licenses. When Runtime licenses are purchased, a list of Access Keys is distributed to you for this use.

Automatic (Connected) Mode Registration

This mode corresponds to the Automatic (Connected) Registration section described in the Server Licensing Utility section. The process is shown in the C# sample code below:

Copy Code
// Instantiate the LDK ActiveX component
IDeploymentComponent ldk = new DeploymentComponent();

// Set the path to the configuration file provided
// when the runtime licenses were purchased.
ldk.ConfigPath = @"C:\config.txt";

// Attempt to get the next available license.
// Note that you may alternately pass an Access Key
ldk.GetLicKeyAuto("");

if (ldk.ResultCode != enumLdkErrorCodes.LDK_SUCCESS)
{
    // Automatic Registration Failed - A temporary license
    // has been installed but will expire in 15 days.
    // TODO add code to notify user of issue and 15 day expiration.

    if (ldk.ResultCode == enumLdkErrorCodes.LDK_ERR_INET_CONN_BROKEN)
    {
        // No Internet Connection – Optionally do manual registration
    }
}
else
{
    // The license has been registered and installed.
}

The registration process is then complete. If any part of the registration process fails, a temporary license key is installed and is typically valid for 15 days. During this time, you are allowed to use the product while resolving any licensing related problems.

Manual (Disconnected) Mode Registration

This mode corresponds to the Manual (Disconnected) Registration section described in the Server Licensing Utility section. The process is shown in the C# code below:

Copy Code
// Instantiate the LDK ActiveX component
IDeploymentComponent ldk = new DeploymentComponent();

// Set the path to the configuration file provided
// when the runtime licenses were purchased.
ldk.ConfigPath = @"C:\config.txt";

// Get the hardware key for the system.  Note
// that you may alternately pass an Access Key
string hardwareKey = ldk.GetHdwKey("");

// Write the hardware key to some type of removable media.
ApplicationSpecificMethodToWriteHardwareKey(hardwareKey);

At this point, you have the hardware key on some type of removable media. Take the media to a system that is connected to the Internet, acquire the license key by uploading the hardware key, write the new license key to the removable media, and then return to the disconnected system. The application then reads the license key from the removable media and installs the license key as shown below.

Copy Code
// After taking the hardware key to a system with an Internet
// connection and acquiring the license key string from the
// manual registration web site, read the key into your
// application.
string manuallyAcquiredLicenseKey = ApplicationSpecificMethodToReadLicenseKey();

// Install the license key
ldk.LicKey = manuallyAcquiredLicenseKey;

The manual license registration and installation is then complete. Like the automatic case above, if any error occurs during the setting of the license key, a temporary license is installed.

Evaluation

The Licensing Development Kit also has the ability to install an Evaluation License for purchased runtime products. This process is simply:

Copy Code
// Instantiate the LDK ActiveX component
IDeploymentComponent ldk = new DeploymentComponent();

// Set the path to the configuration file provided
// when the runtime licenses were purchased.
ldk.ConfigPath = @"C:\config.txt";

// Install an evaluation license
ldk.StartEvalPeriod();

Licensing Development Kit Interface

The interface to the Licensing Development Kit is shown below:

Copy Code
interface IDeploymentComponent : IDispatch
{
   [propget, id(1)] HRESULT LicKey([out, retval] BSTR* pVal);
   [propput, id(1)] HRESULT LicKey([in] BSTR newVal);
   [propget, id(2)] HRESULT srvURL([out, retval] BSTR* pVal);
   [propput, id(2)] HRESULT srvURL([in] BSTR newVal);
   [propget, id(3)] HRESULT ConfigPath([out, retval] BSTR* pVal);
   [propput, id(3)] HRESULT ConfigPath([in] BSTR newVal);
   [propget, id(4)] HRESULT ResultString([out, retval] BSTR* pVal);
   [propget, id(5)] HRESULT ResultCode([out, retval] enumLdkErrorCodes* pVal);
   [id(6)]           HRESULT GetLicKeyAuto([in] BSTR accKey);
   [id(7)]           HRESULT GetHdwKey([in] BSTR accKey, [out,retval] BSTR* hdwKey);
   [id(8)]           HRESULT StartEvalPeriod(void);
   [propget]         HRESULT LicenseInfo([out, retval] BSTR* pVal);
   [propput]         HRESULT LicenseInfo([in] BSTR newVal);
   [id(10)]          HRESULT GetEvalPeriod([out, retval] long* pVal);
};

Licensing Development Kit Properties

  • LicKey: Stores the License Key to the registry when it is set, and reads it from the registry during the get operation.
  • srvURL: Gets and sets the URL path to the licensing web service. The default is the URL path to Accusoft’s Deployment Licensing Service.
  • ConfigPath: Gets and sets a path to the deployment configuration file. Multiple products can be registered at one time by setting the filenames as a semicolon-delimited list: e.g., “c:\config.txt;c:\config2.txt”.
  • ResultString: Contains the string descriptions of any error that may have occurred during the last operation.
  • ResultCode: Can be used to contain any of the error codes described in Licensing Component Error Codes and Messages.
  • LicenseInfo: Used to transfer license information onto new system hardware. To transfer the license information into new system hardware, do the following:
  1. Get the LicenseInfo value and store it in a safe place.
  2. Change the system hardware.
  3. Set the LicenseInfo to the value you saved in step (1).
  4. Run the GetLicKeyAuto method (or perform its manual analog) to obtain a license for the new system hardware.

Licensing Development Kit Methods

  • GetLicKeyAuto: Obtains a License Key for the end user’s system using the automatic (or connected) scenario. It takes an Access Key as its input parameter, and stores the obtained license key in the registry. If you choose not to distribute individual Access Keys, the accKey argument should be an empty string.
  • GetHdwKey: Obtains a hardware key from the current machine and returns it (as hdwKey). If you choose not to distribute individual access keys, the accKey argument should be an empty string.
  • StartEvalPeriod: Sets an evaluation licensing mode for the product and starts an evaluation period. This method is provided so you can distribute an evaluation version of your application, without having to distribute Access Keys to people who would like to evaluate your software. Using this method you can license Accusoft components on the end user’s system for a limited time – the default is 30 days, but it can be customized per request to Accusoft. If the evaluators purchase your software, you can then issue them an access key using either the automatic or manual scenarios to obtain permanent component licenses, just as Accusoft does for its evaluators.
  • GetEvalPeriod: Obtains the remaining time on an evaluation (in days). It returns EvalPeriod < 0 if the evaluation period is expired.


Deployment Proxy Service (DPS)

Accusoft.TwainPro7.ActiveX
Deployment Proxy Service (DPS)
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked) > Deployment Proxy Service (DPS)

Glossary Item Box

For systems where the deployed application will not have direct access to the Accusoft licensing web services, you can use the Deployment Proxy Service as a bridge to reroute the licensing communication. The Proxy Service will act as a trusted "go-between" for the Accusoft licensing system and the deployed application. This tool can be useful if the application will be deployed in a secured environment, where limited systems have external network access.

Additionally, the Proxy Service allows Accusoft customers to manage license registration more directly. The source for the Deployment Proxy Service is provided, allowing users to integrate the licensing process into their CRM, ERP, or other systems for tracking Automatically Reported Runtime Licenses.

For more information about the Deployment Proxy Service, please contact our Support team.


Manually Reported Runtime (Non-Node-Locked)

Accusoft.TwainPro7.ActiveX
Manually Reported Runtime (Non-Node-Locked)
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Manually Reported Runtime (Non-Node-Locked)

Glossary Item Box

Manually Reported Runtime licensing embeds all of the licensing information directly into your application. Installation does not require any further licensing interaction. However, it is your responsibility to provide royalty reporting to Accusoft for the actual licenses deployed.

This section provides information about the following:

  • Solution Name
  • Solution Key
  • OEM License Key


Solution Name

Accusoft.TwainPro7.ActiveX
Solution Name
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Manually Reported Runtime (Non-Node-Locked) > Solution Name

Glossary Item Box

The solution name is

  • A name assigned by Accusoft to the licenses purchased for runtime deployment.
  • A character string that is set for a component prior to use in a deployment environment.
  • Typically the name of the organization that purchased the runtime licenses.
  • Set via the SetSolutionName method. For example:
Copy Code
TwainPro1.SetSolutionName("ACMEImaging");

The Solution Name must be set in order to use runtime licensing.


Solution Key

Accusoft.TwainPro7.ActiveX
Solution Key
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Manually Reported Runtime (Non-Node-Locked) > Solution Key

Glossary Item Box

The Solution Key is

  • A set of four numbers assigned when the licenses are purchased for runtime deployment.
  • An identifier of the organization that purchased the runtime licenses.
  • Set via the SetSolutionKey method. For example:
Copy Code
TwainPro1.SetSolutionName("ACMEImaging");
TwainPro1.SetSolutionKey(0x1C3A023F, 0xA018F260, 0x37AF0E51, 0x557F2389);

The Solution Key must be set in order to use runtime licensing.


OEM License Key

Accusoft.TwainPro7.ActiveX
OEM License Key
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > Manually Reported Runtime (Non-Node-Locked) > OEM License Key

Glossary Item Box

The OEMLicense Key is

  • For use only by customers who choose to use Manually Reported Runtime licensing.
  • A unique identifier of the customer, product, version, edition, and platforms for which the license is valid.

When this key is set via the SetOEMLicenseKey method, the component is completely licensed and can be distributed without any further licensing operations.

Copy Code
TwainPro1.SetSolutionName("ACMEImaging");
TwainPro1.SetSolutionKey(0x1C3A023F, 0xA018F260, 0x37AF0E51, 0x557F2389);
TwainPro1.SetOEMLicenseKey("1.0.GQCC0EmUgONaI4QDZ32tpGWfpGW4gtbC0iIC0iN4bigYM3m3K5b487QOsAM38O24mUp5bOpD2O240OQ32U2YsUKDKA87MYPGgGgaptMiK5Nv8AI4mYg4m3QvW52DZCPGs4p784mtP4IUgOWiIG0AQYp4052iIAWvNCZfpGWC8vQ5P4ZGKaPAWfbiYfZOI303pOZAgisiNaWA27gGsf8Ob7Zvm5IaKGI4KC8GsG2CWYpGQAg5sUmYWvZCQANig48G2ap4bG0DsO240YsUmtptNiZamCPGbYMfMO83gANAZCN52YbY8U8f8DM4m3g7MYMYWGW5Q7QGWaMiN7MtZfmtgY8AN7NDP7Z4W7sCbGKUPa0im7EDPP");

This property is not required for Automatically Reported Runtime licensing.


ActiveX Website Runtime Licensing

Accusoft.TwainPro7.ActiveX
ActiveX Website Runtime Licensing
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Runtime Licensing > ActiveX Website Runtime Licensing

Glossary Item Box

Using an Accusoft ActiveX on a webpage is similar to Manually Reported Runtime (Non-Node-Locked), as it requires calls to SetSolutionName, SetSolutionKey, and SetOEMLicenseKey. However, the web licenses are not node-locked to particular hardware but are node-locked to a set of specific domains or sub-domains. Sub-paths of those domains and sub-domains do not require additional licensing, thus if http://www.mysite.com is licensed, so is http://www.mysite.com/imaging.

To get an OEM license key, the developer will identify one or more domains or sub-domains to Accusoft's Licensing Center. There is an ActiveX web licensing site that contains the OEM License Generator web application. This web application is used to create an OEM license key that the developer can use along with the solution name and solution key on the webpage in the domain or sub-domain.

Example

In the following example:

  • The solution name is "ACMEImaging"
  • The solution keys are "0x1C3A023F, 0xA018F260, 0x37AF0E51, 0x557F2389"
  • The domain specified is www.mysite.com

The developer would do the following:

  1. Log into Accusoft’s Licensing Center.
  2. Use the OEM License Generator web application to retrieve an OEM license key for www.mysite.com.
  3. Use the OEM license key on a webpage in the www.mysite.com domain.
Copy Code
TwainPro1.SetSolutionName "ACMEImaging"
TwainPro1.SetSolutionKey 0x1C3A023F, 0xA018F260, 0x37AF0E51, 0x557F2389
TwainPro1.SetOEMLicenseKey
"1.0.GQCC0EmUgONaI4QDZ32tpGWfpGW4gtbC0iIC0iN4bigYM3m3K5b487QOsAM38O24mUp5bOpD2O240OQ32U2YsUKDKA87MYPGgGgaptMiK5Nv8AI4mYg4m3QvW52DZCPGs4p784mtP4IUgOWiIG0AQYp4052iIAWvNCZfpGWC8vQ5P4ZGKaPAWfbiYfZOI303pOZAgisiNaWA27gGsf8Ob7Zvm5IaKGI4KC8GsG2CWYpGQAg5sUmYWvZCQANig48G2ap4bG0DsO240YsUmtptNiZamCPGbYMfMO83gANAZCN52YbY8U8f8DM4m3g7MYMYWGW5Q7QGWaMiN7MtZfmtgY8AN7NDP7Z4W7sCbGKUPa0im7EDPP"


Licensing Glossary

Accusoft.TwainPro7.ActiveX
Licensing Glossary
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Licensing Glossary

Glossary Item Box

The following sections each describe a licensing term:

  • Access Key
  • Accusoft Products
  • Activation
  • Assigned Access Key
  • Automatically Reported Runtime Licensing
  • Customers, Developers, and Users
  • Edition
  • Evaluation License
  • Hardware Key
  • License Configuration File
  • Licensing Development Kit (LDK)
  • License Key
  • License Manager
  • Manually Reported Runtime Licensing
  • Node-Locked Licensing
  • Non-Node-Locked Licensing
  • Paid License
  • Registration
  • Runtime (Deployment) Licensing
  • Server Licensing Utility (SLU)
  • Toolkit Licensing
  • Web Services

Access Key

All licenses are assigned a unique identifier known as an Access Key. Access Keys are associated with the organization that purchased the license.

Accusoft Products

An Accusoft product may be licensed with either a Toolkit License or a Runtime License.

Activation

Activation is the process of selecting a previously registered toolkit license. Licenses may be paid (Toolkit) or evaluation, and may be for one of many product editions, for products with multiple editions.

Assigned Access Key

An assigned Access Key is one that is assigned to a specific user or users. The assignment of Access Keys to specific users can be done using the Licensing Development Kit (LDK).

Automatically Reported Runtime Licensing

Runtimes may be licensed in one of two ways: automatic reporting or manual reporting. With automatic reporting, you do not need to worry about royalty reporting; it is handled by the licensing layer.

Customers, Developers, and Users

Customers are simply any person who has purchased an Accusoft product. Developers are customers who possess a license for an Toolkit. Users are typically the customers of Accusoft's customers who use applications built around Accusoft components and are assigned a runtime license.

Edition

Some Accusoft products have multiple editions. Editions may offer multiple levels of product speed or product features, allowing customers to find a price-performance mix that is appropriate for them. Products that support multiple editions register multiple Toolkit licenses at installation time, one Toolkit license per edition. Developers must select an edition to activate using the License Manager.

Evaluation License

An evaluation license is a Toolkit license that is unpaid. When an Accusoft Toolkit is installed, evaluation licenses for all applicable product editions are installed and registered, and the edition with the most features is activated. Evaluation Toolkit licenses can be used to try out products. However, the product behavior is limited by trial dialog pop-ups or timeouts. When you determine the product is a good fit, you can purchase a Toolkit license to eliminate trial dialog pop-ups and timeouts.

Hardware Key

When a license is activated for a product, the system information that identifies the installation hardware is contained within an encrypted string and is used to generate the license key for the product. The string containing the encrypted hardware information is known as the Hardware Key.

License Configuration File

When a Toolkit or an Automatically Reported Runtime license is purchased, a configuration file is provided that contains information about the license that was purchased. This file is used by the licensing utilities (License Manager, Server License Utility, and License Development Kit) to install a license on the system.

Licensing Development Kit (LDK)

The Licensing Development Kit (LDK) is an ActiveX component that may be used for Runtime Licensing. The LDK is one mechanism for Automatically Reported Runtime Licensing; the Server Licensing Utility (SLU) is the other.

License Key

Each product license has a unique key associated with it that uniquely identifies the customer, product, version, edition, and platforms, and, in some cases, the hardware for which the license is valid.

License Manager

The License Manager is a GUI application that is used by a developer to register and activate Toolkit licenses on their development system.

Manually Reported Runtime Licensing

Runtimes may be licensed in one of two ways: automatic reporting or manual reporting. With Manually Reported Runtime Licensing, you embed all of the licensing information directly into your application. You must manually provide royalty reporting to Accusoft for the actual licenses deployed. This model will be the best choice for you if you are not connected to the Internet at runtime, as might be the case in an defense or financial application.

Node-Locked Licensing

Another name for Automatically Reported Runtime Licensing.

Non-Node-Locked Licensing

Another name for Manually Reported Runtime Licensing.

Paid License

A paid license is a Toolkit license that you have purchased from Accusoft. It is ready to be used in production, with no trial dialog pop-ups, timeouts, or evaluation watermarks. If you wish to test other editions of the Accusoft product for which you have purchased a Paid License, you may activate an Evaluation license for that edition; a complete set of Evaluation licenses for all editions is registered at installation time.

Registration

Registration is the process of informing the License Manager about a new Toolkit license you have purchased. It uses this information to create a license key on your system; this allows you to activate the product for development with no restrictions, such as trial dialog pop-ups, timeouts, or evaluation watermarks.

Runtime (Deployment) Licensing

When deploying an application, a Runtime License is also required for each user’s installation. You must purchase runtime licenses, which are consumed as licenses are registered. There are two Runtime licensing models: Automatically Reported Runtime License; and Manually Reported Runtime License.

Server Licensing Utility (SLU)

The Server Licensing Utility (SLU) is a small GUI application that allows you to request a license key from the Runtime licenses you have purchased. The SLU is one mechanism for Automatically Reported Runtime Licensing; the Licensing Development Kit (LDK) is the other.

Toolkit Licensing

Each Toolkit is assigned to a specific developer who has a registered account with Accusoft. When the developer installs the Toolkit, it is not fully functional until they have activated the license through the use of the License Manager application. When the developer starts the License Manager, they are required to provide login credentials that identify and allow them to activate their license on a development system. See Toolkit Licensing.

Web Services

When a license is registered, information that uniquely identifies the customer’s or user’s hardware is passed along with the license information over the Internet to a web service. The web service validates the licensing request, generates a key that includes the hardware information, and returns the new license key to the application that made the licensing request. The license key is then stored on the requested system and used by the component when it is executed. It is also possible to register systems that are not directly connected to the Internet through the use of removable media and a different system that is connected to the Internet.


Software License Agreement

Accusoft.TwainPro7.ActiveX
Software License Agreement
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Licensing > Software License Agreement

Glossary Item Box

PLEASE READ THE FOLLOWING SOFTWARE LICENSE AGREEMENT WHICH GOVERNS YOUR RIGHT TO USE OF THE TOOLKIT. YOU MUST ACCEPT THESE TERMS BEFORE YOU ARE ALLOWED TO INSTALL THE TOOLKIT. YOU EXPRESSLY AGREE THAT YOU HAVE THE AUTHORITY TO CONTRACTUALLY BIND THE ORGANIZATION AGREEING TO THESE TERMS.

BY CLICKING "I ACCEPT," OR INSTALLING TOOLKIT, OR PLACING TOOLKIT IN-USE, LICENSEE IS AGREEING TO BE BOUND BY THIS AGREEMENT.

1. GRANT OF AGREEMENT

This Accusoft Corporation, ("ACCUSOFT") Software License Agreement ("AGREEMENT") grants the organization contracting under this agreement as licensee ("LICENSEE") a limited, nontransferable, nonexclusive and non-assignable license to use the trial mode version of this ACCUSOFT Development Toolkit ("TOOLKIT") on a single computer for evaluation of fitness only and not for any commercial purpose; or to use a properly purchased and registered TOOLKIT, for development purposes only on a single computer, provided the TOOLKIT is IN-USE on only one computer at any time. (However additional TOOLKIT licenses may be purchased.) TOOLKIT is "IN-USE" on a computer when it becomes loaded by any means for any purpose into temporary memory (that is, including but not limited to RAM) or when it becomes copied or installed to less temporary storage by any means for any purpose (that is, including but not limited to hard disk, CD-ROM or other removable disk or tape, USB or other flash memory drive or card, or other local, networked, or cloud storage device) when it is accessible to that computer. The TOOLKIT is explicitly not to be used on a site-wide basis, via a server or other networked connection.

2. REDISTRIBUTION OF TOOLKIT RUNTIMES

ACCUSOFT does not grant LICENSEE any rights to deploy, license, sell, reproduce, copy, install, lease, timeshare, rent, or otherwise distribute or transfer TOOLKIT or any portion of TOOLKIT ("PORTION") except as provided in Section 1. GRANT OF AGREEMENT. For licensing information about any other distribution of TOOLKIT or PORTION, please visit our web site (www.accusoft.com/licensing.htm), or contact our sales staff. LICENSEE agrees to notify ACCUSOFT immediately of any violations or changes in status regarding LICENSEE's compliance with any term of this AGREEMENT.

In the event that ACCUSOFT grants LICENSEE in a written separate runtime license agreement ("RUNTIME AGREEMENT") a right to deploy, license, sell, reproduce, copy, install, lease, timeshare, rent, or otherwise distribute or transfer PORTIONS, the RUNTIME AGREEMENT will specify what PORTIONS may be distributed ("RUNTIME"). LICENSEE agrees to acknowledge and uphold the terms and conditions of this AGREEMENT as well as the terms of the RUNTIME AGREEMENT itself, which will be provided only in writing. In such event, LICENSEE may distribute RUNTIMES as part of the LICENSEE's software application or derivative works ("PRODUCT") upon additionally agreeing to the following:

a) LICENSEE understands and acknowledges that in order to receive any discounted pricing for RUNTIME distribution licensing fees based on the type of installation, it must either: 1) prepay for a number of RUNTIME licenses that is sufficient to qualify for ACCUSOFT's then-current published quantity discount, or 2) it must pay for the licenses in accordance with a written contract between LICENSEE and ACCUSOFT.

b) LICENSEE's PRODUCT shall not compete to any degree with the TOOLKIT. Such competitive PRODUCTS are defined as software development toolkits that include similar functionality as TOOLKIT and that are intended for use by software developers and/or system integrators.

c) LICENSEE's PRODUCT must be substantially greater in scope with greater functionality and features than those of the TOOLKIT.

d) LICENSEE will not use ACCUSOFT's name, logo, or trademarks to market PRODUCT without prior written approval of ACCUSOFT except LICENSEE will include a statement substantially similar to the following within PRODUCT documentation and about box: "Portions of this product contain imaging and other technology owned by Accusoft Corporation, Tampa, FL, (www.accusoft.com). ALL RIGHTS RESERVED."

e) LICENSEE agrees to only distribute the RUNTIMES. No license or other rights are granted to LICENSEE for any distribution of the TOOLKIT or PORTIONS including, but not limited to, documentation, source code, or the RUNTIME distribution unlock codes.

g) LICENSEE will only distribute the RUNTIMES on the hardware and operating system(s) for which the RUNTIMES are intended to be used according to the RUNTIME AGREEMENT.

If ANY of the terms of this AGREEMENT are not applicable to LICENSEE'S situation, or if any of the terms of this AGREEMENT cannot be complied with, or if LICENSEE needs modifications to this AGREEMENT or the license granted for any reason, LICENSEE must contact ACCUSOFT about obtaining an expanded license from ACCUSOFT (available by phone at: 813-875-7575, x321, by e-mail at: Sales@accusoft.com or by fax at: 813-875-7705).

This AGREEMENT grants rights to LICENSEE only for the TOOLKIT and does not convey any other rights of use or distribution to ACCUSOFT technology.

3. OWNERSHIP

LICENSEE acknowledges and agrees that ACCUSOFT owns all rights, title and interest in the TOOLKIT, in all forms, including without limitation any and all worldwide proprietary rights therein, including but not limited to trademarks, copyrights, patent rights, patent continuations, trade secrets and confidential information.

LICENSEE may not remove or alter the copyright notice from any copy of the TOOLKIT or any copy of the written materials, accompanying the TOOLKIT.

LICENSEE waives its right to contest any of ACCUSOFT's patents, trademarks, service marks, trade names, copyrights, and other intellectual property and proprietary rights in and to the TOOLKIT.

LICENSEE shall not use such trademarks, service marks, and trade names except where and as permitted under this AGREEMENT without receiving ACCUSOFT's prior written approval of such use. If such approval is granted, LICENSEE’s right to use such trademarks, service marks, and trade names shall end upon the termination of this AGREEMENT.

4. RESTRICTIONS AND RESERVATIONS.

All rights and licenses not expressly granted to LICENSEE are reserved to ACCUSOFT. LICENSEE is strictly prohibited from reproducing, copying, marketing, selling, distributing, licensing, sublicensing, leasing, timesharing or renting the TOOLKIT or PORTION, and LICENSEE is strictly prohibited from any use of the TOOLKIT or PORTION except as permitted by this AGREEMENT, and such actions are expressly prohibited. LICENSEE is strictly prohibited from incorporating or including the TOOLKIT or PORTION into or as part of any PRODUCT or service of LICENSEE except as provided by this AGREEMENT, regardless of the functionality of TOOLKIT (or lack thereof) within or as part of such PRODUCT or service of LICENSEE. LICENSEE shall not for any reason disassemble, decompile, decrypt or reverse engineer the TOOLKIT or PORTION or in any manner attempt to discover or reproduce the source code or any other copyrightable, proprietary, or trade secret aspect of the TOOLKIT or PORTION. Nor shall LICENSEE use the TOOLKIT or PORTION, directly or indirectly, in developing LICENSEE's own PRODUCT with, or including, similar functionality. LICENSEE shall not make any copies of the TOOLKIT or PORTION for any purpose whatsoever except as permitted by this AGREEMENT. Source code that is provided with TOOLKIT for sample or demonstration purposes may be used directly or indirectly in developing PRODUCT, however it may not be distributed in source form in whole or in part with or as part of PRODUCT.

5. WARRANTY DISCLAIMER

LICENSEE ACKNOWLEDGES AND AGREES THAT THE TOOLKIT IS PROVIDED "AS IS." ACCUSOFT DISCLAIMS ANY AND ALL REPRESENTATIONS AND WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND AGAINST INFRINGEMENT.

6. LIMITATION OF LIABILITY

ACCUSOFT SHALL HAVE NO LIABILITY TO LICENSEE, LICENSEE AFFILIATES, SUBSIDIARIES, SHAREHOLDERS, OFFICERS, DIRECTORS, EMPLOYEES, REPRESENTATIVES OR ANY THIRD PARTY, WHETHER IN CONTRACT, TORT, NEGLIGENCE OR PRODUCTS LIABILITY, FOR ANY CLAIM, LOSS OR DAMAGE, INCLUDING BUT NOT LIMITED TO, LOST PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOST DATA, LOST FILES, OR FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND OR NATURE WHATSOEVER ARISING OUT OF OR IN CONNECTION WITH USE OF OR INABILITY TO USE THE TOOLKIT, OR THE PERFORMANCE OR OPERATION OF THE TOOLKIT, EVEN IF ACCUSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. INDEMNIFICATION BY LICENSEE

LICENSEE SHALL INDEMNIFY, HOLD HARMLESS AND DEFEND ACCUSOFT FOR ANY LOSS, CLAIM, ACTION OR PROCEEDING THAT ARISES OR RESULTS FROM ANY ACTIONS OR OMISSIONS OF LICENSEE PERTAINING TO THE PRODUCT OR THE TOOLKIT AND FROM ANY ACTIONS OF LICENSEE THAT ARE IN VIOLATION OF THIS AGREEMENT.

8. TERM AND TERMINATION

Unless otherwise agreed to by the parties, this AGREEMENT shall become effective upon the earlier of LICENSEE's clicking of "I Accept" or LICENSEE'S installing or placing TOOLKIT IN_USE ("Effective Date") and shall continue in full force and effect until terminated in accordance with the terms set forth in this AGREEMENT.

Any material breach of this AGREEMENT shall automatically and immediately terminate this AGREEMENT. In the event that LICENSEE ceases to do business or is adjudged bankrupt or insolvent, ACCUSOFT may, at its sole option, terminate this AGREEMENT, by giving ten (10) Business Days written notice of such termination, which notice shall identify and describe the basis for such termination.

In the event of any termination of this AGREEMENT, any RUNTIME AGREEMENT is simultaneously terminated and LICENSEE shall stop using the TOOLKIT and PORTION, shall cease manufacturing the PRODUCT containing TOOLKIT or PORTION, and shall cease distributing PRODUCT containing TOOLKIT or PORTION. LICENSEE shall also require its resellers, OEMs, and other distribution channels (if any) to likewise stop manufacturing and distributing the PRODUCT containing TOOLKIT or PORTION. Within ten (10) Business Days thereafter, LICENSEE shall return or, at ACCUSOFT's option, destroy, the TOOLKIT and all PORTIONS, whether or not incorporated in or with the PRODUCT, that are within LICENSEE’s possession, custody and control, and shall certify to ACCUSOFT in writing within ten (10) Business Days after that return or destruction that it has complied with the foregoing obligation.

All Sections except Section 1. GRANT OF LICENSE shall continue in full force and effect, notwithstanding any termination of this AGREEMENT.

9. LIQUIDATED DAMAGES

In the event LICENSEE (a) copies the TOOLKIT or PORTION except as permitted by this AGREEMENT, (b) uses the TOOLKIT or PORTION for any reason other than as permitted by this AGREEMENT, (c) installs or uses the TOOLKIT or PORTION on more than a single computer, or (d) otherwise violates or breaches this Agreement, LICENSEE agrees that ACCUSOFT is entitled to obtain as liquidated damages and not as a penalty the greater of the amount of (v) the published quantity one distribution price based upon the type of distribution, or (w) $99 per each user of each PRODUCT or service of LICENSEE in which the TOOLKIT or PORTION is included, copied, incorporated, embedded or accessible; (x) $100 per copy of TOOLKIT or PORTION; (y) $100 per copy of any PRODUCT in which TOOLKIT or PORTION is included, copied, incorporated, embedded or accessible; or (z) 3% of all revenues realized by LICENSEE pertaining to any PRODUCTS or services of LICENSEE in which TOOLKIT or PORTION is included, copied, incorporated, embedded or accessible. THE LICENSEE EXPRESSLY AGREES THAT THE FOREGOING LIQUIDATED DAMAGES ARE NOT A PENALTY.

10. CONFIDENTIALITY

LICENSEE acknowledges that the TOOLKIT contains ACCUSOFT know-how, confidential and trade secret information ("PROPRIETARY INFORMATION"). LICENSEE agrees: (a) to hold the PROPRIETARY INFORMATION in the strictest confidence, (b) not to, directly or indirectly, copy, reproduce, distribute, manufacture, duplicate, reveal, report, publish, disclose, cause to be disclosed, or otherwise transfer the PROPRIETARY INFORMATION to any third party, (c) not to make use of the PROPRIETARY INFORMATION other than as permitted by this AGREEMENT, and (d) to disclose the PROPRIETARY INFORMATION only to LICENSEE's representatives requiring such material for effective performance of this AGREEMENT and who have undertaken an obligation of confidentiality and limitation of use consistent with this AGREEMENT. This obligation shall continue as long as allowed under applicable law.

11. INJUNCTIVE RELIEF

LICENSEE agrees that any violation or threat of violation of this AGREEMENT will result in irreparable harm to ACCUSOFT for which damages would be an inadequate remedy. Therefore, in addition to its rights and remedies available at law (including but not limited to the recovery of damages for breach of this AGREEMENT), ACCUSOFT shall be entitled to immediate injunctive relief to prevent any violation of ACCUSOFT's copyright, trademark, trade secret rights regarding the TOOLKIT, or to prevent any violation of this AGREEMENT, including, but not limited to, unauthorized use, copying, distribution or disclosure of or regarding the TOOLKIT or PORTION, as well as any other equitable relief as the court may deem proper under the circumstances.

12. NO REDUCED PRICING

In any determination of ACCUSOFT's damages (whether liquidated damages or actual damages), or any determination of any licensing fees or royalties due ACCUSOFT under this AGREEMENT due to a breach by LICENSEE hereunder, LICENSEE shall not be entitled to any discounts (volume or otherwise) or reduced licensing fees or royalties. The foregoing sentence shall be applicable unless LICENSEE has negotiated and entered into a written, signed agreement with ACCUSOFT for such reduced or discounted licensing fees or royalties and paid ACCUSOFT such fees or royalties in advance of any: (a) distribution of the TOOLKIT or PORTION, (b) copying of the TOOLKIT or PORTION, or (c) incorporation or use of the TOOLKIT or PORTION in or pertaining to any PRODUCT or service of LICENSEE. Further, LICENSEE agrees that it shall not be entitled to reduced licensing fees or royalties when determining ACCUSOFT's damages due to any undertaking or activity by LICENSEE regarding the TOOLKIT or PORTION outside of or exceeding the scope of permission or other terms of this AGREEMENT, or LICENSEE's actions otherwise in violation of this AGREEMENT.

13. ATTORNEYS' FEES AND COSTS

In the event of any lawsuit or other proceeding brought as a result of any actual or alleged breach of this AGREEMENT, to enforce any provisions of this AGREEMENT, or to enforce any intellectual property or other rights in or pertaining to the TOOLKIT or PORTION, the prevailing party shall be entitled to an award of its reasonable attorneys’ fees and costs, including the costs of any expert witnesses, incurred at all levels of proceedings.

14. GOVERNING LAW

This AGREEMENT shall be construed, governed and enforced in accordance with the laws of the State of Florida, without regard to any conflicts of laws rules. Any action related to or arising out of this AGREEMENT will be filed only in the Florida courts and LICENSEE consents to the exclusive jurisdiction and venue of the state and federal courts located in Tampa, Florida.

15. SEVERABILITY

If any provision of this AGREEMENT is determined to be invalid by any court of final jurisdiction, then it shall be omitted and the remainder of the AGREEMENT shall continue to be binding and enforceable. In addition, the Court is hereby authorized to enforce any provision of the AGREEMENT that the Court otherwise deems unenforceable, to whatever lesser extent the Court deems reasonable and appropriate, rather than invalidating the entire provision. Without limiting the generality of the foregoing, LICENSEE expressly agrees that should LICENSEE be found to have breached the AGREEMENT, under no circumstances shall LICENSEE be entitled to any volume or other discount, or reduced licensing fee or royalty in the determination of ACCUSOFT's damages, or otherwise in the determination of any licensing fee or royalty owed to ACCUSOFT.

16. GOVERNMENT RIGHTS

The TOOLKIT and accompanying documentation have been developed at private expense and are sold commercially. They are provided under any U.S. government contracts or subcontracts with the most restricted and the most limited rights permitted by law and regulation. Whenever so permitted, the government and any intermediaries will obtain only those rights specified in ACCUSOFT's standard commercial license. Thus, the TOOLKIT referenced herein, and the documentation provided by Accusoft hereunder, which are provided to any agency of the U.S. Government or U.S. Government contractor or subcontractor at any tier shall be subject to the maximum restrictions on use as permitted by FAR 52.227-19 (June 1987) or DFARS 227.7202-3(a) (Jan. 1, 2000) or successor regulations. Manufacturer is Accusoft Corporation, 4001 N. Riverside Drive Tampa, FL 33603.

17. ENTIRE AGREEMENT

This AGREEMENT represents the entire understanding of the parties concerning the subject matter hereof and supersedes all prior communications and agreements, whether oral or written, relating to the subject matter of this AGREEMENT. Only a writing signed by the parties may modify this AGREEMENT. In the event of any modification in writing, of this AGREEMENT, including an expanded license agreement, all sections of this Agreement survive except Section 2. Limited License.

18. CONTACT US

Should you have any questions concerning this AGREEMENT, or if you desire to contact ACCUSOFT for any reason, please contact ACCUSOFT at 1-813-875-7575.

19. OTHER RESTRICTIONS

a) This AGREEMENT shall not be amended, altered, changed or modified in any way, unless agreed to in writing by both ACCUSOFT and LICENSEE. Such writing must be executed by a duly authorized representative of ACCUSOFT and a duly authorized representative of LICENSEE.

b) This AGREEMENT is not transferable or assignable by LICENSEE under any circumstances, without the prior written consent of ACCUSOFT. ACCUSOFT will not unreasonably withhold such consent. This AGREEMENT shall be binding upon, and is made for the benefit of, each party, its successors, and permitted assignees (if any). For the purposes of this AGREEMENT, any change in control of LICENSEE shall constitute an assignment or transfer of this AGREEMENT requiring prior written consent of ACCUSOFT. As used in this section, a change in control is defined as (i) any change in ownership of more than fifty percent (50%) of the voting interest in LICENSEE, whether by merger, purchase, foreclosure of a security interest or other transaction, or (ii) a sale of all or substantially all of the assets of LICENSEE.

c) The relationship established by this AGREEMENT between LICENSEE and ACCUSOFT shall be that of Licensee and Licensor. Nothing contained in this AGREEMENT shall be construed as creating a relationship of agency, joint venture or partnership between LICENSEE and ACCUSOFT. Neither party shall have any right whatsoever to incur any liabilities or obligations on behalf of the other party.

d) ACCUSOFT's failure to perform any term or condition of this AGREEMENT as a result of conditions beyond its control such as, but not limited to, war, strikes, fires, floods, acts of God, governmental restrictions, power failures, or damage or destruction of any network facilities or servers, shall not be deemed a breach of this AGREEMENT.

e) The headings provided in this AGREEMENT are for convenience and reference purposes only. In the event of a conflict between the terms and conditions listed in this AGREEMENT, and any attached Schedules or Appendices, the terms and conditions of this AGREEMENT shall govern.

f) A waiver of a breach, violation, or default under this AGREEMENT shall not be a waiver of any subsequent breach, violation or default. Failure of either party to enforce compliance with any term or condition of this AGREEMENT shall not constitute a waiver by the party of such term or condition.

g) All notices and communications shall be in writing and shall be deemed to have been duly given the earlier of when delivered or three (3) Business Days after mailing by certified mail, return receipt requested, postage prepaid, or by international delivery service, addressed to the parties at their respective addresses set forth on the Order Form or at such other addresses as the parties may designate by written notice in accordance with this section.

Rev. 20120112

See Also

Distributing TwainPRO
Licensing


Distributing Applications & Deployment

Accusoft.TwainPro7.ActiveX
Distributing Applications & Deployment
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Distributing Applications & Deployment

Glossary Item Box

This section provides information about the following:

  • Verify You're Using the Latest Service Pack
  • Distributing TwainPRO


Verify You're Using the Latest Service Pack

Accusoft.TwainPro7.ActiveX
Verify You're Using the Latest Service Pack
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Distributing Applications & Deployment > Verify You're Using the Latest Service Pack

Glossary Item Box

Service pack updates will not overwrite paid licensing. Your paid licensing will continue to work and you will not be required to re-enter your purchased registration codes. Service pack updates do not include any changes that could "break" previously developed and/or deployed code.

Verify Latest Development Components

To verify you are using the latest version of an Accusoft Development Component or Components, please refer to the currently released product build numbers at www.accusoft.com/latestbuilds.htm.

If you require further assistance or have questions or comments, please see the topic on Getting Support for more detailed information.

See Also

Getting Support
Installing on a Development Machine


Distributing TwainPRO

Accusoft.TwainPro7.ActiveX
Distributing TwainPRO
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > Distributing Applications & Deployment > Distributing TwainPRO

Glossary Item Box

DLL Files to Distribute

Distribute the appropriate files with applications using the TwainPRO Product:

  • Accusoft.TwainPro7.ActiveX.dll — ActiveX Control library.
You must also distribute STDOLE2.TLB and OLEAUT32.DLL that are Microsoft support files. These must be registered prior to registering Accusoft.TwainPro7.ActiveX.dll.

There is a 32-bit and 64-bit version of the following file available at twain.org. The 32-bit version of this file is required if using the 32-bit ActiveX TwainPRO control, and the 64-bit version of this file is required if using the 64-bit ActiveX TwainPRO control.

  • TWAINDSM.DLL

The following is directly from the TWAIN_2_Errata.pdf from twain.org.

Windows 32-bit Support

Full TWAIN 2.0 support is not available through 16-bit TWAIN.DLL or through the 32-bit TWAIN_32.DLL file that Microsoft delivers with its supported versions of Windows. Full TWAIN 2.0 support is available using the new TWAINDSM.DLL provided by the TWAIN Working Group. This file is installed by a TWAIN application or driver in the SYSTEM32 directory on native 32-bit Windows systems, or in the SYSWOW64 directory on native 64-bit Windows systems.

Applications that use TWAINDSM.DLL are able to access 32-bit TWAIN drivers of any version, they are not limited to just TWAIN 2.0 drivers.

TWAIN drivers that access TWAIN_32.DLL do not have to be modified. TWAINDSM captures accesses to DSM_Entry through TWAIN_32.DLL, and automatically redirects them to the DSM_Entry in TWAINDSM.DLL.

Windows 64-bit Support

TWAIN supports native 64-bit for x64 platforms. The new DSM is required, and should be installed in the Windows SYSTEM32 directory.

See Also

Getting Support
Installing on a Development Machine
Software License Agreement
Verify You're Using the Latest Service Pack
Licensing


Concepts

Accusoft.TwainPro7.ActiveX
Concepts
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Concepts

Glossary Item Box

This section provides information about the following:

  • Overview of TWAIN
  • Supported File Formats
  • Glossary


Overview of TWAIN

Accusoft.TwainPro7.ActiveX
Overview of TWAIN
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Concepts > Overview of TWAIN

Glossary Item Box

TWAIN defines a standard software protocol and application programming interface (API) for communication between software applications and image acquisition devices.

Users need a way to get image data into their applications. Software developers need compatibility with the widest range of output devices without writing and maintaining multiple device drivers.

The solution to this situation is an open industry interface (TWAIN) that directly acquires image data from external sources while within an application.

With this, each software developer supports a standard data acquisition manager and each hardware vendor writes one driver for their device. Hardware vendors benefit because they need only provide one standard driver for their device, which can then be used by all software applications supporting the TWAIN data acquisition interface.

Three Key Elements in TWAIN

  1. The Application software — An application which has been written to use TWAIN.

  2. The Data Source Manager software — The software which manages the interaction between the application and Data Source. This manager (TWAINDSM.dll) can be found at www.twain.org.

  3. The Data Source software — The software which controls the image acquisition device which has been written to comply with the TWAIN specifications. It is generally supplied by the acquisition device manufacturer.

TWAIN defines how application developers can acquire image data directly into their application without requiring the user to switch out of the application. To provide this feature, TWAIN requires Data Sources to provide a built-in user interface (UI) for their device. Application developers can, if they choose, disable the built-in User Interface provided by the Data Source and provide their own User Interface to control TWAIN devices.

Support for disabling the built-in User Interface must be provided by the Data Source.


Supported File Formats

Accusoft.TwainPro7.ActiveX
Supported File Formats
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Concepts > Supported File Formats

Glossary Item Box

TwainPRO™ supports the following file formats:

PDF

Portable Document Format, a file format created by Adobe® System to represent documents independently of the application software, hardware, and operating system used to create them, and independently of the output device on which they are displayed or printed.

BMP

The Microsoft Windows Bitmap file format is based on the Windows internal bitmap data structures. The BMP format is widely used and it is quick and easy to read.

JPEG

The JPEG (Joint Photographic Expert Group) standard is one of the most important image data compression standards. It is widely used in many industries and is becoming the most widely used image format for the Internet.

JPEG Compression is a lossy format that can achieve very high compression ratios. The compression level is adjustable by varying the SaveJPEGChromFactor and SaveJPEGLumFactor properties.

Progressive JPEG is a multiple-scan sequential JPEG format that is becoming popular for its ability to display images in progressively clearer segments.

ePIC

Accusoft's enhanced PIC image format (.PIC). This high performance image compression combines the patented ELS arithmetic coder with the high performance Accusoft JPEG libraries. The result is a new and unbeatable compression technology.

The ePIC compression has significant advantages over standard JPEG. Most importantly it produces smaller file sizes and decompresses extremely quickly. Other features include password encryption, and scaling and cropping without recompression. All Accusoft products support the ePIC file format.

TIFF

TIFF (Tag Image File Format) originally released by Aldus Corporation is a standard file format found in most print, imaging, and desktop publishing programs. TIFF is extremely powerful, flexible, and extensible.

For TIFF, the compression is selected by the SaveTIFFCompression property. For images above 1-bit, the compression will be uncompressed regardless of this property setting.


Glossary

Accusoft.TwainPro7.ActiveX
Glossary
Send Feedback
TwainPRO 7 for ActiveX - User Guide > Concepts > Glossary

Glossary Item Box

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

C

Capability
The options offered by a Data Source device. For example, devices may have automatic document feeders, may enable single or multiple image transfers, support color images, etc.

Capability Container

Capabilities have one of four containers, that define the structure of information. Containers include:

  • TW_ONEVALUE - a single value
  • TW_ARRAY - a rectangular array of values
  • TW_RANGE - a range of allowed values
  • TW_ENUMERATION - a list of valid values

Capability Negotiation
The application influences the data source's capability settings through capability negotiation. By determining if the source supports a capability, checking the current value of that capability, and setting the capability to the desired value, then verifying that new values have been accepted by the source.

D

Data Source (DS)
The image acquisition device, written to comply with the TWAIN specification.

Data Source Manager (DSM)
The software that manages interactions between the application and the Data Source. This code is provided in the TWAIN Developer's Toolkit and should be shipped for free with each TWAIN application and Data Source.

E

Extended Information
Information associated with the image on the page, such as a barcode.

T

Thread-safe
An application using this component can use multiple controls running in the same process, where they don't interfere with each other. The thread creating the control owns the control and is the only thread that can interact with it.

Transfer Mode
Describes how data is transferred from the Data Source to the Application. Three modes are available: native, disk file, and buffered memory.

TWAIN Identity
A unique identifier of the TWAIN application or Source.


How To

Accusoft.TwainPro7.ActiveX
How To
Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To

Glossary Item Box

This section provides information about how to do the following:

  • Select the DSM Version
  • Quick Start - Acquire a TWAIN Image
  • Open a TWAIN Session
  • Negotiate Capabilities
  • Acquire Images and Image Information
  • End a TWAIN Session
  • Debug


Select the DSM Version

Accusoft.TwainPro7.ActiveX
Select the DSM Version
Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Select the DSM Version

Glossary Item Box

The DataSourceManagerVersion property allows you to set the Data Source Manager version that TwainPro will use. The DSM is a DLL provided by TWAIN that lives between the Data Source (Scanner) and the Application (TwainPro) and manages the data and communications between the two.

  • In Versions 5 and prior of TwainPro, only Version 1 was used.
  • In Version 6 of TwainPro, only Version 2 was used.
  • In Version 7 of TwainPro, we introduce a new behavior to allow the DSM version used to be set, since not all scanners support the newest version of the DSM. This provides greater flexibility for the developer to accommodate such scenarios.

When set to Version 2, the file TWAINDSM.dll is used:

  • 32-bit: On 64-bit machines running in a 32-bit context, it should be located in the SYSWOW64 directory. On 32-bit machines, it should be located in the SYSTEM32 directory. If it can’t be found, a TwainDllLoadException will be thrown indicating this.
  • 64-bit: On 64-bit machines running in a 64-bit context, it should be located in the SYSTEM32 directory. If it can’t be found, a TwainDllLoadException will be thrown indicating this.

Also, TwainPro internally identifies itself as a 2.0 TWAIN application to the Data Source.

When set to Version 1, the file twain_32.dll is used:

  • 32-bit: It should be located in the WINDOWS directory. If it can’t be found, a TwainDllLoadException will be thrown indicating this.
  • 64-bit: This is not supported, you must use Version 2. (TWAIN only support 64-bit for Twain 2.0 and above.) A TwainDllLoadException will be thrown indicating this.

Also, TwainPro internally identifies itself as a 1.9 TWAIN application to the Data Source.

When set to LatestSupportedVersionAvailable:

TwainPro attempts to use Version 2 of the DSM, if this fails it will attempt to use Version 1 of the DSM. If that fails then a TwainDllLoadException will be thrown indicating no version could be found. By default the DataSourceManagerVersion property is set to LatestSupportedVersionAvailable.

DataSourceManagerVersionInUse is a read-only property that can be queried to find out the current DSM version that's currently in use by TwainPro.


Quick Start - Acquire a TWAIN Image

Accusoft.TwainPro7.ActiveX
Quick Start - Acquire a TWAIN Image
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Quick Start - Acquire a TWAIN Image

Glossary Item Box

Your application needs only two support features for TWAIN compliance:

  • Data Source (DS) selection
  • Image acquisition through the Data Source User Interface (UI)

The two standard methods supplied by TwainPRO™ are SelectSource and StartSession.

SelectSource displays the TWAIN Data Source Manager's User Interface with the default Data Source highlighted. The user selects the Data Source he or she wishes to use then selects the OK or Cancel buttons.

The StartSession method displays the current or default Data Source User Interface for image acquisition. Any capabilities that the user wishes to change will have to be changed through the Data Source User Interface.

VB Example Copy Code
' This code demonstrates how to select the Data Source UI and then acquire an image from the Data Source
TwainPRO1.SelectSource
TwainPRO1.StartSession

' After the image is acquired you can place it into the windows,
' clipboard then into other applications or controls.
Private Sub TwainPRO1_PostScan()
TwainPRO1.CutToClipboard
Picture1.Picture = Clipboard.GetData(vbCFDIB)
End Sub

See Also

SelectSource Method
StartSession Method


Open a TWAIN Session

Accusoft.TwainPro7.ActiveX
Open a TWAIN Session
Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Open a TWAIN Session

Glossary Item Box

This section provides information about how to do the following:

  • Set the Application's TWAIN Identity
  • Enable Extended Capabilities
  • Set the Transfer Mode
  • Select a Data Source
  • Open the TWAIN Session


Set the Application's TWAIN Identity

Accusoft.TwainPro7.ActiveX
Set the Application's TWAIN Identity
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Open a TWAIN Session > Set the Application's TWAIN Identity

Glossary Item Box

All TWAIN Data Sources and applications have a TWAIN Identity. This identity enables the TWAIN Data Source Manager (DSM) to keep track of all running TWAIN applications and Data Sources.

A TWAIN Identity consists of four strings:

  • ProductName,
  • ProductFamily,
  • Manufacturer and
  • VersionInfo.
These properties must be set prior to starting a TWAIN Session (OpenSession).

See Also

ProductName Property
ProductFamily Property
Manufacturer Property
VersionInfo Property
OpenSession Method


Enable Extended Capabilities

Accusoft.TwainPro7.ActiveX
Enable Extended Capabilities
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Open a TWAIN Session > Enable Extended Capabilities

Glossary Item Box

Some non-compliant TWAIN drivers don't properly handle a query for support of extended capabilities (CAP_FEEDPAGE and CAP_CLEARPAGE).

If you do not plan to use these capabilities, set EnableExtCaps to False.

The Data Source should be set before opening a TWAIN session (OpenSession).

See Also

EnableExtCaps Property
OpenSession Method


Set the Transfer Mode

Accusoft.TwainPro7.ActiveX
Set the Transfer Mode
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Open a TWAIN Session > Set the Transfer Mode

Glossary Item Box

The TwainPRO™ control now lets you determine the method of transfer you wish to use with the Data Source.

The TransferMode property should be set before starting a TWAIN Session (OpenSession).

Native Transfer Mode

By default, TwainPRO control uses Native transfer mode which is the simplest to use because the Data Source is responsible for providing a DIB directly to the control.

Buffered Memory Transfer

An alternative mode of transfer, buffered memory transfer, specifies that data from the Data Source is transferred in blocks of data. In buffered memory transfer mode, the TwainPRO control is responsible for converting the data received from the scanner to the proper format. Typically this would be a standard DIB. This method of transfer can be faster on computers with lesser amounts of memory or higher-end scanners.

The data can be negotiated with the Data Source through the ICAP_COMPRESSION to be in compressed format. This results in a TIFF or JPEG file being created in memory so that less memory is used and the transfer time from the Data Source to the application is lower.

See Also

TransferMode Property
OpenSession Method


Select a Data Source

Accusoft.TwainPro7.ActiveX
Select a Data Source
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Open a TWAIN Session > Select a Data Source

Glossary Item Box

The Data Source for the TWAIN session must now be identified.

The Data Source should be set before starting a Session (OpenSession).

Using the Data Source Manager's User Interface (DSM UI)

To enable the application end user to select a Data Source using the Data Source Manager's User Interface, use SelectSource. The DataSource Manager's UI will display with the default Data Source highlighted. The user selects the Data Source desired then selects the OK or Cancel button.

Without the TWAIN DSM UI

TwainPRO™ can retrieve the list of Data Sources (DS) on the current system and set the current Data Source, without using the DSM User Interface.

In order to obtain a list of the Data Sources you must call the OpenDSM method first. OpenDSM fills the DataSourceList array property with a list of all Data Source product names. It will also set the DataSourceCount property to the number of Data Source product names within the DataSourceList array.

To select a current Data Source from the DataSourceList, you call the SetDataSource method with the index number of the Data Source from the DataSourceList array.

See Also

OpenSession Method
SelectSource Method
OpenDSM Method
DataSourceList Property
DataSourceCount Property
SetDataSource Method


Open the TWAIN Session

Accusoft.TwainPro7.ActiveX
Open the TWAIN Session
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Open a TWAIN Session > Open the TWAIN Session

Glossary Item Box

Prior to Opening the TWAIN Session, the following should be done:

  • Set the Application's TWAIN Identity
  • Set the Transfer Mode
  • Select a Data Source

The application opens a TWAIN session by calling the OpenSession method. Once a Twain Session has been initiated, the application can read and modify Data Source capabilities, and specify instructions for scanning, such as scanning DPI and layout.

See Also

OpenSession Method
Set the Application's TWAIN Identity
Set the Transfer Mode
Select a Data Source


Negotiate Capabilities

Accusoft.TwainPro7.ActiveX
Negotiate Capabilities
Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Negotiate Capabilities

Glossary Item Box

This section provides information about how to do the following:

  • Check Capabilities
  • Set Capabilities
  • Set Advanced Capabilities
  • Set Image DPI


Check Capabilities

Accusoft.TwainPro7.ActiveX
Check Capabilities
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Negotiate Capabilities > Check Capabilities

Glossary Item Box

Data Sources have different capabilities (e.g. levels of resolution, support of color or black and white images, automatic document feeder available, etc.). Applications can check the capabilities available for the selected Data Source, and can also set those capabilities to its desired settings.

Capabilities can be checked once a TWAIN Session has been opened (OpenSession), and before or after a scanning session has been initiated (StartSession).

Select a Capability to Check

First specify the capability to be read, by setting the Capability property.

Check that the Capability is supported by the Data Source

To determine whether the selected Capability is supported by the Data Source, read the CapSupported property.

Check the Type of Container used by the Data Source

If the capability is supported by the Data Source, read the CapType property to determine the type of container used by the Data Source to pass values back to TwainPRO™.

Read the Capability Values

The relevant properties to access for a capability are determined by the container used (CapType). TWAIN defines four types of containers to negotiate values between the application (TwainPRO) and the Source:

  • TWON_ONEVALUE: The current value is returned

Relevant Properties To Check: CapValue

  • TWON_ENUM: A list of legal values along with the current and default values are returned

Relevant Properties To Check: CapValue, CapDefault, CapNumItems, CapItem

  • TWON_RANGE: A range of legal values along with the current and default values are returned

Relevant Properties To Check: CapValue, CapDefault, CapMin, CapMax, CapStep

  • TWON_ARRAY: A list of values is returned

Relevant Properties To Check: CapNumItems, CapItem

VB Example Copy Code
' This code demonstrates how to read a value
' Check for support and stop if none
If (TwainPRO.CapSupported = False) Then
LblDefault.Caption = "Not supported"
LblDefault.Visible = True
Exit Sub
End If
' What data type is the Cap? We have to check the
' data type to know which properties are valid
Select Case TwainPRO.CapType
' Type ONEVALUE only returns a single value
Case TWON_ONEVALUE
EdtCurrent.Text = TwainPRO.CapValue
EdtCurrent.Visible = True
' Type ENUM returns a list of legal values as
' well as current and default values. A list
' of constants is returned and the CapDesc
' property can be used to find out what the
' constants mean
Case TWON_ENUM
EdtCurrent.Text = TwainPRO.CapValue
EdtCurrent.Visible = True
LblDefault.Caption = "Default = " & TwainPRO.CapDefault
LblDefault.Visible = True
List1.AddItem "Legal Values:"
For Index = 0 To TwainPRO.CapNumItems - 1
List1.AddItem TwainPRO.CapItem(Index) & " - " & TwainPRO.CapDesc(TwainPRO.CapItem(Index))
Next
List1.Visible = True
' Type ARRAY returns a list of values, but no
' current or default values.
Case TWON_ARRAY
List1.AddItem "Legal Values:"
For Index = 0 To TwainPRO.CapNumItems - 1
List1.AddItem TwainPRO.CapItem(Index)
Next
' Returns a range of values as well as current and
' default values
Case TWON_RANGE
EdtCurrent.Text = TwainPRO.CapValue
EdtCurrent.Visible = True
LblDefault.Caption = "Default = " & TwainPRO.CapDefault
LblDefault.Visible = True
LblMin.Caption = "MinValue = " & TwainPRO.CapMin
LblMin.Visible = True
LblMax.Caption = "MaxValue = " & TwainPRO.CapMax
LblMax.Visible = True
End Select

See Also

OpenSession Method
StartSession Method
Capability Property
CapSupported Property
CapType Property
CapValue Property
CapDefault Property
CapNumItems Property
CapItem Property
CapMin Property
CapMax Property
CapStep Property


Set Capabilities

Accusoft.TwainPro7.ActiveX
Set Capabilities
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Negotiate Capabilities > Set Capabilities

Glossary Item Box

Once a capability negotiation session has been initiated (OpenSession has been called), the Data Source capabilities can be modified to desired settings.

Capabilities can only be modified, or set, after a TWAIN Session has been opened (OpenSession), and prior to initiating the scanning session (StartSession).

Select a Capability to Set

First specify the capability to be set, by setting the Capability property.

Check that the Capability is supported by the Data Source

To determine whether the selected Capability is supported by the Data Source, read the CapSupported property.

Check the Type of Container used by the Data Source

Set the CapTypeOut property to specify the type of container used to pass information from TwainPRO™ to the Data Source.

Set the Capability

The relevant properties to set for the capability depend on the specified CapTypeOut. TWAIN defines four types of containers to negotiate values between the application (TwainPRO) and the Source:

  • TWON_ONEVALUE: The current value is returned

Relevant Properties To Set: CapValueOut

  • TWON_ENUM: A list of legal values along with the current and default values are returned

Relevant Properties To Set: CapValueOut, CapNumItemsOut, CapItemOut

  • TWON_RANGE: A range of legal values along with the current and default values are returned

Relevant Properties To Set: CapValueOut, CapMinOut, CapMaxOut

  • TWON_ARRAY: A list of values is returned

Relevant Properties To Set: CapNumItemsOut, CapItemOut

Once the properties are set, the SetCapOut method must be called to negotiate the new values.

VB Example Copy Code
' This code demonstrates setting a single value using the TWON_ONEVALUE container
' Let's make sure the user entered valid data
If False = IsNumeric(EdtCurrent.Text) Then
MsgBox "You must enter a real number for the new current value."
End If
TwainPRO.CapTypeOut = TWON_ONEVALUE
TwainPRO.CapValueOut = EdtCurrent.Text
TwainPRO.SetCapOut
VB Example Copy Code
' The following code will request that the Data Source only allow resolutions in the range of 100 to 400 dpi (assuming the ICAP_UNITS cap is set to inches).
TwainPRO.CapTypeOut = TWON_RANGE
TwainPRO.CapValueOut = 100
TwainPRO.CapMinOut = 100
TwainPRO.CapMaxOut = 400
TwainPRO.SetCapOut

See Also

OpenSession Method
StartSession Method
Capability Property
CapSupported Property
CapTypeOut Property
CapValueOut Property
CapNumItemsOut Property
CapItemOut Property
CapValueOut Property
CapValueOut Property
CapMinOut Property
CapMaxOut Property


Set Advanced Capabilities

Accusoft.TwainPro7.ActiveX
Set Advanced Capabilities
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Negotiate Capabilities > Set Advanced Capabilities

Glossary Item Box

The TWAIN specification defines advanced capabilities of the Data Source. The advanced capabilities are enumerated in TP_AdvancedCapability.

Prior to initiating a Scanning Session, the application may specify values for advanced capabilities. To set advanced capabilities, first set the Capability property to use advanced capabilities (TP_Capability_UseCapAdvanced), then specify the specific advanced capability by setting the CapAdvanced property.

VB Example Copy Code
' This code demonstrates how to set an advanced capability
TwainPRO1.Capability = TP_Capability_UseCapAdvanced
TwainPRO1.CapAdvanced = ICAP_BARCODEDETECTIONENABLED
If (TwainPRO1.CapSupported) Then
TwainPRO1.CapTypeOut = TWON_ONEVALUE
TwainPRO1.CapValueOut = 1
TwainPRO1.SetCapOut
End If

See Also

TP_AdvancedCapability Enumeration
CapAdvanced Property


Set Image DPI

Accusoft.TwainPro7.ActiveX
Set Image DPI
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Negotiate Capabilities > Set Image DPI

Glossary Item Box

One capability that is often set by the application is the desired DPI of the scanned image. To set the DPI for scanned images, use the TWAIN capabilities: ICAP_XRESOLUTION and ICAP_YRESOLUTION.

It is important to set the ICAP_UNITS capability equal to TWUN_INCHES prior to setting the resolution capabilities.
VB Example Copy Code
' This code demonstrates how to set the DPI of scanned images to 300 DPI
TwainPRO1.Capability = ICAP_UNITS
If TwainPRO1.CapSupported Then
TwainPRO1.CapTypeOut = 0
TwainPRO1.CapValueOut = 0
TwainPRO1.SetCapOut
End If

TwainPRO1.Capability = ICAP_XRESOLUTION
If TwainPRO1.CapSupported Then
TwainPRO1.CapTypeOut = 0
TwainPRO1.CapValueOut = 300
TwainPRO1.SetCapOut
End If

TwainPRO1.Capability = ICAP_YRESOLUTION
If TwainPRO1.CapSupported Then
TwainPRO1.CapTypeOut = 0
TwainPRO1.CapValueOut = 300
TwainPRO1.SetCapOut
End If
Image Resolution can only be modified, or set, after a TWAIN Session has been opened (OpenSession), and prior to initiating the scanning session (StartSession).

See Also

OpenSession Method
StartSession Method


Acquire Images and Image Information

Accusoft.TwainPro7.ActiveX
Acquire Images and Image Information
Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Acquire Images and Image Information

Glossary Item Box

This section provides information about how to do the following:

  • Define a Caption
  • Specify Image Layout
  • Initiate a Scanning Session
  • Transfer & Save Images
  • Transfer & Save Multi-Page Images
  • Access Extended Image Information


Define a Caption

Accusoft.TwainPro7.ActiveX
Define a Caption
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Acquire Images and Image Information > Define a Caption

Glossary Item Box

A caption is text that is placed on a still frame when scanning. TwainPRO™ enables the user to define a caption to be placed on all scanned images. When a caption is applied during scanning, it becomes a part of the scanned image data, and is no longer separable from the image.

To define a caption, set the Caption properties prior to initiating image acquisition (prior to StartSession). The Caption properties enable the application to specify the text, appearance, and location of the caption. During the scanning session, the caption will be applied to all acquired images.

If no caption is needed, ensure that the Caption property is set to null (the default value) prior to StartSession.

Caption can only be modified, or set, prior to initiating the scanning session (StartSession).

See Also

Caption Property
StartSession Method


Specify Image Layout

Accusoft.TwainPro7.ActiveX
Specify Image Layout
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Acquire Images and Image Information > Specify Image Layout

Glossary Item Box

The desired layout size for scanned images can be specified prior to initiating a scanning session, by calling SetImageLayout. This method sets the Left, Top, Right, and Bottom sides of the Image Layout rectangle for the current Data Source. The Image Layout rectangle defines what portion of the Data Source's scanning area is acquired.

It is also a good idea to set the ICAP_UNITS capability for the scanner prior to using the SetImageLayout method to specify the unit of measure you'll be using.
VB Example Copy Code
' This code demonstrates how to set the Image Layout rectangle to 6.5 inches X 9 inches
TwainPRO1.Capability = ICAP_UNITS
If TwainPRO1.CapSupported = True Then
TwainPRO1.CapTypeOut = TWON_ONEVALUE
TwainPRO1.CapValueOut = 0 ' set units to Inches
TwainPRO1.SetCapOut
End If
TwainPRO1.SetImageLayout 1, 1, 7.5, 10
Image Layout can only be modified, or set, prior to initiating the scanning session (StartSession).

See Also

SetImageLayout Method
OpenSession Method
StartSession Method


Initiate a Scanning Session

Accusoft.TwainPro7.ActiveX
Initiate a Scanning Session
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Acquire Images and Image Information > Initiate a Scanning Session

Glossary Item Box

Prior to initiating a scanning session, the following should be done:

  • Open a TWAIN Session
  • Negotiate Capabilities
  • Define a Caption (if desired)
  • Specify Image Layout

Once a Scanning session has been initiated (StartSession), capabilities, caption, and layout can be checked, but can no longer be modified.

Using the Data Source UI

To enable the application end user to initiate image acquisition, call the StartSession method. The Data Source User Interface then displays the current or default Data Source User Interface for image acquisition.

VB Example Copy Code
' This code demonstrates how to display the Data Source UI and then Acquire an image from the Data Source
TwainPRO1.SelectSource
TwainPRO1.StartSession

' After the image is acquired you can place it into the windows
' clipboard then into other applications or controls.

Private Sub TwainPRO1_PostScan()
TwainPRO1.CutToClipboard
Picture1.Picture = Clipboard.GetData(vbCFDIB)
End Sub

Without Using the Data Source UI

The TwainPRO™ ShowUI property is used to set the Data Source User Interface visibility. To hide the Data Source's User Interface, set ShowUI to false prior to calling the StartSession method.

When acquiring an image without the Data Source User Interface, you must take into account that the default image size and resolution capabilities may create a very large image and your system may not have enough memory for the image transfer. Check the image height, width and resolution settings using GetImageLayout method and capability respectively. If these values are outside of your parameters then you can change them with the SetImageLayout and SetCapOut methods.

Once a Scanning Session has been initiated (StartSession), Data Source capabilities can be checked, but can no longer be modified.

See Also

Open the TWAIN Session
Negotiate Capabilities
Define a Caption
Specify Image Layout
StartSession Method
ShowUI Property
GetImageLayout Method
SetImageLayout Method
SetCapOut Method


Transfer & Save Images

Accusoft.TwainPro7.ActiveX
Transfer & Save Images
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Acquire Images and Image Information > Transfer & Save Images

Glossary Item Box

Once a scanning session has been initiated by calling StartSession, one or more images can be scanned by the Data Source, transferred from the Data Source to the application, and saved by the application to file or memory.

Check for Pending Transfers

Prior to initiating a transfer of a scanned image from the Data Source to the application, TwainPRO™ raises a PreScan event. This event is the trigger to check the pending transfers. The PendingXfers property will contain the number of images the Data Source has ready for transfer. If the Data Source doesn't know how many images are ready for transfer, PendingXfers will be equal to -1. TWAIN Data Sources with Automatic Document Feeders (ADF) will return PendingXfers equal to -1. Such devices will transfer images until the feeder is empty.

Transfer Images from Data Source to Application

Upon proceeding from the PreScan event, pending images will be transferred from the Data Source to the application.

Save Scanned Images

When the transfer of each image is complete, TwainPRO raises a PostScan event. This event is the trigger to save the image to file or memory.

During the PostScan event, the hDIB property contains the latest scanned image. This information will be lost once the transfer of another image is initiated. Therefore, the application must select a method for saving the scanned image prior to initiating the next scan.

  • To save this image to file, first specify instructions for saving, by setting the "Save" properties. Then invoke the SaveFile method to save the file according to the properties set.
  • To move the data to an ImagXpress® control, assign the TwainPRO hDIB to ImagXpress hDIB. For example:

ImagXpress.hDIB = TwainPRO.hDIB

  • You may also move the data to the Window's Clipboard with the CutToClipBoard method.

Finish Scanning

Upon exiting the Post-Scan event, the acquisition process continues, by triggering another Pre-Scan event. At any point during the Pre-Scan, Image Transfer, or Post-Scan states, the application can call CancelPendingXfers to terminate the scanning session. Alternatively, setting the Cancel parameter in the Pre-Scan or Post-Scan events will also terminate the scanning session.

VB Example Copy Code
' This code demonstrates how to save to a multi-page file
Private Sub TwainPRO1_PostScan(Cancel As Boolean)
' When scanning from a document feeder,
' the PostScan event will fire after each page is scanned.
TwainPRO1.SaveTIFFCompression = TWTIF_CCITTFAX4
TwainPRO1.SaveMultiPage = True
TwainPRO1.SaveFile App.Path & "\multiPage.tiff"
End Sub

VB Example Copy Code
' This code demonstrates how to start a TWAIN session and place each image into a Picture control array
Private Sub cmdStart_Click()
scancount = 0
TwainPRO1.StartSession
End Sub
Private Sub TwainPRO1_PostScan(Cancel as Boolean)
PictureBox1(scancount).Picture = TwainPRO1.Picture
scancount = scancount + 1
End Sub

Example Copy Code
' This code demonstrates how to successfully negotiate the transfer mode and to transfer data in a compressed format
' Set the Transfer Mode to buffered memory mode
TwainPRO.TransferMode = TWSX_MEMORY
TwainPRO.OpenSession
If (TwainPRO.TransferMode = TWSX_MEMORY) Then
TwainPRO.CapTypeOut = TWON_ONEVALUE
TwainPRO.Capability = TP_Capability_UseCapAdvanced
TwainPRO.CapAdvanced = ICAP_COMPRESSION
If TwainPRO.CapSupported Then
TwainPRO.CapValueOut = TWCP_JPEG
TwainPRO.SetCapOut

'Normally then you would negotiate the ICAP_JPEGPIXELTYPE
'and ICAP_JPEGQUALITY capabilities.
'Using the defaults for both of these values
End If
End If
TwainPRO.StartSession

' A simple typical PostScan event handler.
Private Sub TwainPRO_PostScan(Cancel As Boolean)

Dim hImage As Long

On Error GoTo psError

' Need to check the Compression type to see
' if we are transferring a DIB or we are
' transferring compressed data.
If TwainPRO.ICompression = TWCP_NONE Then
hImage = TwainPRO.hDIB
If (hImage <> 0) Then
ImgXpr.hDIB = hImage
End If
Else
hImage = TwainPRO.hImage
If (hImage <> 0) Then
ImgXpr.LoadBuffer (hImage)
End If
End If
Exit Sub

psError:
GetError
Cancel = True
End Sub

See Also

StartSession Method
PreScan Event
PendingXfers Property
PostScan Event
hDIB Property
SaveFile Method
CutToClipboard Method
CancelPendingXfers Method


Transfer & Save Multi-Page Images

Accusoft.TwainPro7.ActiveX
Transfer & Save Multi-Page Images
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Acquire Images and Image Information > Transfer & Save Multi-Page Images

Glossary Item Box

Fast Saving of Multi-page TIFF files (generally over 1000 pages)

When the SaveUseIFDOffset property is false (default), the image is appended to the end of the multi-page TIFF. Due to the linked format of TIFF, the software must traverse all the link pointers to identify the location to which the new page will be appended. The greater the number of pages in the target TIFF file, the longer the write process takes. (Typically, if the target file has more than 1000 pages, the write speed will degrade substantially.)

Setting the SaveUseIFDOffset property to true specifies that the control should write the image to the location stored in the SaveIFDOffset property. This enables much faster writing of TIFF files with many pages because the software can seek to that location without traversing all previous pointer links. This process gives very predictable speeds in adding pages to a multi-page TIFF file.

Important: If the file's IFDOffset ever became out of sync with the SaveIFDOffset property value, file corruption could occur. To protect the application from inadvertently corrupting a saved mutli-page file, the Twain PRO™ control takes the following measures:

  • If the application sets the SaveUseIFDOffset property to true or false, the SaveIFDOffset property is automatically set to zero. The application must then explicitly set the IFD Offset to be used.
  • Executing the SaveFile method will automatically set the SaveUseIFDOffset property to false. The application must then explicitly set the value back to true as needed.
  • When the SaveIFDOffset property is zero, a normal write (not fast TIFF write) will occur regardless of the SaveUseIFDOffset value. The fast write will take place only when SaveIFDOffset is set to non-zero and the SaveUseIFDOffset is set to true.
VB Example Copy Code
' This code demonstrates how to use the SaveUseIFDOffset and SaveIFDOffset properties to safely enable fast TIFF writing

Dim outputFile As String
Dim myIfdOffset As Long

Public Sub SaveMpTiffUsingIfd()
    tp.SaveMultiPage = True
    tp.SaveFileType = TP_SaveFileType_Tiff
    outputFile = App.Path & "\mpIfd.tif"
    Dim fso As New FileSystemObject
    If fso.FileExists(outputFile) Then
        Kill outputFile
    End If
    Set fso = Nothing
    tp.StartSession
End Sub

Private Sub tp_PostScan(Cancel As Boolean)
    tp.SaveUseIFDOffset = True
    tp.SaveIFDOffset = myIfdOffset
    tp.SaveFile outputFile
    myIfdOffset = tp.SaveIFDOffset
End Sub

See Also

SaveUseIFDOffset Property
SaveIFDOffset Property


Access Extended Image Information
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Acquire Images and Image Information > Access Extended Image Information

Glossary Item Box

What is Extended Image Information?

Extended image information is used to pass information such as barcodes or patch codes found on a scanned page. See the TWAIN specification for additional information on Extended Image Information available for retrieval.

The TWAIN Data Source must be compliant with version 1.7 or higher of the TWAIN specification for accessing this extended information.

The property EnableExtendedImageInfo must be set to true to access the extended image information. This should be done after the TwainPro control is first created.

Access Extended Image Information

The extended image information is populated with the values from the Twain Data Source during the PostScan Event by calling the GetExtendedImageInfo method.

Getting extended image information values is done in the same manner as getting the values for a capability. The CapValue , CapString , CapItem , and CapItemString properties provide the means to retrieve the value for each element in the array that was previously set up. To access each element, the program must move through the array by using the CapExtInfoIndex property.

The CapType property can be used to determine whether the returned information is a single value or an array of values. This can also be determined by looking at the property CapNumItems. A value of one for CapNumItems means a single item has been returned, which is the same as CapType being equal to TWON_ONEVALUE. A value greater than one for CapNumItems is the same as CapType being equal to TWON_ARRAY. These are the only values that CapType can be for extended image information. To determine if the TWAIN Data Source was able to fill in any value then the CapSupported function can be used.

VB Example Copy Code
' This code demonstrates how to access the previously requested extended image information
' Get the Barcode Count
Private Sub TwainPRO_PostScan(Cancel As Boolean)
   TwainPRO.GetExtendedImageInfo(TWEI_BARCODECOUNT)
    If (TwainPRO.CapSupported) Then
        Dim nBarcodeCount as Long
        nBarcodeCount = TwainPRO.CapValue
    End If
End Sub

See Also

CapValue Property
CapString Property
CapItem Property
CapItemString Property
CapExtInfoIndex Property
CapType Property
CapNumItems Property
CapSupported Property
GetExtendedImageInfo Method


End a TWAIN Session

Accusoft.TwainPro7.ActiveX
End a TWAIN Session
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > End a TWAIN Session

Glossary Item Box

The TWAIN Session can be ended at any point. The actions to be taken depend on the state of the session.

During Data Source Selection

OpenDSM or SelectSource has previously been called to open the Data Source Manager. Call CloseSession to close the Data Source Manager and terminate the TWAIN session.

During Capability Negotiation

OpenSession has previously been called to open the Data Source Manager and Data Source. Call CloseSession to close the Data Source and Data Source Manager and terminate the TWAIN session.

During a Scanning Session

StartSession has previously been called to begin a scanning session. The TWAIN session can be terminated during the PreScan or PostScan event by setting the Cancel parameter. The TWAIN session can be cancelled during image transfer or during the PreScan or PostScan events by setting CancelPendingXfers. Either of these actions will cancel all pending image transfers, close the Data Source and the Data Source Manager, and terminate the TWAIN session.

See Also

CloseSession Method
CancelPendingXfers Method


Debug

Accusoft.TwainPro7.ActiveX
Debug
See Also Send Feedback
TwainPRO 7 for ActiveX - User Guide > How To > Debug

Glossary Item Box

1 - I am encountering a problem with a TWAIN Device.

If you have a problem with a Twain device we recommend trying the following things:

  1. Get the latest version of the scanner's drivers from the manufacturer's web site and re-install them.

  2. Get the latest Twain Data Source Manager files from www.Twain.org and put them in your windows directory (NOT the windows\system directory). Also, make sure you don't have older versions of those DLLs or EXEs anywhere else in your path.

  3. Make sure you have the latest version of TwainPRO™.

  4. If you still have a problem with a particular scanner, let us know, but remember, not all TWAIN capabilities are supported by all devices and there are TWAIN drivers out there that have bugs in them and are not fully TWAIN compliant.

2 - It appears that setting a capability has no effect on the scanned image.

There are a couple of reasons this issue may be occurring:

Resolution 1:

Please make sure that you call OpenSession before setting the capabilities. For example:

Example Copy Code
TwainPRO1.SelectSource
TwainPRO1.ShowUI = False
TwainPRO1.OpenSession

Resolution 2:

Not all TWAIN devices support all TWAIN capabilities. Because of this, you must check to see if a TWAIN capability is supported by your device before setting it.

To do this, TwainPRO™ provides a method called CapSupported, which will return True if the capability is supported and False if not. Note that if a scanner supports a capability, it might only support getting it and does not necessarily support setting it.

Below is an example of how to check this property:

Example Copy Code
TwainPRO1.Capability = ICAP_PIXELTYPE
If (TwainPRO1.CapSupported) Then
' If setting capability is supported this code will be executed
End If

3 - I want to drive a scanner via the Kofax VRS TWAIN driver without using the Kofax TWAIN UI.

Kofax VirtualReScan (VRS) works best with an ISIS driver and only supports some scanners with TWAIN drivers. Documentation for Kofax VRS can be found at www.kofax.com/support/IP/VRS/4.1/4.1_downloads.asp#ProductDocumentation.

Error Codes

7000

TWERR_TWAIN

Twain error, check ErrorCode & ErrorString properties.

The Data Source has returned an error. Check the ErrorCode and ErrorString properties to see if the Data Source has returned an error code.

7001

TWERR_TINIT

Can't find or load TWAIN DSM (TWAINDSM.dll, Version 2).

The 32-bit version should be installed in the SYSTEM32 directory on native 32-bit Windows systems. On native 64-bit Windows systems, the 32-bit version should be installed in the SYSWOW64 directory. The latest version can be found at www.twain.org.

Possible causes:

The file is missing.

The file is in use by another application.

7002

TWERR_FILEOPEN

TwainPRO can’t open an existing TIF file to append pages.

Possible causes:

The file is open in another control or application.

The file is read-only

7003

TWERR_MEMORYALLOC

TwainPRO was unable to allocate memory for the requested operation.

Possible causes:

The image being transferred is too large to fit in memory.

Too many applications are open.

7004

TWERR_CANCELLED

The user cancelled the requested operation.

Possible causes:

The user clicked the cancel button on the source selection dialog invoked by the SelectSource method.

7005

TWERR_CREATEFILE

TwainPRO was unable to create the file specified in the SaveFile method.

Possible causes:

The drive or path specified doesn’t exist.

The file exists and is in use by another application.

No file extension or an invalid file extension was specified.

7006

TWERR_FILEWRITE

An error occurred while TwainPRO was attempting to save a file to the path specified in the SaveFile method.

Possible causes:

The drive or path became invalid during the write. This can occur if the drive is a network drive.

The disk is full.

7007

TWERR_FORMATNOTSUPPORTED

A file extension for specified for a file type not supported by TwainPRO. Supported file types are: BMP,

JPEG, ePIC, and TIF.

7008

TWERR_BADLENGTH

A string with too many characters was set to a TwainPRO property.

Possible causes:

The application identity properties can accept a maximum length of 32 characters.

The PICPassword property can accept a maximum length of 8 characters.

7009

TWERR_BADVALUE

The value is out of range. An invalid value was set to a TwainPRO property.

Possible causes:

Many TwainPRO properties can only accept values in a specified range. For example, the SaveJPEGLumFactor property must be in the range 0-255.

7010

TWERR_NODIB

No image is available for the requested operation or an unsupported DIB format was returned in response to a StartSession.

Possible causes:

The hDIB property has already been read.

The SaveFile method was invoked after the hDIB property was read.

7011

TWERR_NOPICFILES

The required Accusoft dll file(s) are missing.

Possible causes:

Accusoft dll files are required when saving JPEG, ePIC, or TIF files. They are listed in the dependencies section.

7012

TWERR_NONETFILES

The required Internet dll file(s) are missing.

Possible causes:

The following files are not present on the system. These files are not shipped with TwainPRO and are not needed unless an FTP address is specified in the SaveFile method. These files are included with other software such as Internet Explorer, and if the machine has a TCP/IP connection, it should have these files.

wininet.dll

urlmon.dll

7013

TWERR_FTP

An error occurred trying to FTP an image.

Possible causes:

The machine is not currently connected to a network. The FTPUserName and/or FTPPassword properties are not correct for the requested host specified in the SaveFile method.

The host and or path specified in the SaveFile method doesn’t exist.

The path was not specified in the SaveFile method. A fully qualified URL containing both the servername and file path must be specified. For example, "http://ftp.myserver.com/ftp/public/test.jpg" contains both the server and file information, but "http://ftp.myserver.com" does not.

7014

TWERR_TSEQERROR

Illegal operation for current Source Manager or Source state. The requested action cannot be performed in the current state of the Twain session.

Possible causes:

Certain methods and properties are only valid during certain states. For example, the DataSourceList property is invalid unless the OpenDSM method was called to open the Data Source Manager.

7015

TWERR_BADINDEX

The requested index was out of range for the property array.

7016

TWERR_WRONGCAPTYPE

A property was set or queried that was not valid for the current capability type. Please see the Capability Negotiation section for more information.

7017

TWERR_CLIPBOARD

An error occurred trying to open the clipboard with the CopyToClipboard or CutToClipboard method.

Possible causes:

Another application has the clipboard open.

7018

TWERR_INTERNALERROR

Internal error.

7019

TWERR_BADBITCOUNT

Invalid image resolution for selected file format or an unsupported bits per pixel was returned from a StartSession.

Possible causes:

Tried to save a 1-bit or Black and White image to a jpg or pic file.

7020

TWERR_NOTAVAILABLE

The property requested is not currently available.

Possible causes:

This error is returned when the CapAdvanced property is being used and the requested capability function is not available. For instance, this error will be returned when the Capability property is set to TP_Capability_UseCapAdvanced and the property CapDesc is accessed. The CapDesc property is only available for the enumerated Capability values. Also this error will be returned when the Capability property is set to TP_Capability_UseCapAdvancedFOREXTINFO and the CapOut properties are accessed.

7021

TWERR_NOIMAGE

No compressed image is available for the requested operation or an unsupported compressed image format was returned in response to a StartSession.

Possible causes:

The hImage property has already been read.

The SaveFile method was invoked after the hImage property was read.

7022

TWERR_DSINVALIDOP

The Data Source performed an operation that caused an exception. This error is a critical error. If this error is received then the application should be terminated immediately. No other TwainPRO calls should be made after this error is received. This does give the application the chance to do any non-TWAIN clean-up processing as well as inform the user that a critical error has occurred.

Possible causes:

The Data Source TWAIN driver executed an illegal operation, such as an illegal memory access, a divide by zero, etc.

7023

TWERR_INVALIDLICENSE

Invalid license.

7024

TWERR_TIFFTAGNOTFOUND

TIFF tag not found.

7025

TWERR_TIFFTAGITEMNOTFOUND

TIFF tag item not found.

7026

TWERR_BADFILEREAD

Error reading file.

7027

TWERR_SETTINGSFILEINIT

An error occurred while initializing the settings file reader system.

7028

TWERR_SETTINGSFILETERM

An error occurred while terminating the settings file reader system.

7029

TWERR_FILENOTOPEN

An error occurred when opening the settings file.

7030

TWERR_NAMENOTFOUND

The TwainDevice Name attribute was not found in the settings file.

7031

TWERR_SCANNERNOTFOUND

Settings for the current scanner were not found in the settings file.

7032

TWERR_ENUMNOTFOUND

The Capability Enum attribute was not found in the settings file.

7033

TWERR_INVALIDFILENAME

Invalid file name.

7034

TWERR_FILENOTFOUND

The specified file was not found for the current LoadOptions operation.

7035

TWERR_PATHNOTFOUND

The specified path of the filename was not found.

7036

TWERR_FILEINUSE

The file is in use by another process and cannot be opened.

7037

TWERR_FILECLOSE

The file close operation could not be completed.

7038

TWERR_FILERESET

The file reset operation could not be completed.

7039

TWERR_TYPENOTFOUND

The Capability Type attribute was not found in the settings file.
7101 | TWERR_DSMV1NOTFOUND | Can't find or load TWAIN DSM (twain_32.dll, Version 1) in the Windows directory. The latest version can be found at www.twain.org.
7102 | TWERR_DSMNOTFOUND | Can't find or load any version of the Twain Data Source Manager. The latest version can be found at www.twain.org.
7103 | TWERR_DSM1NOTALLOWED64BIT | On native 64-bit systems, Version 1 of the DSM (twain_32.dll) can't be used, you must use at least Version 2 (TWAINDSM.dll).
7104 | TWERR_DSM2_64NOTFOUND | Can't find or load TWAIN DSM (TWAINDSM.dll, Version 2). The 64-bit version of TwainDSM.dll should be installed in the SYSTEM32 directory. The latest version can be found at www.twain.org.
7105 | TWERR_DSM_SETTONONENOTALLOWED | DataSourceManagerVersion can't be set to None, please choose a valid version to use.
7106 | TWERR_SOURCECOMPRESSIONONLY | The image was compressed directly in hardware by the source and not by TwainPro, please use SaveSoureCompressedImageToFile() or SaveSourceCompressedImageToStream() to save the scanned image.
7107 | TWERR_TWAINPROCOMPRESSIONONLY | Hardware compression isn't available so only TwainPro can compress the image, please use SaveToFile() or SaveToStream() to save the scanned image.
7108 | TWERR_JPEGLUMFACTORBADVALUE | The JPEG Luminance value is out of range. It should be within the range of 0 to 255.
7109 | TWERR_JPEGCHROMFACTORBADVALUE | The JPEG Chrominance value is out of range. It should be within the range of 0 to 255.
7110 | TWERR_JPEGSUBSAMPLINGBADVALUE | The JPEG Subsampling value is incorrect. It should be one of the available enumeration values: 111, 211, 411, or 211v.
7111 | TWERR_PNGFILTERBADVALUE | The PNG Filter value is incorrect. Please check the enumeration declaration for supported values.

Extended Error Codes

The following are error codes and strings that can be returned in the ErrorCode and ErrorString properties when TwainPRO™ returns a TWERR_TWAIN error.

1 | TWCC_BUMMER | General failure. Unload Source immediately.
2 | TWCC_LOWMEMORY | Not enough memory to complete operation.
3 | TWCC_NODS | Source Manager unable to find the specified Source.
4 | TWCC_MAXCONNECTIONS | Source is connected to maximum supported number of applications.
5 | TWCC_OPERATIONERROR | Source or Source Manager reported an error to the user and handled the error; no application action required.
6 | TWCC_BADCAP | Capability not supported by Source.
9 | TWCC_BADPROTOCOL | Unrecognized operation triplet.
10 | TWCC_BADVALUE | Data parameter out of supported range.
11 | TWCC_SEQERROR | Illegal operation for current Source Manager or Source state.
12 | TWCC_BADDEST | Unknown destination in DSM_Entry.
13 | TWCC_CAPUNSUPPORTED | Capability not supported by Source.
14 | TWCC_CAPBADOPERATION | Operation not supported on capability.
15 | TWCC_CAPSEQERROR | Capability has dependencies on other capabilities and cannot be operated upon at this time.
16 | TWCC_DENIED | File System operation is denied (file is protected).
17 | TWCC_FILEEXISTS | Operation failed because file already exists.
18 | TWCC_FILENOTFOUND | File not found.
19 | TWCC_NOTEMPTY | Operation failed because directory is not empty.
20 | TWCC_PAPERJAM | Transfer failed because of a feeder error.
21 | TWCC_PAPERDOUBLEFEED | Transfer failed because of a feeder error.
22 | TWCC_FILEWRITEERROR | Error writing the file.
23 | TWCC_CHECKDEVICEONLINE | The device went off-line prior to or during this operation.
24 | TWCC_INTERLOCK | Operation failed because the cover or door is open.
25 | TWCC_DAMAGEDCORNER | Operation failed because the document has a damaged corner.
26 | TWCC_FOCUSERROR | Operation failed because of a focusing error during document capture.
27 | TWCC_DOCTOOLIGHT | Operation failed because the document is too light.
28 | TWCC_DOCTOODARK | Operation failed because the document is too dark.
29 | TWCC_NOMEDIA | Operation failed because no media is present for the source to capture.

See Also

OpenSession Method
CapSupported Property


TwainPRO 7 for ActiveX - API Reference

Accusoft.TwainPro7.ActiveX
TwainPRO 7 for ActiveX - API Reference
Send Feedback

Glossary Item Box

This API Reference provides detailed information about all TwainPRO public API members.


Project Overview

Accusoft TwainPRO 7
Project Overview
Send comments on this topic.

Glossary Item Box

Description

Accusoft TwainPRO 7

Classes

Class Module | Description
TwainPro | TwainPro Class

Public Enumerations

Enumeration | Description
TP_AdvancedCapability | Specifies valid values for use in specifying capabilities.
TP_Capability | Specifies valid values for use in specifying capabilities for the Capability property.
TP_CapAdvConstants | Specifies valid values for use in specifying capabilities.
TP_CapConstants | Option values for use in specifying capabilities.
TP_CapType | Option values for use in specifying capabilities for the CapType and CapTypeOut properties.
TP_ChoiceType | Option values which determine the Twain choice type.
TP_ConditionCode | Option values for specifying extended error information.
TP_DataSourceManagerVersion | Option values for specifying the DataSourceManger Version.
TP_DebugErrorLevel | Option values which determine the error level of items to place into the debug log.
TP_ErrorCode | Specifies valid values for error codes.
TP_EvaluationMode | Defines named constants for control of trial and full license TwainPRO editions.
TP_ExtendedInfo | Option values for use in specifying capabilities.
TP_ExtInfoConstants | Specifies valid values for use in specifying capabilities.
TP_HorizontalAlignment | Contains constants for use with the HAlign property.
TP_Orientation | Option values which determine the ICAP_ORIENTATION capability.
TP_PngFilter | The filters available for PNG compression.
TP_SaveFileType | Option values which determine the file type to save as.
TP_SaveJBIG2EncodeModeCompression | Option values which determine the encoding mode to use when creating a JBIG2 compressed file.
TP_SaveJBIG2FileOrgCompression | Option values which determine the file organization when saving a JBIG2 compressed file.
TP_SavePDFCompressionType | Option values which determine the PDF compression type.
TP_SaveTIFFCompressionType | Contains constants for use with the SaveTIFFCompression property.
TP_SubSample | Contains constants for use with the SaveJPEGSubSampling property.
TP_SupportedSizes | Contains constant sizes for use with the TWCAP_SUPPORTEDSIZES capability.
TP_TOHDIBMETHOD | Specifies the ToHdib method type.
TP_TransferMode | Contains constants for use with the TransferMode property.
TP_VerticalAlignment | Contains constants for use with the VAlign property.


TwainPro Object

TwainPro Object
See Also Members Send comments on this topic.
AccusoftTwainPro7 ActiveX DLL : TwainPro Object

Glossary Item Box

Description

TwainPro Class

Object Model

TwainPro Object

See Also

TwainPro Members


TwainPro Object Members

TwainPro Object Members
See Also Overview Send comments on this topic.
AccusoftTwainPro7 ActiveX DLL : TwainPro Object

Glossary Item Box

Public Methods

Public Method AboutBox | Displays an "about box" describing the control and displaying pertinent information.
Public Method CancelPendingXfers | Moves the Data Source from the Image Transfer state to the Capability Negotiation state. (Before StartSession is called)
Public Method CloseSession | Disables and closes the current data source and Data Source Manager.
Public Method CopyToClipboard | Copies the current image to the clipboard.
Public Method CutToClipboard | Cuts the current image to the clipboard.
Public Method DisplayUI | Displays the user interface.
Public Method GetCustomDataSourceData | Gets custom data (current settings, e.g., DPI, paper size, color format) from the source to the application. The source settings will be returned in a format that is source dependent and not defined by TWAIN.
Public Method GetExtendedImageInfo | Gets the Extended Image Info, such as barcode and patch code data, for the current page.
Public Method GetExtInfo | Gets the Extended Image Info, such as barcode and patch code data, for the current page.
Public Method GetImageLayout | Gets the Left, Top, Right, and Bottom sides of the Image Layout rectangle for the current Data Source.
Public Method LoadSettings | Loads settings for the filename given.
Public Method OpenDSM | Opens the Source Manager.
Public Method OpenSession | Opens the Data Source Manager and Data Source, placing TwainPRO into the Capability Negotiation state.
Public Method SaveFile | Saves the current acquired DIB as a file given a path and file name.
Public Method SaveSettings | Saves settings for the filename given.
Public Method SaveSourceCompressedImageToFile | Saves the Source-compressed image as a file given a path and file name.
Public Method SaveSourceCompressedImageToHandle | Saves the Source-compressed image to a handle.
Public Method SaveSourceCompressedImageToHandle64 | Saves the Source-compressed image to a handle in a 64-bit environment.
Public Method SaveSourceCompressedImageToVariant | Saves the Source-compressed image to a variant.
Public Method SaveToFile | Saves the TwainPro-compressed image as a file given a path and file name.
Public Method SaveToHandle | Saves TwainPro-compressed image to a handle.
Public Method SaveToHandle64 | Saves TwainPro-compressed image to a handle in a 64-bit environment.
Public Method SaveToVariant | Saves TwainPro-compressed image to a variant.
Public Method SelectSource | Displays the TWAIN Data Source Manager's Source Selection User Interface (UI) so the user can choose which Data Source is the current Source.
Public Method SetCapOut | Set the current capability using the container specified by CapTypeOut and the values in the various Cap Out properties.
Public Method SetCustomDataSourceData | Sets custom data (current settings, e.g., DPI, paper size, color format) of the source from the application. The source settings are in a format that is source dependent and not defined by TWAIN.
Public Method SetDataSource | Selects a TWAIN Data Source from the DataSourceList property as the current Data Source.
Public Method SetImageLayout | Sets the Left, Top, Right, and Bottom sides of the Image Layout rectangle for the current Data Source.
Public Method SetOEMLicenseKey | Sets the control runtime OEM license key.
Public Method SetSolutionKey | Sets the control runtime license deployment solution key.
Public Method SetSolutionName | Sets the control runtime license deployment solution name.
Public Method StartSession | Enables the Current Data Source and places it into the Image Transfer state.
Public Method ToHdib | Returns the handle to the current DIB (Device Independent Bitmap).
Public Method ToHdib64 | Returns the handle to the current DIB (Device Independent Bitmap) in a 64-bit environment.

Public Properties

Public Property Capability | Gets and sets which Twain capability to negotiate.
Public Property CapAdvanced | Gets or sets the advanced capabilities.
Public Property CapDefault | Gets the default value for a capability.
Public Property CapDefaultFrameBottom | Returns the default bottom value for the frame capability.
Public Property CapDefaultFrameLeft | Returns the default left value for the frame capability.
Public Property CapDefaultFrameRight | Returns the default right value for the frame capability.
Public Property CapDefaultFrameTop | Returns the default top value for the frame capability.
Public Property CapDesc | Gets the description for the specified constant for the current capability.
Public Property CapExtInfoCount | Gets or sets the number of extended image information requested from a TWAIN Data Source that supports getting extended image information.
Public Property CapExtInfoIndex | Gets or sets the current position in the previously allocated extended image information array.
Public Property CapFrameBottom | Returns the current bottom value for the frame capability.
Public Property CapFrameBottomOut | Sets the current bottom value for the frame capability.
Public Property CapFrameLeft | Returns the current left value for the frame capability.
Public Property CapFrameLeftOut | Sets the current left value for the frame capability.
Public Property CapFrameRight | Returns the current right value for the frame capability.
Public Property CapFrameRightOut | Sets the current right value for the frame capability.
Public Property CapFrameTop | Returns the current top value for the frame capability.
Public Property CapFrameTopOut | Sets the current top value for the frame capability.
Public Property CapItem | Gets legal values for the specified capability.
Public Property CapItemFrameBottom | Returns the bottom value for the frame capability at the specified index in the collection.
Public Property CapItemFrameBottomOut | Sets the bottom value for the frame capability at the specified index in the collection.
Public Property CapItemFrameLeft | Returns the left value for the frame capability at the specified index in the collection.
Public Property CapItemFrameLeftOut | Sets the left value for the frame capability at the specified index in the collection.
Public Property CapItemFrameRight | Returns the right value for the frame capability at the specified index in the collection.
Public Property CapItemFrameRightOut | Sets the right value for the frame capability at the specified index in the collection.
Public Property CapItemFrameTop | Returns the top value for the frame capability at the specified index in the collection.
Public Property CapItemFrameTopOut | Sets the top value for the frame capability at the specified index in the collection.
Public Property CapItemOut | Sets a new legal value for a particular capability when CapType = TWCAP_ENUM or TWCAP_ARRAY.
Public Property CapItemString | Gets legal values for the specified capability.
Public Property CapMax | Gets the maximum value in a range when the CapType = TWCAP_RANGE.
Public Property CapMaxOut | Sets the maximum value in a range when CapTypeOut = TWCAP_RANGE.
Public Property CapMin | Gets the minimum value in a range when the CapType is TWCAP_RANGE.
Public Property CapMinOut | Gets the minimum value in a range when CapTypeOut = TWCAP_RANGE.
Public Property CapNumFrameItemsOut | Sets the number of items in an enumeration for the frame capability.
Public Property CapNumItems | The number of items in a list or array when CapType = TWCAP_ENUM or TWCAP_ARRAY.
Public Property CapNumItemsOut | Sets the number of items in a list or array when CapTypeOut = TWCAP_ENUM or TWCAP_ARRAY.
Public Property CapStep | Gets the step value in a range when the CapType is TWCAP_RANGE.
Public Property CapStepOut | Sets the step value in a range when CapTypeOut = TWCAP_RANGE.
Public Property CapString | Gets the current string value for a capability.
Public Property CapStringOut | Sets the current string value for a capability.
Public Property CapSupported | Gets whether the current capability is supported by the TWAIN device.
Public Property Caption | Gets and sets the text placed on a still frame.
Public Property CaptionHeight | Gets and sets the height in pixels of the clip rectangle used to write a caption to a frame during a frame capture.
Public Property CaptionLeft | Gets or sets the x or left offset in pixels to write the caption to a frame during a frame capture.
Public Property CaptionTop | Gets and sets the y or top offset in pixels to write the caption to a frame during a frame capture.
Public Property CaptionWidth | Gets and sets the width in pixels of the clip rectangle used to write a caption to a frame during a frame capture.
Public Property CapType | Gets the type of container used to transfer capability information from the Source.
Public Property CapTypeOut | Gets and sets the type of container used to transfer capability information to the Source.
Public Property CapValue | Gets the current value for a capability.
Public Property CapValueOut | Sets the current value for a capability.
Public Property ClipCaption | Gets and sets whether the Caption is clipped by the CaptionWidth and CaptionHeight properties or clipped using the right and bottom edges of the frame.
Public Property CloseOnCancel | Gets and sets whether the Twain User Interface should be closed when the operation is cancelled.
Public Property CloseSessionAfterAcquisition | Gets or sets a value indicating whether the session with the data source and data source manager will be closed before returning from the StartSession method.
Public Property CurrentDataSource | Gets the index of the currently selected Data Source.
Public Property DataSourceCount | Gets the number of TWAIN Data Source product names.
Public Property DataSourceList | A string array of Data Source product names.
Public Property DataSourceManagerVersion | Specifies what version of the TWAIN Data Source Manager is used, by default it is set to LatestSupportedVersionAvailable.
Public Property DataSourceManagerVersionInUse | Specifies what version of the TWAIN Data Source Manager is in use.
Public Property Debug | Gets or sets an indicator which determines if the component writes information to a DebugLogFile or not.
Public Property DebugErrorLevel | Gets or sets the error level of items that the component should write to the debug log file.
Public Property DebugLogFile | Gets or sets the filename of the debug log file.
Public Property EnableExtCaps | Gets and sets an indicator if the extended capabilities for feedpage and clearpage are enabled.
Public Property EnableExtendedImageInfo | Enables if extended image info attributes can be retrieved from the source.
Public Property ErrorCode | Gets the extended error code returned by the Twain Source.
Public Property ErrorDescription | Gets a description of the extended error code returned by the Twain Source.
Public Property EvaluationMode | Gets and sets how the control will behave when in evaluation (non-licensed) mode.
Public Property Font | Gets and sets the font used to draw the Caption on the current still frame.
Public Property ForeColor | Gets and sets the color used to draw the Caption on the current still frame.
Public Property FTPPassword | Gets and sets the password used to log into an ftp site.
Public Property FTPUserName | Gets and sets the user name used to log into an ftp site.
Public Property HAlign | Gets and sets the horizontal alignment of the caption within the clipping rectangle.
Public Property hDIB | Gets the Window handle to the current DIB (Device Independent Bitmap).
Public Property hImage | Gets the Window handle to the current compressed Image, either in TIFF or JPEG format.
Public Property hParentWnd | Gets and sets a window handle to the TwainPRO object for applications that create TwainPRO in-process rather than placing it on a form.
Public Property IBPP | Gets the bits per pixel of the current image.
Public Property ICompression | Gets the compression format of the current image.
Public Property IHeight | Gets the height of the current image.
Public Property IPixelType | Gets the pixel type of the current image.
Public Property IResX | Gets the X resolution of the current image.
Public Property IResY | Gets the Y resolution of the current image.
Public Property IWidth | Gets the width of the current image.
Public Property Manufacturer | Gets or sets the manufacturer string for the application identity.
Public Property MaxImages | Gets or sets the maximum number of images expected from a TWAIN Data Source that supports multiple image scanning.
Public Property PendingXfers | Gets the number of image transfers the TWAIN Data Source is ready to supply to the TwainPRO control.
Public Property PICPassword | Gets or sets the password for an ePIC file.
Public Property Picture | Gets the picture object containing a copy of the current frame buffer.
Public Property ProductFamily | Gets or sets the Product Family string for the application identity.
Public Property ProductName | Gets or sets the Product Name string for the application identity.
Public Property ProxyServer | Many organizations use a proxy server to allow individual computers to access the Internet through the local LAN.
Public Property RaiseExceptions | Gets and sets whether exceptions are raised.
Public Property SaveFileType | Gets and sets the type of file to save.
Public Property SaveIFDOffset | Gets and sets the location to append the next TIFF page when fast saving of multi-page TIFF files is invoked.
Public Property SaveJBIG2EncodeModeCompression | Gets and sets the encoding mode to use when creating JBIG2 compressed files.
Public Property SaveJBIG2FileOrgCompression | Gets and sets the file organization when saving a JBIG2 compressed file.
Public Property SaveJBIG2InvertedRegion | Gets and sets an indicator if the bits should be inverted prior to symbol analysis.
Public Property SaveJBIG2LoosenessCompression | Gets and sets how loose to be when matching symbols and compressing text using either of the lossy text region encode modes.
Public Property SaveJPEGChromFactor | Gets and sets the chrominance quality setting for saving JPEG and ePIC files.
Public Property SaveJPEGLumFactor | Gets and sets the luminance quality setting for saving JPEG and ePIC files.
Public Property SaveJPEGProgressive | Gets and sets whether JPEG or ePIC files are to be saved as standard files or progressive files.
Public Property SaveJPEGSubSampling | Gets and sets the desired sub-sampling.
Public Property SaveMultiPage | Gets and sets if a TIFF file should be saved as the next page in an existing file.
Public Property SavePDFCompression | Gets and sets the compression type for saving a PDF file.
Public Property SavePDFSwapBlackAndWhite | Gets and sets an indicator if the pixel value of zero is set to black or white.
Public Property SavePNGBackgroundColor | Specifies the background color for the image.
Public Property SavePNGFilter | Gets and sets the filter used for PNG compression.
Public Property SavePNGInterlaced | Specifies if the image is saved as interlaced or not.
Public Property SavePNGSwapRedAndBlue | Specifies if the image's Red and Blue pixels are swapped.
Public Property SavePNGTransparencyColor | Specifies the transparency color for the image.
Public Property SavePNGUseBackgroundColor | Specifies if the image is saved with a background color or not.
Public Property SavePNGUseTransparencyColor | Specifies if the image is saved with a transparency color or not.
Public Property SaveTIFFCompression | Gets and sets the TIFF compression type for saving a TIFF file.
Public Property SaveUseIFDOffset | Gets and sets an indicator to enable fast multi-page TIFF writes.
Public Property ShadowText | Gets and sets if a drop shadow should be placed under the caption.
Public Property ShowUI | Gets or sets whether the TWAIN data source displays its user interface when invoking the StartSession method.
Public Property TransferMode | Gets or sets the transfer mode for scanning.
Public Property TwainConditionCode | Gets additional TWAIN error information from the data source.
Public Property TwainConditionDescription | Gets the TWAIN error information description from the data source.
Public Property VAlign | Gets and sets the vertical alignment of the caption within the clipping rectangle.
Public Property Version | Returns the version of the TwainPro control at run-time.
Public Property VersionInfo | Gets or sets the version information string for the application identity.

Events

Public Event PostScan | Raised after a scan or transfer ends.
Public Event PreScan | Raised before a scan or transfer begins.

See Also

TwainPro Object


AboutBox Method

AboutBox Method
See Also Send comments on this topic.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : AboutBox Method

Glossary Item Box

Description

Displays an "about box" describing the control and displaying pertinent information.

Syntax

Visual Basic
Public Sub AboutBox()

Remarks

This is the same as what is displayed at design time when the "..." button in the Properties window is clicked.

See Also

TwainPro Object | TwainPro Members


CancelPendingXfers Method

CancelPendingXfers Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CancelPendingXfers Method

Glossary Item Box

Description

Moves the Data Source from the Image Transfer state to the Capability Negotiation state. (Before StartSession is called)

Syntax

Visual Basic
Public Sub CancelPendingXfers()

Remarks

All remaining image data from the Data Source is released and the PendingXfers property is set to zero. This method may only be used while the Data Source is in the Image Transfer state, otherwise an error is generated.

See Also

TwainPro Object | TwainPro Members | PendingXfers Property


CloseSession Method

CloseSession Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CloseSession Method

Glossary Item Box

Description

Disables and closes the current data source and Data Source Manager.

Syntax

Visual Basic
Public Sub CloseSession()

Remarks

For every OpenSession or OpenDSM (Data Source Manager) method call, you need to close the TwainPRO session with CloseSession. This method cancels any pending image transfers, if the data source was in the image transfer state. The StartSession method calls CloseSession internally before returning if the CloseSessionAfterAcquisition property is set to true (which is the default value). In this case, it is not necessary to call CloseSession after StartSession. If the CloseSessionAfterAcquisition property is set to false, then the session will remain open and return to the Capability Negotiation state after StartSession.

See Also

TwainPro Object | TwainPro Members | StartSession Method | OpenSession Method | OpenDSM Method


CopyToClipboard Method

CopyToClipboard Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CopyToClipboard Method

Glossary Item Box

Description

Copies the current image to the clipboard.

Syntax

Visual Basic
Public Sub CopyToClipboard()

Remarks

This method makes a copy of the current image and places it on the clipboard. This will leave the hDIB property valid for operations such as the SaveFile method, but will leave two copies of the image in memory which could be a problem if the image is very large.

See Also

TwainPro Object | TwainPro Members | SaveFile Method | hDIB Property


CutToClipboard Method

CutToClipboard Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CutToClipboard Method

Glossary Item Box

Description

Cuts the current image to the clipboard.

Syntax

Visual Basic
Public Sub CutToClipboard()

Remarks

This method places the current image on the clipboard. The hDIB property will not be valid after this operation. If you wish to save the image to file, the SaveFile method must be invoked prior to the CutToClipboard method.

See Also

TwainPro Object | TwainPro Members | hDIB Property | SaveFile Method


DisplayUI Method

DisplayUI Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : DisplayUI Method

Glossary Item Box

Description

Displays the user interface.

Syntax

Visual Basic
Public Sub DisplayUI()

Remarks

Displays the Data Source's User Interface so the user can manipulate scanner settings but not acquire an image at this time.

See Also


GetCustomDataSourceData Method

GetCustomDataSourceData Method
customDataSourceDataFileName
A string representation of a legal file name (path) to which the custom data, which has been read from the source, will be written.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : GetCustomDataSourceData Method

Glossary Item Box

Description

Gets custom data (current settings, e.g., DPI, paper size, color format) from the source to the application. The source settings will be returned in a format that is source dependent and not defined by TWAIN.

Syntax

Visual Basic
Public Sub GetCustomDataSourceData( _
   ByVal customDataSourceDataFileName As String _
)

Parameters

customDataSourceDataFileName
A string representation of a legal file name (path) to which the custom data, which has been read from the source, will be written.

Remarks

See Also


GetExtendedImageInfo Method

GetExtendedImageInfo Method
extendImageInfo
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : GetExtendedImageInfo Method

Glossary Item Box

Description

Gets the Extended Image Info, such as barcode and patch code data, for the current page.

Syntax

Visual Basic
Public Sub GetExtendedImageInfo( _
   ByVal extendImageInfo As TP_ExtendedInfo _
)

Parameters

extendImageInfo
Value | Description
TWEI_BARCODECONFIDENCE | Barcode confidence
TWEI_BARCODECOUNT | Barcode count
TWEI_BARCODEROTATION | Barcode rotation
TWEI_BARCODETEXT | Barcode text
TWEI_BARCODETEXTLENGTH | Barcode text length
TWEI_BARCODETYPE | Barcode type
TWEI_BARCODEX | Barcode x value
TWEI_BARCODEY | Barcode y value
TWEI_BLACKSPECKLESREMOVED | Black speckles removed
TWEI_BOOKNAME | Book name
TWEI_CAMERA | Camera
TWEI_CHAPTERNUMBER | Chapter number
TWEI_DESHADEBLACKCOUNTNEW | Deshade black count new
TWEI_DESHADEBLACKCOUNTOLD | Deshade black count old
TWEI_DESHADEBLACKRLMAX | Deshade black right left maximum
TWEI_DESHADEBLACKRLMIN | Deshade black right left minimum
TWEI_DESHADECOUNT | Deshade count
TWEI_DESHADEHEIGHT | Deshade height
TWEI_DESHADELEFT | Deshade left
TWEI_DESHADESIZE | Deshade size
TWEI_DESHADETOP | Deshade top
TWEI_DESHADEWHITECOUNTNEW | Deshade white count new
TWEI_DESHADEWHITECOUNTOLD | Deshade white count old
TWEI_DESHADEWHITERLAVE | Deshade white right left average
TWEI_DESHADEWHITERLMAX | Deshade white right left maximum
TWEI_DESHADEWHITERLMIN | Deshade white right left minimum(4644)
TWEI_DESHADEWIDTH | Deshade width
TWEI_DESKEWSTATUS | Deskew status
TWEI_DOCUMENTNUMBER | Document number
TWEI_ENDORSEDTEXT | Endorsed text
TWEI_FILESYSTEMSOURCE | File system source
TWEI_FORMCONFIDENCE | Form confidence
TWEI_FORMHORZDOCOFFSET | Form horizontal offset
TWEI_FORMTEMPLATEMATCH | Form template match
TWEI_FORMTEMPLATEPAGEMATCH | Form template page match
TWEI_FORMVERTDOCOFFSET | Form vertical offset
TWEI_FRAME | Frame
TWEI_FRAMENUMBER | Frame number
TWEI_HORZLINECOUNT | Horizontal line count
TWEI_HORZLINELENGTH | Horizontal line length
TWEI_HORZLINETHICKNESS | Horizontal line thickness
TWEI_HORZLINEXCOORD | Horizontal line x coordinate
TWEI_HORZLINEYCOORD | Horizontal line y coordinate
TWEI_ICCPROFILE | ICC Profile
TWEI_LASTSEGMENT | Last segment
TWEI_MAGDATA | Magnetic data
TWEI_MAGTYPE | Magnetic type
TWEI_PAGENUMBER | Page number
TWEI_PAGESIDE | Page side
TWEI_PATCHCODE | Patch code
TWEI_PIXELFLAVOR | Pixel flavor
TWEI_SEGMENTNUMBER | Segment number
TWEI_SKEWCONFIDENCE | Skew confidence
TWEI_SKEWFINALANGLE | Skew final angle
TWEI_SKEWORIGINALANGLE | Skew original angle
TWEI_SKEWWINDOWX1 | Skew window x1
TWEI_SKEWWINDOWX2 | Skew window x2
TWEI_SKEWWINDOWX3 | Skew window x3
TWEI_SKEWWINDOWX4 | Skew window x4
TWEI_SKEWWINDOWY1 | Skew window y1
TWEI_SKEWWINDOWY2 | Skew window y2
TWEI_SKEWWINDOWY3 | Skew window y3
TWEI_SKEWWINDOWY4 | Skew window y4
TWEI_SPECKLESREMOVED | Speckles removed
TWEI_VERTLINECOUNT | Vertical line count
TWEI_VERTLINELENGTH | Vertical line length
TWEI_VERTLINETHICKNESS | Vertical line thickness
TWEI_VERTLINEXCOORD | Vertical line x coordinate
TWEI_VERTLINEYCOORD | Vertical line y coordinate
TWEI_WHITESPECKLESREMOVED | White speckles removed
TWEJ_MIDSEPARATOR | Mid separator
TWEJ_NONE | none
TWEJ_PATCH1 | Patch 1
TWEJ_PATCH2 | Patch 2
TWEJ_PATCH3 | Patch 3
TWEJ_PATCH4 | Patch 4
TWEJ_PATCH6 | Patch 6
TWEJ_PATCHT | Patch T

Remarks

See Also


GetExtInfo Method

GetExtInfo Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : GetExtInfo Method

Glossary Item Box

Description

Gets the Extended Image Info, such as barcode and patch code data, for the current page.

Syntax

Visual Basic
Public Sub GetExtInfo()

Remarks

This method fills in the extended image information array previously allocated and initialized using the CapExtInfoCount, CapExtInfoIndex, and CapAdvanced properties.

Call this method only during the PostScan event.

See the section entitled Access Extended Image Information for more information.

See Also

TwainPro Object | TwainPro Members | CapExtInfoCount Property | CapExtInfoIndex Property | CapAdvanced Property | Access Extended Image Information


GetImageLayout Method

GetImageLayout Method
ImageLeft
Floating point number for the Left side of the Image Layout rectangle.
ImageTop
Floating point number for the Top side of the Image Layout rectangle.
ImageRight
Floating point number for the Right side of the Image Layout rectangle.
ImageBottom
Floating point number for the Bottom side of the Image Layout rectangle.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : GetImageLayout Method

Glossary Item Box

Description

Gets the Left, Top, Right, and Bottom sides of the Image Layout rectangle for the current Data Source.

Syntax

Visual Basic
Public Sub GetImageLayout( _
   ByRef ImageLeft As Single, _
   Optional ByRef ImageTop As Variant, _
   Optional ByRef ImageRight As Variant, _
   Optional ByRef ImageBottom As Variant _
)

Parameters

ImageLeft
Floating point number for the Left side of the Image Layout rectangle.
ImageTop
Floating point number for the Top side of the Image Layout rectangle.
ImageRight
Floating point number for the Right side of the Image Layout rectangle.
ImageBottom
Floating point number for the Bottom side of the Image Layout rectangle.

Remarks

The Image Layout rectangle defines what portion of the Data Source's scanning area is acquired.

Call this method after OpenSession and before StartSession.

See Also

TwainPro Object | TwainPro Members | StartSession Method | OpenSession Method


LoadSettings Method

LoadSettings Method
FileName
A string value which represents the filename to load options for.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : LoadSettings Method

Glossary Item Box

Description

Loads settings for the filename given.

Syntax

Visual Basic
Public Sub LoadSettings( _
   ByVal FileName As String _
)

Parameters

FileName
A string value which represents the filename to load options for.

Remarks

Loads scanner settings that were previously saved to a file using the SaveSettings method.

Note: Your scanner may not support setting all of the capabilities that are saved in the settings file. If you set the Debug property to True to write a Debug Log File, then during the LoadSettings operation all unsupported capabilities are written to the DebugLogFile.

See Also

TwainPro Object | TwainPro Members | SaveSettings Method | Debug Property


OpenDSM Method

OpenDSM Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : OpenDSM Method

Glossary Item Box

Description

Opens the Source Manager.

Syntax

Visual Basic
Public Sub OpenDSM()

Remarks

Use this method only to set the Data Source without using the SelectSource method. Use this method to set the DataSourceList and DataSourceCount properties. Then use a value from this list in the SetDataSource method before calling OpenSession.

See Also


OpenSession Method

OpenSession Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : OpenSession Method

Glossary Item Box

Description

Opens the Data Source Manager and Data Source, placing TwainPRO into the Capability Negotiation state.

Syntax

Visual Basic
Public Sub OpenSession()

Remarks

Use this method for controlling the Data Source capabilities and Data Source UI. This Method is used in conjunction with CloseSession and the capability negotiation methods.

See Also

TwainPro Object | TwainPro Members | CloseSession Method


SaveFile Method

SaveFile Method
FileName
A string representation of a legal file name (path) to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveFile Method

Glossary Item Box

Description

Saves the current acquired DIB as a file given a path and file name.

Syntax

Visual Basic
Public Sub SaveFile( _
   ByVal FileName As String _
)

Parameters

FileName
A string representation of a legal file name (path) to which the file will be saved.

Remarks

A valid FTP address can also be specified for the path, provided the FTPUserName and FTPPassword properties are set appropriately for the ftp server specified in the path. The bitmap saved will be the same bits per pixel and color depth as the current DIB.

This method can be used to specify the format of the file. If the SaveFileType property is set to TP_SaveFileType_Default, one of the following valid file extensions need to be used: .bmp, .jpg, .pic, .tif., and .pdf.

See Also

TwainPro Object | TwainPro Members | FTPUserName Property | SaveFileType Property | TP_SaveFileType Enumeration


SaveSettings Method

SaveSettings Method
FileName
A string value which represents the filename to save options for.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveSettings Method

Glossary Item Box

Description

Saves settings for the filename given.

Syntax

Visual Basic
Public Sub SaveSettings( _
   ByVal FileName As String _
)

Parameters

FileName
A string value which represents the filename to save options for.

Remarks

This method will save the settings of all settable, documented capabilities to file. A settings file contains settings for one TWAIN device, and settings for other TWAIN devices will need to be saved to separate settings files.

The LoadSettings method can be used to later load the settings from file.

Note: Your scanner might not support setting all of the capabilities that are saved in the settings file. If you set the Debug property to True to write a Debug Log File, then during the LoadSettings operation all unsupported capabilities will be written to the Debug Log File.

See Also

TwainPro Object | TwainPro Members | LoadSettings Method | Debug Property | DebugLogFile Property


SaveSourceCompressedImageToFile Method

SaveSourceCompressedImageToFile Method
FileName
A string representation of a legal file name (path) to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveSourceCompressedImageToFile Method

Glossary Item Box

Description

Saves the Source-compressed image as a file given a path and file name.

Syntax

Visual Basic
Public Sub SaveSourceCompressedImageToFile( _
   ByVal FileName As String _
)

Parameters

FileName
A string representation of a legal file name (path) to which the file will be saved.

Remarks

Note: Compression must be set for the source first by setting TP_AdvancedCapability.ICAP_COMPRESSION; and TP_AdvancedCapability.ICAP_PIXELTYPE should also be set to a pixel type that supports the compression.

The ICAP_COMPRESSION capability is used to control both the compression mode and, implicitly, the resulting file type.

For the compression modes we currently support, the output file type will be either JPEG or TIFF. If the compression mode is set to TWCP_JPEG, the resulting file type will be JPEG. Otherwise, it will be TIFF.

The following table details the supported compression modes and the implied type of file that TwainPRO will create:

Compression Mode | Output File Type
TWCP_JPEG | JPEG
TWCP_GROUP31D | TIFF
TWCP_GROUP31DEOL | TIFF
TWCP_GROUP32D | TIFF
TWCP_GROUP4 | TIFF
TWCP_PACKBITS | TIFF

All other compression modes are unsupported.

See Also


SaveSourceCompressedImageToHandle Method

SaveSourceCompressedImageToHandle Method
vVal
The 32-bit handle to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveSourceCompressedImageToHandle Method

Glossary Item Box

Description

Saves the Source-compressed image to a handle.

Syntax

Visual Basic
Public Sub SaveSourceCompressedImageToHandle( _
   ByRef vVal As Long _
)

Parameters

vVal
The 32-bit handle to which the file will be saved.

Remarks

Note: Compression must be set for the source first by setting TP_AdvancedCapability.ICAP_COMPRESSION; and TP_AdvancedCapability.ICAP_PIXELTYPE should also be set to a pixel type that supports the compression.

The ICAP_COMPRESSION capability is used to control both the compression mode and, implicitly, the resulting file type.

For the compression modes we currently support, the output file type will be either JPEG or TIFF. If the compression mode is set to TWCP_JPEG, the resulting file type will be JPEG. Otherwise, it will be TIFF.

The following table details the supported compression modes and the implied type of file that TwainPRO will create:

Compression Mode | Output File Type
TWCP_JPEG | JPEG
TWCP_GROUP31D | TIFF
TWCP_GROUP31DEOL | TIFF
TWCP_GROUP32D | TIFF
TWCP_GROUP4 | TIFF
TWCP_PACKBITS | TIFF

All other compression modes are unsupported.

See Also


SaveSourceCompressedImageToHandle64 Method

SaveSourceCompressedImageToHandle64 Method
vVal
The 64-bit handle to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveSourceCompressedImageToHandle64 Method

Glossary Item Box

Description

Saves the Source-compressed image to a handle in a 64-bit environment.

Syntax

Visual Basic
Public Sub SaveSourceCompressedImageToHandle64( _
   ByRef vVal As __int64 _
)

Parameters

vVal
The 64-bit handle to which the file will be saved.

Remarks

Note: Compression must be set for the source first by setting TP_AdvancedCapability.ICAP_COMPRESSION; and TP_AdvancedCapability.ICAP_PIXELTYPE should also be set to a pixel type that supports the compression.

The ICAP_COMPRESSION capability is used to control both the compression mode and, implicitly, the resulting file type.

For the compression modes we currently support, the output file type will be either JPEG or TIFF. If the compression mode is set to TWCP_JPEG, the resulting file type will be JPEG. Otherwise, it will be TIFF.

The following table details the supported compression modes and the implied type of file that TwainPRO will create:

Compression Mode | Output File Type
TWCP_JPEG | JPEG
TWCP_GROUP31D | TIFF
TWCP_GROUP31DEOL | TIFF
TWCP_GROUP32D | TIFF
TWCP_GROUP4 | TIFF
TWCP_PACKBITS | TIFF

All other compression modes are unsupported.

See Also


SaveSourceCompressedImageToVariant Method

SaveSourceCompressedImageToVariant Method
vVal
The variant to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveSourceCompressedImageToVariant Method

Glossary Item Box

Description

Saves the Source-compressed image to a variant.

Syntax

Visual Basic
Public Sub SaveSourceCompressedImageToVariant( _
   ByRef vVal As Variant _
)

Parameters

vVal
The variant to which the file will be saved.

Remarks

Note: Compression must be set for the source first by setting TP_AdvancedCapability.ICAP_COMPRESSION; and TP_AdvancedCapability.ICAP_PIXELTYPE should also be set to a pixel type that supports the compression.

The ICAP_COMPRESSION capability is used to control both the compression mode and, implicitly, the resulting file type.

For the compression modes we currently support, the output file type will be either JPEG or TIFF. If the compression mode is set to TWCP_JPEG, the resulting file type will be JPEG. Otherwise, it will be TIFF.

The following table details the supported compression modes and the implied type of file that TwainPRO will create:

Compression Mode | Output File Type
TWCP_JPEG | JPEG
TWCP_GROUP31D | TIFF
TWCP_GROUP31DEOL | TIFF
TWCP_GROUP32D | TIFF
TWCP_GROUP4 | TIFF
TWCP_PACKBITS | TIFF

All other compression modes are unsupported.

See Also


SaveToFile Method

SaveToFile Method
FileName
A string representation of a legal file name (path) to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveToFile Method

Glossary Item Box

Description

Saves the TwainPro-compressed image as a file given a path and file name.

Syntax

Visual Basic
Public Sub SaveToFile( _
   ByVal FileName As String _
)

Parameters

FileName
A string representation of a legal file name (path) to which the file will be saved.

Remarks

See Also


SaveToHandle Method

SaveToHandle Method
hVal
The 32-bit handle to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveToHandle Method

Glossary Item Box

Description

Saves TwainPro-compressed image to a handle.

Syntax

Visual Basic
Public Sub SaveToHandle( _
   ByRef hVal As Long _
)

Parameters

hVal
The 32-bit handle to which the file will be saved.

Remarks

See Also


SaveToHandle64 Method

SaveToHandle64 Method
hVal
The 64-bit handle to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveToHandle64 Method

Glossary Item Box

Description

Saves TwainPro-compressed image to a handle in a 64-bit environment.

Syntax

Visual Basic
Public Sub SaveToHandle64( _
   ByRef hVal As Unknown _
)

Parameters

hVal
The 64-bit handle to which the file will be saved.

Remarks

This method is intended for use in 64-bit environments.

See Also


SaveToVariant Method

SaveToVariant Method
vVal
The variant to which the file will be saved.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveToVariant Method

Glossary Item Box

Description

Saves TwainPro-compressed image to a variant.

Syntax

Visual Basic
Public Sub SaveToVariant( _
   ByRef vVal As Variant _
)

Parameters

vVal
The variant to which the file will be saved.

Remarks

See Also


SelectSource Method

SelectSource Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SelectSource Method

Glossary Item Box

Description

Displays the TWAIN Data Source Manager's Source Selection User Interface (UI) so the user can choose which Data Source is the current Source.

Syntax

Visual Basic
Public Sub SelectSource()

Remarks

This method closes previously opened TwainPRO sessions.

See Also


SetCapOut Method

SetCapOut Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SetCapOut Method

Glossary Item Box

Description

Set the current capability using the container specified by CapTypeOut and the values in the various Cap Out properties.

Syntax

Visual Basic
Public Sub SetCapOut()

Remarks

All properties for a particular container must be set before invoking this method. If only the current value is to be set, be sure to use the TWON_ONEVALUE container.

See Also

TwainPro Object | TwainPro Members | CapTypeOut Property | TP_CapType Enumeration


SetCustomDataSourceData Method

SetCustomDataSourceData Method
customDataSourceDataFileName
A string representation of a legal file name (path) from which the custom data will be read in order to set the custom data of the source.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SetCustomDataSourceData Method

Glossary Item Box

Description

Sets custom data (current settings, e.g., DPI, paper size, color format) of the source from the application. The source settings are in a format that is source dependent and not defined by TWAIN.

Syntax

Visual Basic
Public Sub SetCustomDataSourceData( _
   ByVal customDataSourceDataFileName As String _
)

Parameters

customDataSourceDataFileName
A string representation of a legal file name (path) from which the custom data will be read in order to set the custom data of the source.

Remarks

See Also


SetDataSource Method

SetDataSource Method
Index
A long value which represents a zero-based index which matches the data source.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SetDataSource Method

Glossary Item Box

Description

Selects a TWAIN Data Source from the DataSourceList property as the current Data Source.

Syntax

Visual Basic
Public Sub SetDataSource( _
   ByVal Index As Long _
)

Parameters

Index
A long value which represents a zero-based index which matches the data source.

Remarks

The method OpenDSM must be called before this method. Use the property DataSourceCount to determine how many Data Sources are on the current system.

See Also

TwainPro Object | TwainPro Members | DataSourceList Property | OpenDSM Method


SetImageLayout Method

SetImageLayout Method
ImageLeft
Floating point number for the Left side of the Image Layout rectangle
ImageTop
Floating point number for the Top side of the Image Layout rectangle
ImageRight
Floating point number for the Right side of the Image Layout rectangle
ImageBottom
Floating point number for the Bottom side of the Image Layout rectangle
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SetImageLayout Method

Glossary Item Box

Description

Sets the Left, Top, Right, and Bottom sides of the Image Layout rectangle for the current Data Source.

Syntax

Visual Basic
Public Sub SetImageLayout( _
   ByVal ImageLeft As Single, _
   Optional ByVal ImageTop As Variant, _
   Optional ByVal ImageRight As Variant, _
   Optional ByVal ImageBottom As Variant _
)

Parameters

ImageLeft
Floating point number for the Left side of the Image Layout rectangle
ImageTop
Floating point number for the Top side of the Image Layout rectangle
ImageRight
Floating point number for the Right side of the Image Layout rectangle
ImageBottom
Floating point number for the Bottom side of the Image Layout rectangle

Remarks

The Image Layout rectangle defines what portion of the Data Source's scanning area is acquired.

Call this method after OpenSession and before StartSession.

See Also

TwainPro Object | TwainPro Members | OpenSession Method


SetOEMLicenseKey Method

SetOEMLicenseKey Method
newVal
The OEM license key required for OEM licensing.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SetOEMLicenseKey Method

Glossary Item Box

Description

Sets the control runtime OEM license key.

Syntax

Visual Basic
Public Sub SetOEMLicenseKey( _
   ByVal newVal As String _
)

Parameters

newVal
The OEM license key required for OEM licensing.

Remarks

When OEM runtime licenses are purchased, the OEM license key is provided in the purchase confirmation email.

See Also


SetSolutionKey Method

SetSolutionKey Method
key1
Unlock key 1
key2
Unlock key 2
key3
Unlock key 3
key4
Unlock key 4
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SetSolutionKey Method

Glossary Item Box

Description

Sets the control runtime license deployment solution key.

Syntax

Visual Basic
Public Sub SetSolutionKey( _
   ByVal key1 As Long, _
   ByVal key2 As Long, _
   ByVal key3 As Long, _
   ByVal key4 As Long _
)

Parameters

key1
Unlock key 1
key2
Unlock key 2
key3
Unlock key 3
key4
Unlock key 4

Remarks

This is the solution key required for all runtime licensing. The four integers are provided at the time of purchase of the runtime licenses along with the solution name, which is set with the SetSolutionName method.

See Also


SetSolutionName Method

SetSolutionName Method
newVal
The solution name.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SetSolutionName Method

Glossary Item Box

Description

Sets the control runtime license deployment solution name.

Syntax

Visual Basic
Public Sub SetSolutionName( _
   ByVal newVal As String _
)

Parameters

newVal
The solution name.

Remarks

This is the name of the runtime license solution. The solution name is provided in the purchase confirmation email when runtime licenses are purchased.

See Also


StartSession Method

StartSession Method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : StartSession Method

Glossary Item Box

Description

Enables the Current Data Source and places it into the Image Transfer state.

Syntax

Visual Basic
Public Sub StartSession()

Remarks

Displays the Data Source User Interface if ShowUI is True. This method will return when the user closes the UI if the ShowUI property is True or after the image transfer if ShowUI is False. It is not necessary to call OpenSession before calling this method. All Capability Negotiation methods must be called before this method. Before returning from this method, the session will be closed if the CloseSessionAfterAcquisition property is true. If the CloseSessionAfterAcquisition property is false, the session will remain open and return to the Capability Negotiation state.

See Also

TwainPro Object | TwainPro Members | ShowUI Property | OpenSession Method


ToHdib Method

ToHdib Method
method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ToHdib Method

Glossary Item Box

Description

Returns the handle to the current DIB (Device Independent Bitmap).

Syntax

Visual Basic
Public Function ToHdib( _
   ByVal method As TP_TOHDIBMETHOD _
) As Long

Parameters

method
Value | Description
TP_TOHDIBMETHOD_RETURNDUPLICATE | Specifies that the DIB is to be duplicated, the user has the responsibility of calling GlobalFree() to clean up the resource.
TP_TOHDIBMETHOD_TRANSFERINTERNAL | Specifies that the internal DIB is to be used, TwainPro handles cleaning up the resource.

Remarks

See Also


ToHdib64 Method

ToHdib64 Method
method
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ToHdib64 Method

Glossary Item Box

Description

Returns the handle to the current DIB (Device Independent Bitmap) in a 64-bit environment.

Syntax

Visual Basic
Public Function ToHdib64( _
   ByVal method As TP_TOHDIBMETHOD _
) As __int64

Parameters

method
Value | Description
TP_TOHDIBMETHOD_RETURNDUPLICATE | Specifies that the DIB is to be duplicated, the user has the responsibility of calling GlobalFree() to clean up the resource.
TP_TOHDIBMETHOD_TRANSFERINTERNAL | Specifies that the internal DIB is to be used, TwainPro handles cleaning up the resource.

Remarks

This method is intended for use in 64-bit environments.

See Also


Capability Property

Capability Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : Capability Property

Glossary Item Box

Description

Gets and sets which Twain capability to negotiate.

Property Type

Read-write property

Syntax

Visual Basic
Public Property Capability As TP_Capability

Return Type

A TP_Capability enumeration value which determines the Twain capability.

Remarks

This is a runtime-only property. There are no properties or methods unique to a capability such as SetBrightness. All capabilities use the same set of methods to negotiate their values.

Example

TwainPRO1.Capability = TWCAP_BRIGHTNESS

TwainPRO1.CapTypeOut = TWCAP_ONEVALUE

TwainPRO1.CapValueOut = 500

TwainPRO1.SetCapOut

See Also

TwainPro Object | TwainPro Members | TP_Capability Enumeration


CapAdvanced Property

CapAdvanced Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapAdvanced Property

Glossary Item Box

Description

Gets or sets the advanced capabilities.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapAdvanced As Long

Return Type

A long value which represents the advanced capabilities.

Remarks

Specifies which Twain capability to negotiate. It is also used to set which extended image information is to be requested. This is a runtime-only property.

This property should be used only when a capability that is not directly supported by the Capability property is needed. This property is ignored unless the Capability property has been set to either TWCAP_USECAPADVANCED or TW_CAPUSECAPADVANCEDFOREXTINFO. All capability functions are available except the CapDesc property when the Capability property is set to TWCAP_USECAPADVANCED. When the Capability is set to TWCAP_USECAPADVANCEDFOREXTINFO then neither CapDesc or any of the capability out properties such as CapValueOut are available.

See the section for accessing Extended Image Information when the Capability property is set to TW_CAPUSECAPADVANCEDFOREXTINFO.

See Also


CapDefault Property

CapDefault Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapDefault Property

Glossary Item Box

Description

Gets the default value for a capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapDefault As Single

Return Type

A single value which represents the default value for a capability.

Remarks

This is a runtime, read-only property.

The default value can only be read, therefore, there is no corresponding property to set the default value.

See Also


CapDefaultFrameBottom Property

CapDefaultFrameBottom Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapDefaultFrameBottom Property

Glossary Item Box

Description

Returns the default bottom value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapDefaultFrameBottom As Single

Return Type

A Single value that represents the default bottom value.

See Also


CapDefaultFrameLeft Property

CapDefaultFrameLeft Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapDefaultFrameLeft Property

Glossary Item Box

Description

Returns the default left value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapDefaultFrameLeft As Single

Return Type

A Single value that represents the default left value.

See Also


CapDefaultFrameRight Property

CapDefaultFrameRight Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapDefaultFrameRight Property

Glossary Item Box

Description

Returns the default right value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapDefaultFrameRight As Single

Return Type

A Single value that represents the default right value.

See Also


CapDefaultFrameTop Property

CapDefaultFrameTop Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapDefaultFrameTop Property

Glossary Item Box

Description

Returns the default top value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapDefaultFrameTop As Single

Return Type

A Single value that represents the default top value.

See Also


CapDesc Property

CapDesc Property
Index
A long value which represents the zero-based index value of the item.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapDesc Property

Glossary Item Box

Description

Gets the description for the specified constant for the current capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapDesc( _
   ByVal Index As Long _
) As String

Parameters

Index
A long value which represents the zero-based index value of the item.

Return Type

A string value which represents the description for the specified constant for the current capability.

Remarks

This is a runtime, read-only property.

When CapType = TWCAP_ENUM, the Source may return a list of constants that signify settings.

For example, if Capability = TWCAP_PIXELTYPE, and the Source returns a TWCAP_ENUM containing the constants, TWPT_BW (0), TWPT_GRAY (1), TWPT_RGB (2) a description of each may be obtained with the CapDesc property.

TwainPRO.CapDesc( TWPT_BW ) would return "Black & White". This can be used for filling a listbox or combobox with descriptions of available values instead of just the constants.

See Also


CapExtInfoCount Property

CapExtInfoCount Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapExtInfoCount Property

Glossary Item Box

Description

Gets or sets the number of extended image information requested from a TWAIN Data Source that supports getting extended image information.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapExtInfoCount As Long

Return Type

A long value which represents the number of extended image information requested from a TWAIN data source.

Remarks

The default value is 0.

This property allocates an array to step through to setup the extended information requested. This property should be setup prior to scanning.

See Also


CapExtInfoIndex Property

CapExtInfoIndex Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapExtInfoIndex Property

Glossary Item Box

Description

Gets or sets the current position in the previously allocated extended image information array.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapExtInfoIndex As Long

Return Type

A long value which represents the current position in the previous array.

Remarks

The default value is 0.

Call this property after the CapExtInfoCount has been set. Use this property to move through the extended image information array.

See Also


CapFrameBottom Property

CapFrameBottom Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapFrameBottom Property

Glossary Item Box

Description

Returns the current bottom value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapFrameBottom As Single

Return Type

A Single value that represents the current bottom value.

See Also


CapFrameBottomOut Property

CapFrameBottomOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapFrameBottomOut Property

Glossary Item Box

Description

Sets the current bottom value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapFrameBottomOut As Single

Return Type

A Single value that represents the current bottom value.

See Also


CapFrameLeft Property

CapFrameLeft Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapFrameLeft Property

Glossary Item Box

Description

Returns the current left value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapFrameLeft As Single

Return Type

A Single value that represents the current left value.

See Also


CapFrameLeftOut Property

CapFrameLeftOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapFrameLeftOut Property

Glossary Item Box

Description

Sets the current left value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapFrameLeftOut As Single

Return Type

A Single value that represents the current left value.

See Also


CapFrameRight Property

CapFrameRight Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapFrameRight Property

Glossary Item Box

Description

Returns the current right value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapFrameRight As Single

Return Type

A Single value that represents the current right value.

See Also


CapFrameRightOut Property

CapFrameRightOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapFrameRightOut Property

Glossary Item Box

Description

Sets the current right value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapFrameRightOut As Single

Return Type

A Single value that represents the current right value.

See Also


CapFrameTop Property

CapFrameTop Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapFrameTop Property

Glossary Item Box

Description

Returns the current top value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapFrameTop As Single

Return Type

A Single value that represents the current top value.

See Also


CapFrameTopOut Property

CapFrameTopOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapFrameTopOut Property

Glossary Item Box

Description

Sets the current top value for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapFrameTopOut As Single

Return Type

A Single value that represents the current top value.

See Also


CapItem Property

CapItem Property
Index
A long zero-based value which represents the capability.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItem Property

Glossary Item Box

Description

Gets legal values for the specified capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItem( _
   ByVal Index As Long _
) As Single

Parameters

Index
A long zero-based value which represents the capability.

Return Type

A single value which represents legal values for a specified capability.

Remarks

An array of floating point numbers specifying legal values for a particular capability when CapType = TWCAP_ENUM or TWCAP_ARRAY.

Use this property only for reading a value. Use the CapItemOut property and SetCapOut method to set a new value.

See Also


CapItemFrameBottom Property

CapItemFrameBottom Property
Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemFrameBottom Property

Glossary Item Box

Description

Returns the bottom value for the frame capability at the specified index in the collection.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemFrameBottom( _
   ByVal Index As Long _
) As Single

Parameters

Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).

Return Type

A Single value that represents the bottom value.

See Also


CapItemFrameBottomOut Property

CapItemFrameBottomOut Property
Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemFrameBottomOut Property

Glossary Item Box

Description

Sets the bottom value for the frame capability at the specified index in the collection.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemFrameBottomOut( _
   ByVal Index As Long _
) As Single

Parameters

Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).

Return Type

A Single value that represents the bottom value.

See Also


CapItemFrameLeft Property

CapItemFrameLeft Property
Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemFrameLeft Property

Glossary Item Box

Description

Returns the left value for the frame capability at the specified index in the collection.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemFrameLeft( _
   ByVal Index As Long _
) As Single

Parameters

Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).

Return Type

A Single value that represents the left value.

See Also


CapItemFrameLeftOut Property

CapItemFrameLeftOut Property
Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemFrameLeftOut Property

Glossary Item Box

Description

Sets the left value for the frame capability at the specified index in the collection.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemFrameLeftOut( _
   ByVal Index As Long _
) As Single

Parameters

Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).

Return Type

A Single value that represents the left value.

See Also


CapItemFrameRight Property

CapItemFrameRight Property
Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemFrameRight Property

Glossary Item Box

Description

Returns the right value for the frame capability at the specified index in the collection.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemFrameRight( _
   ByVal Index As Long _
) As Single

Parameters

Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).

Return Type

A Single value that represents the right value.

See Also


CapItemFrameRightOut Property

CapItemFrameRightOut Property
Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemFrameRightOut Property

Glossary Item Box

Description

Sets the right value for the frame capability at the specified index in the collection.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemFrameRightOut( _
   ByVal Index As Long _
) As Single

Parameters

Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).

Return Type

A Single value that represents the right value.

See Also


CapItemFrameTop Property

CapItemFrameTop Property
Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemFrameTop Property

Glossary Item Box

Description

Returns the top value for the frame capability at the specified index in the collection.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemFrameTop( _
   ByVal Index As Long _
) As Single

Parameters

Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).

Return Type

A Single value that represents the top value.

See Also


CapItemFrameTopOut Property

CapItemFrameTopOut Property
Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemFrameTopOut Property

Glossary Item Box

Description

Sets the top value for the frame capability at the specified index in the collection.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemFrameTopOut( _
   ByVal Index As Long _
) As Single

Parameters

Index
A zero-based index that represents the position in the collection (when CapType is TWON_ENUM).

Return Type

A Single value that represents the top value.

See Also


CapItemOut Property

CapItemOut Property
Index
A long zero-based value representing the capability item.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemOut Property

Glossary Item Box

Description

Sets a new legal value for a particular capability when CapType = TWCAP_ENUM or TWCAP_ARRAY.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemOut( _
   ByVal Index As Long _
) As Single

Parameters

Index
A long zero-based value representing the capability item.

Return Type

A single value which represents the new legal value for the given capability.

Remarks

Use this property only for setting a capability. Use the CapItem property to read the current capability values.

After setting this property, invoke the SetCapOut method to actually set the values.

Note: This property can only be set if CapTypeOut = TWCAP_ENUM or TWCAP_ARRAY, otherwise an error is generated.

See Also


CapItemString Property

CapItemString Property
Index
A zero-based long value which represents the specified capability to get the string of.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapItemString Property

Glossary Item Box

Description

Gets legal values for the specified capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapItemString( _
   ByVal Index As Long _
) As String

Parameters

Index
A zero-based long value which represents the specified capability to get the string of.

Return Type

A string value which represents legal values for the given capability.

Remarks

Use this property only for reading a string value.

See Also


CapMax Property

CapMax Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapMax Property

Glossary Item Box

Description

Gets the maximum value in a range when the CapType = TWCAP_RANGE.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapMax As Single

Return Type

A single value which represents the maximum value in a range.

Remarks

Use this property only for reading a value. Use the CapMaxOut property and SetCapOut method to set a new value.

See Also


CapMaxOut Property

CapMaxOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapMaxOut Property

Glossary Item Box

Description

Sets the maximum value in a range when CapTypeOut = TWCAP_RANGE.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapMaxOut As Single

Return Type

A single value which represents the maximum value in a range.

Remarks

This is a runtime-only property.

Use this property only for setting a value. Use the CapMax property to read the current maximum value.

After setting this property, invoke the SetCapOut method to actually set the value.

This property can only be set if CapTypeOut = TWCAP_RANGE, otherwise an error is generated.

See Also


CapMin Property

CapMin Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapMin Property

Glossary Item Box

Description

Gets the minimum value in a range when the CapType is TWCAP_RANGE.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapMin As Single

Return Type

A single value which represents the minimum value in a range.

Remarks

This is a runtime, read-only property. Use this property only for reading a value. Use the CapMinOut property and SetCapOut method to set a new value.

See Also


CapMinOut Property

CapMinOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapMinOut Property

Glossary Item Box

Description

Gets the minimum value in a range when CapTypeOut = TWCAP_RANGE.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapMinOut As Single

Return Type

A single value which represents the minimum value in a range.

Remarks

Use this property only for setting a value. Use the CapMin property to read the current minimum value.

After setting this property, invoke the SetCapOut method to actually set the value.

Note: This property can only be set if CapTypeOut = TWCAP_RANGE, otherwise an error is generated.

See Also


CapNumFrameItemsOut Property

CapNumFrameItemsOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapNumFrameItemsOut Property

Glossary Item Box

Description

Sets the number of items in an enumeration for the frame capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapNumFrameItemsOut As Long

Return Type

A Long value that represents the number of items in an enumeration for the frame capability.

See Also


CapNumItems Property

CapNumItems Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapNumItems Property

Glossary Item Box

Description

The number of items in a list or array when CapType = TWCAP_ENUM or TWCAP_ARRAY.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapNumItems As Long

Return Type

A long value which represents the number of items in a list or array for the capability.

Remarks

This is a runtime, read-only property.

Use this property only for reading a value. Use the CapNumItemsOut property and SetCapOut method to set a new value.

See Also


CapNumItemsOut Property

CapNumItemsOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapNumItemsOut Property

Glossary Item Box

Description

Sets the number of items in a list or array when CapTypeOut = TWCAP_ENUM or TWCAP_ARRAY.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapNumItemsOut As Long

Return Type

A long value which represents the number of items in a list or array for a capability.

Remarks

This is a runtime-only property.

Use this property only for setting a capability. Use the CapNumItems property to read the current capability.

After setting this property, invoke the SetCapOut method to actually set the values.

This property can only be set if CapTypeOut = TWCAP_ENUM or TWCAP_ARRAY, otherwise an error is generated.

See Also


CapStep Property

CapStep Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapStep Property

Glossary Item Box

Description

Gets the step value in a range when the CapType is TWCAP_RANGE.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapStep As Single

Return Type

A single value which represents the step value in a range.

Remarks

This is a runtime, read-only property.

This is the increment the Twain device prefers when setting a new value. For example, if Capability = TWCAP_XRESOLUTION, CapMin = 100, CapMax = 600 and CapStep = 100, then a legal new value would be in the range of 100 - 600 in increments of 100.

If a non-step aligned value is set to the Capability, no error is generated, and the Twain device will most likely round to the nearest step.

The step value can only be read, therefore, there is no corresponding property to set the step value.

See Also


CapStepOut Property

CapStepOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapStepOut Property

Glossary Item Box

Description

Sets the step value in a range when CapTypeOut = TWCAP_RANGE.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapStepOut As Single

See Also


CapString Property

CapString Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapString Property

Glossary Item Box

Description

Gets the current string value for a capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapString As String

Return Type

A string value which represents the current string for a capability.

Remarks

Use this property only for reading a capabilitys string value.

See Also


CapStringOut Property

CapStringOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapStringOut Property

Glossary Item Box

Description

Sets the current string value for a capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapStringOut As String

Return Type

A string value which represents a capability.

See Also


CapSupported Property

CapSupported Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapSupported Property

Glossary Item Box

Description

Gets whether the current capability is supported by the TWAIN device.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapSupported As Boolean

Return Type

A boolean value which is True if the current capability is supported. Otherwise, False is used and the current capability is not supported.

Remarks

This property should be checked before reading other properties such as CapValue. Attempting to read values for a capability that isn't supported will generate an error.

See Also


Caption Property

Caption Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : Caption Property

Glossary Item Box

Description

Gets and sets the text placed on a still frame.

Property Type

Read-write property

Syntax

Visual Basic
Public Property Caption As String

Return Type

A string value which represents the text placed on a still frame.

See Also


CaptionHeight Property

CaptionHeight Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CaptionHeight Property

Glossary Item Box

Description

Gets and sets the height in pixels of the clip rectangle used to write a caption to a frame during a frame capture.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CaptionHeight As Long

Return Type

A long value which represents the height of the clip rectangle used to write a caption to a frame during a frame capture.

Remarks

This property is ignored if the ClipCaption property is set to False, and the bottom edge of the frame is used as a boundary.

See Also


CaptionLeft Property

CaptionLeft Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CaptionLeft Property

Glossary Item Box

Description

Gets or sets the x or left offset in pixels to write the caption to a frame during a frame capture.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CaptionLeft As Long

Return Type

A long value which represents the left offset in pixels to write the caption to a frame during a frame capture.

See Also


CaptionTop Property

CaptionTop Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CaptionTop Property

Glossary Item Box

Description

Gets and sets the y or top offset in pixels to write the caption to a frame during a frame capture.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CaptionTop As Long

Return Type

A long value which represents the top offset in pixels to write the caption to a frame during a frame capture.

See Also


CaptionWidth Property

CaptionWidth Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CaptionWidth Property

Glossary Item Box

Description

Gets and sets the width in pixels of the clip rectangle used to write a caption to a frame during a frame capture.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CaptionWidth As Long

Return Type

A long value which represents the width in pixels of the clip rectangle.

Remarks

This property is ignored if the ClipCaption property is set to False, and the right edge of the frame is used as a boundary.

See Also


CapType Property

CapType Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapType Property

Glossary Item Box

Description

Gets the type of container used to transfer capability information from the Source.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapType As TP_CapType

Return Type

A TP_CapType enumeration value which determines the type of container used to transfer capability information from the source.

Remarks

This is a runtime, read-only property.

There are four values TWAIN uses to transfer data from the Source. This determines which TwainPRO properties access the capability information.

See Also


CapTypeOut Property

CapTypeOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapTypeOut Property

Glossary Item Box

Description

Gets and sets the type of container used to transfer capability information to the Source.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapTypeOut As TP_CapType

Return Type

A TP_CapType enumeration value which determines the type of container used to transfer capability information to the source.

Remarks

This is a runtime-only property.

There are four values Twain uses to transfer data to the Source. This determines which TwainPRO properties set the capability information.

See Also


CapValue Property

CapValue Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapValue Property

Glossary Item Box

Description

Gets the current value for a capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapValue As Single

Return Type

A single value which represents the value for a capability.

Remarks

This is a runtime, read-only property.

Use this property only for reading a value. Use the CapValueOut property and SetCapOut method to set a new value.

See Also


CapValueOut Property

CapValueOut Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CapValueOut Property

Glossary Item Box

Description

Sets the current value for a capability.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CapValueOut As Single

Return Type

A single value which represents the current value for a capability to set.

Remarks

This is a runtime-only property.

Use this property only for setting a value.

Use the CapValue property to read the current value.

After setting this property, invoke the SetCapOut method to actually set the value.

This property can not be set if CapTypeOut = TWCAP_ARRAY or an error will be generated.

See Also


ClipCaption Property

ClipCaption Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ClipCaption Property

Glossary Item Box

Description

Gets and sets whether the Caption is clipped by the CaptionWidth and CaptionHeight properties or clipped using the right and bottom edges of the frame.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ClipCaption As Boolean

Return Type

A boolean value which is True if the Caption is clipped by the CaptionWidth and CaptionHeight properties. Otherwise, False is used and the Caption is clipped using the right and bottom edges of the frame.

Remarks

This property has no effect on the CaptionLeft and CaptionTop properties which are always used to determine the placement of the caption.

See Also


CloseOnCancel Property

CloseOnCancel Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CloseOnCancel Property

Glossary Item Box

Description

Gets and sets whether the Twain User Interface should be closed when the operation is cancelled.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CloseOnCancel As Boolean

Return Type

A boolean value which is True when the User Interface is closed when the user issues a cancel. Otherwise, False is used and the User Interface is not closed when the user issues a cancel.

Remarks

If the Twain User Interface is shown, the property determines whether the User Interface will be closed when the user issues a cancel.

See Also


CloseSessionAfterAcquisition Property

CloseSessionAfterAcquisition Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CloseSessionAfterAcquisition Property

Glossary Item Box

Description

Gets or sets a value indicating whether the session with the data source and data source manager will be closed before returning from the StartSession method.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CloseSessionAfterAcquisition As Boolean

Return Type

A boolean value that is True if the session with the data source and data source manager will be closed before returning from the StartSession method. Otherwise, False is used, and the session with the data source and data source manager is not closed before returning from the StartSession method.

Remarks

The default value is True.

See Also


CurrentDataSource Property

CurrentDataSource Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : CurrentDataSource Property

Glossary Item Box

Description

Gets the index of the currently selected Data Source.

Property Type

Read-write property

Syntax

Visual Basic
Public Property CurrentDataSource As Long

Return Type

A long value which represents the zero-based index of the currently selected data source.

Remarks

This index corresponds to the list of Data Sources returned in the DataSourceList property.

This is a runtime, read-only property.

Invoke the OpenDSM method before accessing this property.

See Also


DataSourceCount Property

DataSourceCount Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : DataSourceCount Property

Glossary Item Box

Description

Gets the number of TWAIN Data Source product names.

Property Type

Read-write property

Syntax

Visual Basic
Public Property DataSourceCount As Long

Return Type

A long value which represents the number of TWAIN data source product names.

Remarks

This property is set by invoking the OpenDSM method. This is a runtime, read-only property. Use this property when building your own list of Data Sources, instead of using the SelectSource method to bring up the default selection dialog.

See Also


DataSourceList Property

DataSourceList Property
Index
A long value which represents characters representing the item.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : DataSourceList Property

Glossary Item Box

Description

A string array of Data Source product names.

Property Type

Read-write property

Syntax

Visual Basic
Public Property DataSourceList( _
   ByVal Index As Long _
) As String

Parameters

Index
A long value which represents characters representing the item.

Return Type

A string which represents a list of data source product names.

Remarks

DataSourceList is set by calling the OpenDSM method.

This is a runtime, read-only property.

DataSourceList contains all of the Data Source product names installed on the current Windows system. Each string is no longer than 32 characters.

See Also


DataSourceManagerVersion Property

DataSourceManagerVersion Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : DataSourceManagerVersion Property

Glossary Item Box

Description

Specifies what version of the TWAIN Data Source Manager is used, by default it is set to LatestSupportedVersionAvailable.

Property Type

Read-write property

Syntax

Visual Basic
Public Property DataSourceManagerVersion As TP_DataSourceManagerVersion

Return Type

The TP_DataSourceManagerVersion enumeration value specifying the DSM version used.

See Also


DataSourceManagerVersionInUse Property

DataSourceManagerVersionInUse Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : DataSourceManagerVersionInUse Property

Glossary Item Box

Description

Specifies what version of the TWAIN Data Source Manager is in use.

Property Type

Read-only property

Syntax

Visual Basic
Public Property DataSourceManagerVersionInUse As TP_DataSourceManagerVersion

Return Type

The TP_DataSourceManagerVersion enumeration value specifying the DSM version that is in use.

See Also


Debug Property

Debug Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : Debug Property

Glossary Item Box

Description

Gets or sets an indicator which determines if the component writes information to a DebugLogFile or not.

Property Type

Read-write property

Syntax

Visual Basic
Public Property Debug As Boolean

Return Type

A boolean value which is True if the component writes data to a debug log file. Otherwise, False is returned.

Remarks

The default value is False.

This property allows you to turn the debug log file on or off without changing any of the other debug settings. When this value is true, the component will write items to the debug log file, as specified by the DebugLogFile and DebugErrorLevel properties.

See Also


DebugErrorLevel Property

DebugErrorLevel Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : DebugErrorLevel Property

Glossary Item Box

Description

Gets or sets the error level of items that the component should write to the debug log file.

Property Type

Read-write property

Syntax

Visual Basic
Public Property DebugErrorLevel As TP_DebugErrorLevel

Return Type

The TP_DebugErrorLevel enumeration value set.

Remarks

The default value is Production.

Valid values are Production, Development, and Detailed.

This property allows you to control the amount of information that the component places into the DebugLogFile. Since it is expensive to generate and write debug log items, set this property to write the least amount of information that you will find useful.

Note: This property has no effect if the Debug property is set to false.

See Also


DebugLogFile Property

DebugLogFile Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : DebugLogFile Property

Glossary Item Box

Description

Gets or sets the filename of the debug log file.

Property Type

Read-write property

Syntax

Visual Basic
Public Property DebugLogFile As String

Return Type

A string value which represents the full path and name of the debug log file.

Remarks

The default value is "Temp\TwainPro5.log".

Valid values are any valid filename.

This property allows you to control the location of the debug log file.

Note: This property will have no effect if you set the Debug property to false.

See Also


EnableExtCaps Property

EnableExtCaps Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : EnableExtCaps Property

Glossary Item Box

Description

Gets and sets an indicator if the extended capabilities for feedpage and clearpage are enabled.

Property Type

Read-write property

Syntax

Visual Basic
Public Property EnableExtCaps As Boolean

Return Type

A boolean value which is True if the extended capabilities are enabled. Otherwise, False is used.

See Also


EnableExtendedImageInfo Property

EnableExtendedImageInfo Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : EnableExtendedImageInfo Property

Glossary Item Box

Description

Enables if extended image info attributes can be retrieved from the source.

Property Type

Read-write property

Syntax

Visual Basic
Public Property EnableExtendedImageInfo As Boolean

Return Type

A Boolean value that returns true if extended image info is enabled; false otherwise.

See Also


ErrorCode Property

ErrorCode Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ErrorCode Property

Glossary Item Box

Description

Gets the extended error code returned by the Twain Source.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ErrorCode As Long

Return Type

A long value which represents the error code.

Remarks

This is a runtime, read-only property.

This property is valid if TwainPRO returns error code TWERR_TWAIN (1000) which indicates that the Source returned extended information.

See Also


ErrorDescription Property

ErrorDescription Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ErrorDescription Property

Glossary Item Box

Description

Gets a description of the extended error code returned by the Twain Source.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ErrorDescription As String

Return Type

A string value which represents the error description.

Remarks

This is a runtime, read-only property.

This property is valid if TwainPRO returns error code TWERR_TWAIN (1000) which indicates that the Source returned extended information.

See Also


EvaluationMode Property

EvaluationMode Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : EvaluationMode Property

Glossary Item Box

Description

Gets and sets how the control will behave when in evaluation (non-licensed) mode.

Property Type

Read-write property

Syntax

Visual Basic
Public Property EvaluationMode As TP_EvaluationMode

Return Type

A TP_EvaluationMode enumeration value which determines how the control behaves in evaluation mode.

Remarks

The default value is TP_EvaluationModeAutomatic.

In order to test the component in an application running as a service or other environments where the component does not have permissions to create a window, the application logic needs to set the EvaluationMode to Timeout. In this mode, the component does not attempt to create the Evaluation Mode dialog window, but will timeout after 5 minutes of operation and cease to operate.

When running your project with the TwainPRO component in TP_EvaluationModeTimeout mode under the Visual Basic 6 IDE, the component will still display the evaluation dialog. However, setting the EvaluationMode property to TP_EvaluationModeTimeout will allow your Visual Basic 6 compiled executable to properly timeout after 5 minutes of execution and not display the evaluation dialog.

To run in regular (not evaluation) mode, purchase and register a license.

See Also


Font Property

Font Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : Font Property

Glossary Item Box

Description

Gets and sets the font used to draw the Caption on the current still frame.

Property Type

Read-write property

Syntax

Visual Basic
Public Property Font As Font

Return Type

A Font value to draw the caption on the still frame.

Remarks

The default value is 8 point MS Sans Serif.

See Also


ForeColor Property

ForeColor Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ForeColor Property

Glossary Item Box

Description

Gets and sets the color used to draw the Caption on the current still frame.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ForeColor As OLE_COLOR

Return Type

A ULong value which represents the color used to draw the caption.

Remarks

The default color is Black.

See Also


FTPPassword Property

FTPPassword Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : FTPPassword Property

Glossary Item Box

Description

Gets and sets the password used to log into an ftp site.

Property Type

Read-write property

Syntax

Visual Basic
Public Property FTPPassword As String

Return Type

A string value which represents the password.

Remarks

This is necessary only if an ftp address was specified in the SaveFile method.

See Also


FTPUserName Property

FTPUserName Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : FTPUserName Property

Glossary Item Box

Description

Gets and sets the user name used to log into an ftp site.

Property Type

Read-write property

Syntax

Visual Basic
Public Property FTPUserName As String

Return Type

A string value which represents the ftp user name.

Remarks

This is necessary only if an ftp address was specified in the SaveFile method.

See Also


HAlign Property

HAlign Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : HAlign Property

Glossary Item Box

Description

Gets and sets the horizontal alignment of the caption within the clipping rectangle.

Property Type

Read-write property

Syntax

Visual Basic
Public Property HAlign As TP_HorizontalAlignment

Return Type

A TP_HorizontalAlignment enumeration value which determines the horizontal alignment of the caption within the clipping rectangle.

Remarks

The clipping rectangle is determined by the ClipCaption and Caption rectangle properties.

See Also


hDIB Property

hDIB Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : hDIB Property

Glossary Item Box

Description

Gets the Window handle to the current DIB (Device Independent Bitmap).

Property Type

Read-write property

Syntax

Visual Basic
Public Property hDIB As Long

Return Type

A long value which represents the window handle to the current DIB.

Remarks

The StartSession method is used to scan a DIB into the control. If the hDIB value is 0, a bitmap does not exist. Use the hDIB property to copy the image data from the TwainPRO control to other image controls.

Example

After the assignment, the hDIB property is set to zero, so you must check it by assigning it to a temporary variable as illustrated below. The following example assigns the hDIB to an ImagXpress control:

Dim hDIB as long

hDIB = TwainPRO1.hDIB

if (hDIB <> 0) then

ImagXpress1.hDIB = hDIB

end if

See Also


hImage Property

hImage Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : hImage Property

Glossary Item Box

Description

Gets the Window handle to the current compressed Image, either in TIFF or JPEG format.

Property Type

Read-write property

Syntax

Visual Basic
Public Property hImage As Long

Return Type

A long value which represents the window handle to the current compressed image in TIFF or JPEG format.

Remarks

After successfully negotiating to transfer the image in a compressed format from the scanner, the StartSession method is used to scan a compressed image into the control. If the hImage value is 0, a compressed image does not exist. Use the hImage property to copy the compressed image data from the TwainPRO control to other image controls.

Example

After the assignment, the hImage property is set to zero, so you must check it by assigning it to a temporary variable as illustrated below. The following example loads a compressed image to an ImagXpress control:

Dim hImage as long

If ( TwainPRO1.ICompression <> TWCP_NONE )

hImage = TwainPRO1.hImage

If (hImage <> 0) Then

ImagXpress1.LoadBuffer(hImage )

End If

End If

See Also


hParentWnd Property

hParentWnd Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : hParentWnd Property

Glossary Item Box

Description

Gets and sets a window handle to the TwainPRO object for applications that create TwainPRO in-process rather than placing it on a form.

Property Type

Read-write property

Syntax

Visual Basic
Public Property hParentWnd As Long

Return Type

A long value which represents a window handle to the TwainPRO object for applications that create TwainPRO in-process.

Remarks

This property has no effect if the object was created by placing on a form such as in Visual Basic. This property must be set if the TwainPRO object is created in-process or the Twain device will not function correctly. This is usually m_hWnd in an MFC application.

See Also


IBPP Property

IBPP Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : IBPP Property

Glossary Item Box

Description

Gets the bits per pixel of the current image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property IBPP As Long

Return Type

A long value which represents the bits per pixel of the current image.

Remarks

The IBPP property obtains the bits per pixel of the current image or image being acquired. IBPP is available at runtime and is read-only. IBPP is available in the PreScan event and thereafter.

See Also


ICompression Property

ICompression Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ICompression Property

Glossary Item Box

Description

Gets the compression format of the current image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ICompression As Long

Return Type

A long value which represents the compression format of the current image.

Remarks

The ICompression property obtains the compression format of the current image or image being acquired. ICompression is available at runtime and is read-only. ICompression is available in the PreScan event and thereafter.

ICompression returns one of the following values:

  • TWCP_NONE (0) No Compression, TWCP_NONE means that the image is in an uncompressed DIB format and should be accessed through the hDIB property.

  • TWCP_PACKBITS (1) Packbits

  • TWCP_ GROUP31D (2) Group 3 1D, Follows CCITT spec (no End Of Line)

  • TWCP_GROUP31DEOL (3) Group 3 1D, Follows CCITT spec (has End Of Line)

  • TWCP_GROUP32D (4) Group 3 2D, Follows CCITT spec (use cap for K Factor)

  • TWCP_GROUP4 (5) Group 4, Follows CCITT spec

  • TWCP_JPEG (6) JPEG, TWCP_JPEG means that the image is in a JPEG format and should be accessed through the hImage property.

Note: All other values mean that the image is in a TIFF format and should be accessed through the hImage property.

See Also


IHeight Property

IHeight Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : IHeight Property

Glossary Item Box

Description

Gets the height of the current image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property IHeight As Long

Return Type

A long value which represents the height of the current image.

Remarks

This property is used to obtain the height of the current image or image that is being acquired.

This property is available at runtime and is read-only. It is available in the PreScan event and thereafter.

The IHeight units are determined by the ICAP_UNITS capability.

See Also


IPixelType Property

IPixelType Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : IPixelType Property

Glossary Item Box

Description

Gets the pixel type of the current image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property IPixelType As Long

Return Type

A long value which represents the pixel type of the current image.

Remarks

The IPixelType property is used to obtain the pixel type of the current image or image that is being acquired.

This property is available at runtime and is read-only. It is available in the PreScan event and thereafter.

See Also


IResX Property

IResX Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : IResX Property

Glossary Item Box

Description

Gets the X resolution of the current image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property IResX As Single

Return Type

A single value which represents the x resolution of the current image.

Remarks

This property is used to obtain the X resolution of the current image or image that is being acquired.

This property is available at runtime and is read-only. IResX is available in the PreScan event and thereafter.

The IResX units are determined by the ICAP_UNITS capability.

See Also

TwainPro Object | TwainPro Members | TP_AdvancedCapability Enumeration


IResY Property

IResY Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : IResY Property

Glossary Item Box

Description

Gets the Y resolution of the current image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property IResY As Single

Return Type

A single value which represents the y resolution of the current image.

Remarks

This property is used to obtain the Y resolution of the current image or image that is being acquired.

IResY is available at runtime and is read-only. IResY is available in the PreScan event and thereafter.

The IResY units are determined by the ICAP_UNITS capability.

See Also

TwainPro Object | TwainPro Members | TP_AdvancedCapability Enumeration


IWidth Property

IWidth Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : IWidth Property

Glossary Item Box

Description

Gets the width of the current image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property IWidth As Long

Return Type

A long value which represents the width of the current image.

Remarks

The IWidth property is used to obtain the width of the current image or image that is being acquired.

IWidth is available at runtime and is read-only. IWidth is available in the PreScan event and thereafter.

The IWidth units are determined by the ICAP_UNITS capability.

See Also

TwainPro Object | TwainPro Members | TP_AdvancedCapability Enumeration


Manufacturer Property

Manufacturer Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : Manufacturer Property

Glossary Item Box

Description

Gets or sets the manufacturer string for the application identity.

Property Type

Read-write property

Syntax

Visual Basic
Public Property Manufacturer As String

Return Type

A string value which determines the manufacturer name of an application.

Remarks

This property is used to identify a company name as manufacturer of an application. This information is sent to the TWAIN Data Source Manager. The application identity consists of the Manufacturer, ProductFamily, ProductName and VersionInfo properties.

This property should be set prior to invoking the OpenSession or StartSession methods.

See Also


MaxImages Property

MaxImages Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : MaxImages Property

Glossary Item Box

Description

Gets or sets the maximum number of images expected from a TWAIN Data Source that supports multiple image scanning.

Property Type

Read-write property

Syntax

Visual Basic
Public Property MaxImages As Long

Return Type

A long value which represents the maximum number of images expected from a TWAIN data source.

Remarks

This property is negotiated with the TWAIN Data Source during initialization (OpenSession) and should be set prior to invoking the OpenSession method.

This property is only used when the OpenSession method is invoked. To set the transfer count after calling OpenSession, use the TWCAP_XFERCOUNT capability.

A value of 1 indicates the application is willing to transfer multiple images.

A value of 1 indicates the application wishes to transfer only one image per session.

See Also


PendingXfers Property

PendingXfers Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : PendingXfers Property

Glossary Item Box

Description

Gets the number of image transfers the TWAIN Data Source is ready to supply to the TwainPRO control.

Property Type

Read-write property

Syntax

Visual Basic
Public Property PendingXfers As Long

Return Type

A long value which represents the number of image transfers the TWAIN data source is ready to supply to the TwainPRO component.

Remarks

This property is only valid during the PreScan and PostScan events.

The TWAIN Data Source will return -1 if it is not sure how many transfers are pending. Scanners with Automatic Document Feeders (ADF) will typically return -1.

See Also


PICPassword Property

PICPassword Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : PICPassword Property

Glossary Item Box

Description

Gets or sets the password for an ePIC file.

Property Type

Read-write property

Syntax

Visual Basic
Public Property PICPassword As String

Return Type

A string value which represents the password for an ePIC file.

Remarks

The ePIC (.PIC) format allows you to save a password protected file. The password can contain a maximum of eight characters. When the PICPassword property is set and an ePIC file is saved using the SaveFile method, the file will be encrypted using the PICPassword.

Note: PICPassword applies to ePIC images only.

See Also


Picture Property

Picture Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : Picture Property

Glossary Item Box

Description

Gets the picture object containing a copy of the current frame buffer.

Property Type

Read-write property

Syntax

Visual Basic
Public Property Picture As Picture

Return Type

A Picture object which contains a copy of the current frame buffer.

Remarks

There must be an image available. This is accomplished by using the StartSession method to acquire an image.

Attempting to access this property when there is no image will return an error.

This property returns a VB picture object for use with other controls that support the picture object including the standard VB picture control.

This property is not compatible with Delphi.

See Also

TwainPro Object | TwainPro Members | StartSession Method


ProductFamily Property

ProductFamily Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ProductFamily Property

Glossary Item Box

Description

Gets or sets the Product Family string for the application identity.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ProductFamily As String

Return Type

A string value which represents the product family description for the application identity.

Remarks

The default value is an empty string "".

This property is used to identify a software group that the application belongs to. This information is sent to the TWAIN Data Source Manager. The application identity consists of the Manufacturer, ProductFamily, ProductName and VersionInfo properties.

This property should be set prior to invoking the OpenSession or StartSession methods.

See Also


ProductName Property

ProductName Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ProductName Property

Glossary Item Box

Description

Gets or sets the Product Name string for the application identity.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ProductName As String

Return Type

A string value which represents the product name.

Remarks

The default value is "Product Name".

This property is used to identify an application name. This information is sent to the TWAIN Data Source Manager. The application identity consists of the Manufacturer, ProductFamily, ProductName and VersionInfo properties.

This property should be set prior to any calls to the OpenSession or StartSession methods.

ProductName is the most common method for identifying TWAIN applications for Data Sources. Product names for applications are displayed by some Data Sources.

See Also


ProxyServer Property

ProxyServer Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ProxyServer Property

Glossary Item Box

Description

Many organizations use a proxy server to allow individual computers to access the Internet through the local LAN.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ProxyServer As String

Return Type

A string value which represents the proxy server name.

Remarks

This property specifies the name of the ProxyServer which can be a word such as "MyProxyServer" or an IP address such as "10.1.1.56". If the computer uses a direct connection such as Dial-Up Networking, the computer does not use a proxy server and this property should be blank.

See Also


RaiseExceptions Property

RaiseExceptions Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : RaiseExceptions Property

Glossary Item Box

Description

Gets and sets whether exceptions are raised.

Property Type

Read-write property

Syntax

Visual Basic
Public Property RaiseExceptions As Boolean

Return Type

A boolean value which is True to raise exceptions. Otherwise, False is returned when exceptions are not raised.

See Also


SaveFileType Property

SaveFileType Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveFileType Property

Glossary Item Box

Description

Gets and sets the type of file to save.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveFileType As TP_SaveFileType

Return Type

A TP_SaveFileType enumeration value which determines the type of file to save.

See Also

TwainPro Object | TwainPro Members | TP_SaveFileType Enumeration


SaveIFDOffset Property

SaveIFDOffset Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveIFDOffset Property

Glossary Item Box

Description

Gets and sets the location to append the next TIFF page when fast saving of multi-page TIFF files is invoked.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveIFDOffset As Long

Return Type

A long value which represents the index location to append the next TIFF page.

Remarks

The default value is 0.

See Also


SaveJBIG2EncodeModeCompression Property

SaveJBIG2EncodeModeCompression Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveJBIG2EncodeModeCompression Property

Glossary Item Box

Description

Gets and sets the encoding mode to use when creating JBIG2 compressed files.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveJBIG2EncodeModeCompression As TP_SaveJBIG2EncodeModeCompression

Return Type

A TP_SaveJBIG2EncodeModeCompression enumeration value which determines the encoding mode to use when creating JBIG2 compressed files.

Remarks

The default value is TP_SaveJBIG2EncodeModeCompression_AutoDetect.

Text regions can be encoded as lossless or as lossy according to the encoding mode specified. The lossy modes use the value in SavePDFCompression to control how loose to be when matching symbols and thereby increase compression and reduce file size. Compression means loss, however, and a consequence of higher compression is an increased risk of errors in the reconstructed image.

Specify a larger value of looseness to reduce the compressed file size; use a smaller value to reduce the errors, if any. Halftone regions can be encoded lossy by specifying one of the lossy halftone encoding modes. Alternatively, they can be encoded lossless by using the lossless generic encoding mode.

See Also


SaveJBIG2FileOrgCompression Property

SaveJBIG2FileOrgCompression Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveJBIG2FileOrgCompression Property

Glossary Item Box

Description

Gets and sets the file organization when saving a JBIG2 compressed file.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveJBIG2FileOrgCompression As TP_SaveJBIG2FileOrgCompression

Return Type

A TP_SaveJBIG2FileOrgCompression type file.

Remarks

The default value is TP_SaveJBIG2FileOrgCompression_Default.

A JBIG2 compressed file may be organized in two ways: sequential or random access. Sequential organization is intended for streaming applications, where the decoder reads and decodes the file in order as the data is received. Random access organization permits the decoder to know the entire file structure, without having to read the entire file, and then uses that information to access the required data in a random-access fashion. This organization is useful for applications such as decoding only odd-number pages.

See Also


SaveJBIG2InvertedRegion Property

SaveJBIG2InvertedRegion Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveJBIG2InvertedRegion Property

Glossary Item Box

Description

Gets and sets an indicator if the bits should be inverted prior to symbol analysis.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveJBIG2InvertedRegion As Boolean

Return Type

A boolean value which is True if the bits are inverted prior to symbol analysis. Otherwise, False should be used and the bits are not inverted prior to symbol analysis.

Remarks

The default value is False.

Inverting the bits prior to symbol analysis may provide better compression if the text is represented as light bits against a dark background instead of the opposite. This setting is only used by the text encode modes.

See Also


SaveJBIG2LoosenessCompression Property

SaveJBIG2LoosenessCompression Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveJBIG2LoosenessCompression Property

Glossary Item Box

Description

Gets and sets how loose to be when matching symbols and compressing text using either of the lossy text region encode modes.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveJBIG2LoosenessCompression As Long

Return Type

A long value which represents the looseness.

Remarks

The default value is 0.

Default results in the lossless compression.

This property provides the ability to set how loose to be when matching symbols and compressing text using either of the lossy text region encoding modes. The larger the number, the greater the compression and the greater the risk of introducing errors.

Set to 50 for a reasonably small file size and low risk of error.

If set to 0, the compression is lossless.

See Also


SaveJPEGChromFactor Property

SaveJPEGChromFactor Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveJPEGChromFactor Property

Glossary Item Box

Description

Gets and sets the chrominance quality setting for saving JPEG and ePIC files.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveJPEGChromFactor As Long

Return Type

A long value which represents the chrominance quality setting for saving JPEG and ePIC files.

Remarks

JPEG and ePIC images are stored in a compressed format. Compression is lossy which means when you save a JPEG or ePIC file, there will be data loss. Data loss is the result of JPEG and ePICs ability to achieve high compression ratios. Higher quality settings result in less compression, while lower quality settings result in higher compression. Quality versus compression is a tradeoff.

The image compression ratio can be adjusted by setting the SaveJPEGLumFactor and SaveJPEGChromFactor properties. The SaveJPEGLumFactor adjusts the luminance or gray scale quality and the SaveJPEGChromFactor adjusts the chrominance or color quality. Lower settings for these properties result in higher quality images with less compression. Higher settings for these properties result in lower quality images with more compression.

For general use photographic type images, the settings of 32 for luminance and 36 for chrominance provides about a 12:1 image compression ratio with minimal data loss. Compression ratios and perceived image quality will vary depending on the image.

See Also


SaveJPEGLumFactor Property

SaveJPEGLumFactor Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveJPEGLumFactor Property

Glossary Item Box

Description

Gets and sets the luminance quality setting for saving JPEG and ePIC files.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveJPEGLumFactor As Long

Return Type

A long value which represents the luminance quality settings for saving JPEG and ePIC files.

Remarks

JPEG and ePIC images are stored in a compressed format. Compression is lossy which means when you save a JPEG or ePIC file, there will be data loss. Data loss is the result of JPEG and ePICs ability to achieve high compression ratios. Higher quality settings result in less compression, while lower quality settings result in higher compression.

Quality versus compression is a tradeoff.

The image compression ratio can be adjusted by setting this property and SaveJPEGChromFactor properties. The SaveJPEGLumFactor adjusts the luminance or gray scale quality and the SaveJPEGChromFactor adjusts the chrominance or color quality. Lower settings for these properties result in higher quality images with less compression. Higher settings for these properties result in lower quality images with more compression.

For general use photographic type images, the settings of 32 for luminance and 36 for chrominance provides about a 12:1 image compression ratio with minimal data loss. Compression ratios and perceived image quality will vary depending on the image.

See Also


SaveJPEGProgressive Property

SaveJPEGProgressive Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveJPEGProgressive Property

Glossary Item Box

Description

Gets and sets whether JPEG or ePIC files are to be saved as standard files or progressive files.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveJPEGProgressive As Boolean

Return Type

A boolean value which is True to save as progressive files. Otherwise, False is used and saved as standard files.

Remarks

The default value is False.

See Also


SaveJPEGSubSampling Property

SaveJPEGSubSampling Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveJPEGSubSampling Property

Glossary Item Box

Description

Gets and sets the desired sub-sampling.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveJPEGSubSampling As TP_SubSample

Return Type

A TP_SubSample enumeration value which determines the sub-sampling.

Remarks

The default value is TP_SubSample_411.

The values 111 and no sub-sampling, provides the highest image quality with lower compression, while the default 411 provides the best compression with lower image quality.

See Also


SaveMultiPage Property

SaveMultiPage Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveMultiPage Property

Glossary Item Box

Description

Gets and sets if a TIFF file should be saved as the next page in an existing file.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveMultiPage As Boolean

Return Type

A boolean value which is True if a TIFF or PDF file is saved as the next page in an existing file. Otherwise, False should be used and a TIFF or PDF file is not saved as the next page in an existing file.

Remarks

This property applies only when saving TIFF or PDF files. It is ignored for all other image file formats. If this property is True and the filename specified when calling SaveFile exists, the image appends to the existing file.

Note: When this property is set to True and an FTP or HTTP address location is specified in the SaveFile FileName parameter, a multi-page file will not be created as this property only supports saving to local files.

See Also


SavePDFCompression Property

SavePDFCompression Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePDFCompression Property

Glossary Item Box

Description

Gets and sets the compression type for saving a PDF file.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePDFCompression As TP_SavePDFCompressionType

Return Type

A TP_SavePDFCompressionType enumeration value which determines the compression type for saving a PDF file.

Remarks

The default value is TP_SavePDFCompressionType_Default.

See Also


SavePDFSwapBlackAndWhite Property

SavePDFSwapBlackAndWhite Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePDFSwapBlackAndWhite Property

Glossary Item Box

Description

Gets and sets an indicator if the pixel value of zero is set to black or white.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePDFSwapBlackAndWhite As Boolean

Return Type

A boolean value which is True to set the pixel value in the saved image to 1 = black and 0 = white. Otherwise, False sets the pixel value in the saved image to 1 = white and 0 = black.

Remarks

The default value is False.

See Also


SavePNGBackgroundColor Property

SavePNGBackgroundColor Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePNGBackgroundColor Property

Glossary Item Box

Description

Specifies the background color for the image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePNGBackgroundColor As Long

Return Type

A Long value which represents the background color of the image.

See Also


SavePNGFilter Property

SavePNGFilter Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePNGFilter Property

Glossary Item Box

Description

Gets and sets the filter used for PNG compression.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePNGFilter As TP_PngFilter

Return Type

The TP_PngFilter enumeration value that specifies the filter used for PNG compression.

See Also


SavePNGInterlaced Property

SavePNGInterlaced Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePNGInterlaced Property

Glossary Item Box

Description

Specifies if the image is saved as interlaced or not.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePNGInterlaced As Boolean

Return Type

A Boolean value that is true to save the image in an interlaced format; and false otherwise.

See Also


SavePNGSwapRedAndBlue Property

SavePNGSwapRedAndBlue Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePNGSwapRedAndBlue Property

Glossary Item Box

Description

Specifies if the image's Red and Blue pixels are swapped.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePNGSwapRedAndBlue As Boolean

Return Type

A Boolean value that is true to swap Red and Blue pixels; and false otherwise.

See Also


SavePNGTransparencyColor Property

SavePNGTransparencyColor Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePNGTransparencyColor Property

Glossary Item Box

Description

Specifies the transparency color for the image.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePNGTransparencyColor As Long

Return Type

A Long value that represents the transparency in the image.

See Also


SavePNGUseBackgroundColor Property

SavePNGUseBackgroundColor Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePNGUseBackgroundColor Property

Glossary Item Box

Description

Specifies if the image is saved with a background color or not.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePNGUseBackgroundColor As Boolean

Return Type

A Boolean value that is true to save the image with a background color specified by setting the BackgroundColor property; and false otherwise.

See Also


SavePNGUseTransparencyColor Property

SavePNGUseTransparencyColor Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SavePNGUseTransparencyColor Property

Glossary Item Box

Description

Specifies if the image is saved with a transparency color or not.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SavePNGUseTransparencyColor As Boolean

Return Type

A Boolean value that is true to save the image with a transparency color specified by setting the TransparencyColor property; and false otherwise.

See Also


SaveTIFFCompression Property

SaveTIFFCompression Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveTIFFCompression Property

Glossary Item Box

Description

Gets and sets the TIFF compression type for saving a TIFF file.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveTIFFCompression As TP_SaveTIFFCompressionType

Return Type

A TP_SaveTIFFCompressionType enumeration value which determines the compression type for saving a TIFF file.

See Also


SaveUseIFDOffset Property

SaveUseIFDOffset Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : SaveUseIFDOffset Property

Glossary Item Box

Description

Gets and sets an indicator to enable fast multi-page TIFF writes.

Property Type

Read-write property

Syntax

Visual Basic
Public Property SaveUseIFDOffset As Boolean

Return Type

A boolean value which is True to enable fast multi-page TIFF writes. Otherwise, False should be set.

Remarks

The default value is False.

See Also


ShadowText Property

ShadowText Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ShadowText Property

Glossary Item Box

Description

Gets and sets if a drop shadow should be placed under the caption.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ShadowText As Boolean

Return Type

A boolean value which is True to place a drop shadow under the caption. Otherwise, False should be used.

Remarks

The color of the drop shadow is calculated automatically from the value of the ForeColor property.

See Also


ShowUI Property

ShowUI Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : ShowUI Property

Glossary Item Box

Description

Gets or sets whether the TWAIN data source displays its user interface when invoking the StartSession method.

Property Type

Read-write property

Syntax

Visual Basic
Public Property ShowUI As Boolean

Return Type

A boolean value which is True to display the data source user interface. Otherwise, False should be used and the user interface is not displayed.

Remarks

When ShowUI is set to True the TWAIN Data Source will display its User Interface when invoking the StartSession method. If ShowUI is set to False the Data Source UI will not be displayed and scanning will begin immediately using the current capability values.

See Also


TransferMode Property

TransferMode Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : TransferMode Property

Glossary Item Box

Description

Gets or sets the transfer mode for scanning.

Property Type

Read-write property

Syntax

Visual Basic
Public Property TransferMode As TP_TransferMode

Return Type

A TP_TransferMode enumeration value which determines the transfer mode for scanning.

Remarks

This property is used to set or obtain the current method of transferring images from the Data Source. The TransferMode should be set to the value desired prior to a call to the OpenSession or StartSession methods. The default TransferMode of the TwainPRO control is the Native transfer mode.

This property is available at runtime only.

Note: Transferring of compressed data directly from a Data Source requires that buffered memory mode, TWSX_MEMORY, be used.

See Also

TwainPro Object | TwainPro Members | OpenSession Method | TP_TransferMode Enumeration


TwainConditionCode Property

TwainConditionCode Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : TwainConditionCode Property

Glossary Item Box

Description

Gets additional TWAIN error information from the data source.

Property Type

Read-write property

Syntax

Visual Basic
Public Property TwainConditionCode As Long

Return Type

A long value which represents the error information.

Remarks

The default value is 0.

See Also


TwainConditionDescription Property

TwainConditionDescription Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : TwainConditionDescription Property

Glossary Item Box

Description

Gets the TWAIN error information description from the data source.

Property Type

Read-write property

Syntax

Visual Basic
Public Property TwainConditionDescription As String

Return Type

A string value which represents the description error information.

Remarks

The default value is an empty string "".

See Also


VAlign Property

VAlign Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : VAlign Property

Glossary Item Box

Description

Gets and sets the vertical alignment of the caption within the clipping rectangle.

Property Type

Read-write property

Syntax

Visual Basic
Public Property VAlign As TP_VerticalAlignment

Return Type

A TP_VerticalAlignment enumeration value which determines the vertical alignment within the clipping rectangle.

Remarks

The clipping rectangle is determined by the ClipCaption and Caption rectangle properties.

See Also


Version Property

Version Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : Version Property

Glossary Item Box

Description

Returns the version of the TwainPro control at run-time.

Property Type

Read-write property

Syntax

Visual Basic
Public Property Version As String

Return Type

A string that indicates the TwainPro version.

See Also


VersionInfo Property

VersionInfo Property
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : VersionInfo Property

Glossary Item Box

Description

Gets or sets the version information string for the application identity.

Property Type

Read-write property

Syntax

Visual Basic
Public Property VersionInfo As String

Return Type

A string value which represents the version information for the application.

Remarks

This property is used to identify an application's version. This information is sent to the TWAIN Data Source Manager. The application identity consists of the Manufacturer, ProductFamily, ProductName and VersionInfo properties.

This property should be set prior to invoking the OpenSession or StartSession methods.

See Also


PostScan Event

PostScan Event
Cancel
A boolean value which, if set to True, the session ends and the StartSession method returns control.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : PostScan Event

Glossary Item Box

Description

Raised after a scan or transfer ends.

Syntax

Visual Basic
Public Event PostScan( _
   ByRef Cancel As Boolean _
)

Parameters

Cancel
A boolean value which, if set to True, the session ends and the StartSession method returns control.

Remarks

This is the place to use the SaveFile method to save an image or the hDIB property to do a memory transfer of an image.

See Also


PreScan Event

PreScan Event
Cancel
A boolean value, which if set to True, the session ends and the StartSession method returns control.
AccusoftTwainPro7 ActiveX DLL > TwainPro Object : PreScan Event

Glossary Item Box

Description

Raised before a scan or transfer begins.

Syntax

Visual Basic
Public Event PreScan( _
   ByRef Cancel As Boolean _
)

Parameters

Cancel
A boolean value, which if set to True, the session ends and the StartSession method returns control.

Remarks

This is the place to check the PendingXfers property.

See Also


TP_AdvancedCapability Enumeration

TP_AdvancedCapability Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_AdvancedCapability Enumeration

Glossary Item Box

Description

Specifies valid values for use in specifying capabilities.

Members

Member | Value | Description
ACAP_AUDIOFILEFORMAT | 4609 | 4600 series (4609) Image data sources MAY support these audio caps
ACAP_XFERMECH | 4610 | (4610) - Advanced capability transfer mechanism
CAP_ALARMS | 4120 | (4120) - Alarms
CAP_ALARMVOLUME | 4121 | (4121) - Alarm volume
CAP_AUTHOR | 4096 | 4000 series (4096) All data sources MAY support these caps
CAP_AUTOFEED | 4103 | (4103) - Auto feed
CAP_AUTOMATICCAPTURE | 4122 | (4122) - Automatic capture
CAP_AUTOSCAN | 4112 | (4112) - Auto scan
CAP_BATTERYMINUTES | 4146 | (4146) - Battery minutes
CAP_BATTERYPERCENTAGE | 4147 | (4147) - Battery percentage
CAP_CAMERAENABLED | 4150 | (4150) - Camera enabled
CAP_CAMERAORDER | 4151 | (4151) - Camera order
CAP_CAMERAPREVIEWUI | 4129 | (4129) - Camera preview user interface
CAP_CAMERASIDE | 4148 | (4148) - Camera side
CAP_CAPTION | 4097 | (4097) - Capability caption
CAP_CLEARBUFFERS | 4125 | (4125) - Clear buffers
CAP_CLEARPAGE | 4104 | (4104) - Clear page
CAP_CUSTOMDSDATA | 4117 | (4117) - Custom data
CAP_DEVICEEVENT | 4130 | (4130) - Device event
CAP_DEVICEONLINE | 4111 | (4111) - Device online
CAP_DEVICETIMEDATE | 4127 | (4127) - Device time date
CAP_DUPLEX | 4114 | (4114) - Duplex
CAP_DUPLEXENABLED | 4115 | (4115) - Duplex enabled
CAP_ENABLEDSUIONLY | 4116 | (4116) - Enabled user interface only
CAP_ENDORSER | 4118 | (4118) - Endorser
CAP_EXTENDEDCAPS | 4102 | (4102) - Extended capabilities
CAP_FEEDERALIGNMENT | 4141 | (4141) - Feeder alignment
CAP_FEEDERENABLED | 4098 | (4098) - Capability feeder enabled
CAP_FEEDERLOADED | 4099 | (4099) - Capability feeder loaded
CAP_FEEDERORDER | 4142 | (4142) - Feeder order
CAP_FEEDERPOCKET | 4154 | (4154) - Feeder pocket
CAP_FEEDERPREP | 4153 | (4153) - Feeder prep
CAP_FEEDPAGE | 4105 | (4105) - Feed page
CAP_FILESYSTEM | 4133 | (4133) - File system
CAP_INDICATORS | 4107 | (4107) - Capability indicators
CAP_JOBCONTROL | 4119 | (4119) - Job control
CAP_LANGUAGE | 4140 | (4140) - Language
CAP_MAXBATCHBUFFERS | 4126 | (4126) - Max batch buffers
CAP_MICRENABLED | 4152 | (4152) - MICR enabled
CAP_PAGEMULTIPLEACQUIRE | 4131 | (4131) - Acquire multiple pages
CAP_PAPERBINDING | 4143 | (4143) - Paper binding
CAP_PAPERDETECTABLE | 4109 | (4109) - Paper detectable
CAP_PASSTHRU | 4145 | (4145) - Pass thru
CAP_POWERSUPPLY | 4128 | (4128) - Power supply
CAP_PRINTER | 4134 | (4134) - Printer
CAP_PRINTERENABLED | 4135 | (4135) - Printer enabled
CAP_PRINTERINDEX | 4136 | (4136) - Printer index
CAP_PRINTERMODE | 4137 | (4137) - Printer mode
CAP_PRINTERSTRING | 4138 | (4138) - Printer string
CAP_PRINTERSUFFIX | 4139 | (4139) - Printer suffix
CAP_REACQUIREALLOWED | 4144 | (4144) - Reacquire allowed
CAP_REWINDPAGE | 4106 | (4106) - Rewind page
CAP_SEGMENTED | 4149 | (4149) - Segmented
CAP_SERIALNUMBER | 4132 | (4132) - Serial number
CAP_SUPPORTEDCAPS | 4101 | (4101) - Supported capabilities
CAP_SUPPORTEDCAPSEXT | 4108 | (4108) - Supported extended capabilities
CAP_THUMBNAILSENABLED | 4113 | (4113) - Thumbnails enabled
CAP_TIMEBEFOREFIRSTCAPTURE | 4123 | (4123) - Time before first capture
CAP_TIMEBETWEENCAPTURES | 4124 | (4124) - Time between captures
CAP_TIMEDATE | 4100 | 4100 series (4100) - Capability time date
CAP_UICONTROLLABLE | 4110 | (4110) - User interface controllable
CAP_XFERCOUNT | 1 | (1) - Transfer count
ICAP_AUTOBRIGHT | 4352 | 4300 series (4352) Image data sources may support these caps
ICAP_AUTOMATICBORDERDETECTION | 4432 | (4432) not 4425 - Automatic border detection
ICAP_AUTOMATICDESKEW | 4433 | (4433) - Automatic deskew
ICAP_AUTOMATICROTATE | 4434 | (4434) - Automatic rotate
ICAP_AUTOSIZE | 4438 | (4438) Autosize
ICAP_BARCODEDETECTIONENABLED | 4407 | (4403) - Barcode detection enabled
ICAP_BARCODEMAXRETRIES | 4412 | (4412) - Barcode maximum retries
ICAP_BARCODEMAXSEARCHPRIORITIES | 4409 | (4409) - Barcode maximum search priorities(4410)
ICAP_BARCODESEARCHMODE | 4411 | (4411) - Barcode search mode
ICAP_BARCODESEARCHPRIORITIES | 4410 | (4410) - Barcode search priorities
ICAP_BARCODETIMEOUT | 4413 | (4413) - Barcode timeout
ICAP_BITDEPTH | 4395 | (4395) - Bit depth
ICAP_BITDEPTHREDUCTION | 4396 | (4396) - Bit depth reduction
ICAP_BITORDER | 4380 | (4380) - Bit order
ICAP_BITORDERCODES | 4390 | (4390) - Bit order codes
ICAP_BRIGHTNESS | 4353 | (4353) - Brightness
ICAP_CCITTKFACTOR | 4381 | (4381) - CCITTK Factor
ICAP_COMPRESSION | 256 | 200 series (256) Image data sources are REQUIRED to support these caps
ICAP_CONTRAST | 4355 | (4355) not 4354 - Contrast
ICAP_CUSTHALFTONE | 4356 | (4356) - Custom halftone
ICAP_EXPOSURETIME | 4357 | (4357) - Exposure time
ICAP_EXTIMAGEINFO | 4399 | (4399) - Extended image info
ICAP_FEEDERTYPE | 4436 | ICAP_FEEDERTYPE
ICAP_FILTER | 4358 | (4358) - Filter
ICAP_FLASHUSED | 4359 | (4359) - Flash used
ICAP_FLASHUSED2 | 4422 | (4422) - Flash used 2
ICAP_FLIPROTATION | 4406 | (4402) - Flip rotation
ICAP_FRAMES | 4372 | (4372) - Frames
ICAP_GAMMA | 4360 | (4360) - Gamma
ICAP_HALFTONES | 4361 | (4361) - Halftones
ICAP_HIGHLIGHT | 4362 | (4362) - Highlight
ICAP_ICCPROFILE | 4437 | (4437) - ICC Profile
ICAP_IMAGEDATASET | 4398 | (4398) - Image data set
ICAP_IMAGEFILEFORMAT | 4364 | (4364) not 4363 - Image file format
ICAP_IMAGEFILTER | 4423 | (4423) - Image filter
ICAP_JPEGPIXELTYPE | 4392 | (4392) - JPEG pixel type
ICAP_JPEGQUALITY | 4435 | (4135) - JPEG quality
ICAP_LAMPSTATE | 4365 | (4365) - Lamp state
ICAP_LIGHTPATH | 4382 | (4382) - Light path
ICAP_LIGHTSOURCE | 4366 | (4366) - Light source
ICAP_MAXFRAMES | 4378 | (4378) - Maximum frames
ICAP_MINIMUMHEIGHT | 4400 | 4400 series (4400) - Minimum height
ICAP_MINIMUMWIDTH | 4401 | (4401) - Minimum width
ICAP_NOISEFILTER | 4424 | (4424) - Noise filter
ICAP_ORIENTATION | 4368 | (4368) not 4367 - Orientation
ICAP_OVERSCAN | 4425 | (4424) - Over scan
ICAP_PATCHCODEDETECTIONENABLED | 4415 | (4415) - Patch code detection enabled
ICAP_PATCHCODEMAXRETRIES | 4420 | (4420) - Patch code maximum retries
ICAP_PATCHCODEMAXSEARCHPRIORITIES | 4417 | (4417) - Patch code maximum search priorities
ICAP_PATCHCODESEARCHMODE | 4419 | (4419) - Patch code search mode
ICAP_PATCHCODESEARCHPRIORITIES | 4418 | (4418) - Patch code search priorities
ICAP_PATCHCODETIMEOUT | 4421 | (4421) - Patch code timeout
ICAP_PHYSICALHEIGHT | 4370 | (4370) - Physical height
ICAP_PHYSICALWIDTH | 4369 | (4369) - Physical width
ICAP_PIXELFLAVOR | 4383 | (4383) - Pixel flavor
ICAP_PIXELFLAVORCODES | 4391 | (4391) - Pixel flavor codes
ICAP_PIXELTYPE | 257 | (257) - Capability pixel type
ICAP_PLANARCHUNKY | 4384 | (4384) - Planar chunky
ICAP_ROTATION | 4385 | (4385) - Rotation
ICAP_SHADOW | 4371 | (4371) - Shadow
ICAP_SUPPORTEDBARCODETYPES | 4408 | (4408) - Supported barcode types
ICAP_SUPPORTEDPATCHCODETYPES | 4416 | (4416) - Supported path code types
ICAP_SUPPORTEDSIZES | 4386 | (4386) - Supported sizes
ICAP_THRESHOLD | 4387 | (4387) - Threshold
ICAP_TILES | 4379 | (4379) - Tiles
ICAP_TIMEFILL | 4394 | (4394) - Time fill
ICAP_UNDEFINEDIMAGESIZE | 4397 | (4397) - Undefined image size
ICAP_UNITS | 258 | (258) - Capability units
ICAP_XFERMECH | 259 | (259) - Capability transfer mechanism
ICAP_XNATIVERESOLUTION | 4374 | (4374) not 4373 - x coordinate native resolution
ICAP_XRESOLUTION | 4376 | (4376) - x resolution
ICAP_XSCALING | 4388 | (4388) - X scaling
ICAP_YNATIVERESOLUTION | 4375 | (4375) - y coordinate native resolution
ICAP_YRESOLUTION | 4377 | (4377) - y resolution
ICAP_YSCALING | 4389 | (4389) - Y scaling
ICAP_ZOOMFACTOR | 4414 | (4414) - Zoom factor

Remarks

Image data sources are REQUIRED to support these capabilities: ICAP_COMPRESSION, ICAP_PIXELTYPE, ICAP_UNITS, ICAP_XFERMECH.


TP_Capability Enumeration

TP_Capability Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_Capability Enumeration

Glossary Item Box

Description

Specifies valid values for use in specifying capabilities for the Capability property.

Members

Member | Value | Description
TP_CAP_AUTOFEED | 20 | 20 - Auto feed
TP_CAP_AUTOSCAN | 21 | 21 - Auto scan
TP_CAP_CLEARPAGE | 22 | 22 - Clear page
TP_CAP_DEVICEONLINE | 15 | 15 - Device online
TP_CAP_DUPLEX | 23 | 23 - Duplex
TP_CAP_DUPLEXENABLED | 24 | 24 - Duplex enabled
TP_CAP_FEEDERENABLED | 25 | 25 - Feeder enabled
TP_CAP_FEEDERLOADED | 26 | 26 - Feeder loaded
TP_CAP_FEEDPAGE | 27 | 27 - Feed page
TP_CAP_INDICATORS | 16 | 16 - Indicators
TP_CAP_PAPERDETECTABLE | 28 | 28 - Paper detectable
TP_CAP_UICONTROLLABLE | 18 | 18 - User interface controllable
TP_CAP_XFERCOUNT | 19 | 19 - Transfer count
TP_Capability_UseCapAdvanced | 100 | 100 - Use advanced capabilities
TP_Capability_UseCapAdvancedForExtInfo | 101 | 101 - Use advanced capabilities for extended info
TP_ICAP_AUTOBRIGHT | 0 | 0 - Auto bright
TP_ICAP_BITDEPTH | 29 | 29 - Bit depth
TP_ICAP_BRIGHTNESS | 1 | 1 - Brightness
TP_ICAP_CONTRAST | 2 | 2 - Contrast
TP_ICAP_GAMMA | 3 | 3 - Gamma
TP_ICAP_LAMPSTATE | 17 | 17 - Lamp state
TP_ICAP_PHYSICALHEIGHT | 5 | 5 - Physical height
TP_ICAP_PHYSICALWIDTH | 4 | 4 - Physical width
TP_ICAP_PIXELTYPE | 6 | 6 - Pixel type
TP_ICAP_ROTATION | 7 | 7 - Rotation
TP_ICAP_SUPPORTEDSIZES | 30 | 30 - Supported sizes
TP_ICAP_UNITS | 8 | 8 - Units
TP_ICAP_XNATIVERESOLUTION | 9 | 9 - x native resolution
TP_ICAP_XRESOLUTION | 11 | 11 - x resolution
TP_ICAP_XSCALING | 13 | 13 - x scaling
TP_ICAP_YNATIVERESOLUTION | 10 | 10 - y native resolution
TP_ICAP_YRESOLUTION | 12 | 12 - y resolution
TP_ICAP_YSCALING | 14 | 14 - y scaling


TP_CapAdvConstants Enumeration

TP_CapAdvConstants Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_CapAdvConstants Enumeration

Glossary Item Box

Description

Specifies valid values for use in specifying capabilities.

Members

Member | Value | Description
TWAF_AIFF | 1 | Aiff
TWAF_AU | 3 | Au
TWAF_SND | 4 | Snd
TWAF_WAV | 0 | Wav
TWAL_ALARM | 0 | 0 - Alarms
TWAL_BARCODE | 3 | 3 - Alarm barcode
TWAL_DOUBLEFEED | 4 | 4 - Alarm double feed
TWAL_FEEDERERROR | 1 | 1 - Alarm feeder error
TWAL_FEEDERWARNING | 2 | 2 - Alarm feeder warning
TWAL_JAM | 5 | 5 - Alarm jam
TWAL_PATCHCODE | 6 | 6 - Alarm patch code
TWAL_POWER | 7 | 7 - Alarm power
TWAL_SKEW | 8 | 8 - Alarm skew
TWAS_AUTO | 1 | Auto
TWAS_CURRENT | 2 | Current
TWAS_NONE | 0 | None
TWBD_HORZ | 0 | 0 - Search barcode horizontal
TWBD_HORZVERT | 2 | 2 - Search barcode horizontal then vertical
TWBD_VERT | 1 | 1 - Search barcode vertical
TWBD_VERTHORZ | 3 | 3 - Search barcode vertical then horizontal
TWBO_LSBFIRST | 0 | Least Significant Bit First
TWBO_MSBFIRST | 1 | Most Significant Bit First
TWBR_CUSTHALFTONE | 2 | 2 - Bitdepth reduction custom halftone
TWBR_DIFFUSION | 3 | 3 - Bitdepth reduction diffusion
TWBR_HALFTONE | 1 | 1 - Bitdepth reduction halftone
TWBR_THRESHOLD | 0 | 0 - Bitdepth reduction threshold
TWCB_AUTO | 0 | 0 - Clear buffer auto
TWCB_CLEAR | 1 | 1 - Clear buffer clear
TWCB_NOCLEAR | 2 | 2 - Clear buffer no clear
TWCP_GROUP31D | 2 | 2 - Compression group 31 D
TWCP_GROUP31DEOL | 3 | 3 - Compression group 31 DEOL
TWCP_GROUP32D | 4 | 4 - Compression group 32 D
TWCP_GROUP4 | 5 | 5 - Compression group 4
TWCP_JPEG | 6 | 6 - Compression JPEG
TWCP_NONE | 0 | 0 - Compression none
TWCP_PACKBITS | 1 | 1 - Compression pack bits
TWCS_BOTH | 0 | Both
TWCS_BOTTOM | 2 | Bottom
TWCS_TOP | 1 | Top
TWDE_CHECKAUTOMATICCAPTURE | 0 | Check Automatic Capture
TWDE_CHECKBATTERY | 1 | Check Battery
TWDE_CHECKDEVICEONLINE | 2 | Check Device Online
TWDE_CHECKFLASH | 3 | Check Flash
TWDE_CHECKPOWERSUPPLY | 4 | Check Power Supply
TWDE_CHECKRESOLUTION | 5 | Check Resolution
TWDE_DEVICEADDED | 6 | Device Added
TWDE_DEVICEOFFLINE | 7 | Device Offline
TWDE_DEVICEREADY | 8 | Device Ready
TWDE_DEVICEREMOVED | 9 | Device Removed
TWDE_IMAGECAPTURED | 10 | Image Captured
TWDE_IMAGEDELETED | 11 | Image Deleted
TWDE_LAMPFAILURE | 14 | Lamp Failure
TWDE_PAPERDOUBLEFEED | 12 | Paper Double Feed
TWDE_PAPERJAM | 13 | Paper Jam
TWDE_POWERSAVE | 15 | Power Save
TWDE_POWERSAVENOTIFY | 16 | Power Save Notify
TWFA_CENTER | 2 | 2 - Feeder alignment center
TWFA_LEFT | 1 | 1 - Feeder alignment left
TWFA_NONE | 0 | 0 - Feeder alignment none
TWFA_RIGHT | 3 | 3 - Feeder alignment right
TWFE_GENERAL | 0 | General
TWFE_PHOTO | 1 | Photo
TWFF_BMP | 2 | Bmp
TWFF_DEJAVU | 14 | Dejavu
TWFF_EXIF | 9 | Exif
TWFF_FPX | 5 | Fpx
TWFF_JFIF | 4 | Jfif
TWFF_JP2 | 11 | Jp2
TWFF_JPN | 12 | Jpn
TWFF_JPX | 13 | Jpx
TWFF_PDF | 10 | Pdf
TWFF_PDFA | 15 | Pdfa
TWFF_PICT | 1 | Pict
TWFF_PNG | 7 | Png
TWFF_SPIFF | 8 | Spiff
TWFF_TIFF | 0 | Tiff
TWFF_TIFFMULTI | 6 | Tiff Multi
TWFF_XBM | 3 | Xbm
TWFL_AUTO | 3 | 3 - Flash auto
TWFL_NONE | 0 | 0 - Flash none
TWFL_OFF | 1 | 1 - Flash off
TWFL_ON | 2 | 2 - Flash on
TWFL_REDEYE | 4 | 4 - Flash redeye
TWFO_FIRSTPAGEFIRST | 0 | 0 - Feeder order first page first
TWFO_LASTPAGEFIRST | 1 | 1 - Feeder order last page first
TWFP_POCKET1 | 1 | Pocket 1
TWFP_POCKET10 | 10 | Pocket 10
TWFP_POCKET11 | 11 | Pocket 11
TWFP_POCKET12 | 12 | Pocket 12
TWFP_POCKET13 | 13 | Pocket 13
TWFP_POCKET14 | 14 | Pocket 14
TWFP_POCKET15 | 15 | Pocket 15
TWFP_POCKET16 | 16 | Pocket 16
TWFP_POCKET2 | 2 | Pocket 2
TWFP_POCKET3 | 3 | Pocket 3
TWFP_POCKET4 | 4 | Pocket 4
TWFP_POCKET5 | 5 | Pocket 5
TWFP_POCKET6 | 6 | Pocket 6
TWFP_POCKET7 | 7 | Pocket 7
TWFP_POCKET8 | 8 | Pocket 8
TWFP_POCKET9 | 9 | Pocket 9
TWFP_POCKETERROR | 0 | Pocket Error
TWFR_BOOK | 0 | 0 - Flip rotation book
TWFR_FANFOLD | 1 | 1 - Flip rotation fan fold
TWFT_BLACK | 8 | 8 - Filter type black
TWFT_BLUE | 2 | 2 - Filter type blue
TWFT_CYAN | 5 | 5 - Filter type cyan
TWFT_GREEN | 1 | 1 - Filter type green
TWFT_MAGENTA | 6 | 6 - Filter type magenta
TWFT_NONE | 3 | 3 - Filter type none
TWFT_RED | 0 | 0 - Filter type red
TWFT_WHITE | 4 | 4 - Filter type white
TWFT_YELLOW | 7 | 7 - Filter type yellow
TWIC_EMBED | 2 | Embed
TWIC_LINK | 1 | Link
TWIC_NONE | 0 | None
TWIF_AUTO | 1 | 1 - Image filter auto
TWIF_BANDPASS | 3 | 3 - Image filter band pass
TWIF_FINELINE | 4 | 6 - Image filter fine line
TWIF_HIGHPASS | 4 | 4 - Image filter high pass
TWIF_LOWPASS | 2 | 2 - Image filter low pass
TWIF_NONE | 0 | 0 - Image filter none
TWIF_TEXT | 3 | 5 - Image filter text
TWJC_JSIC | 1 | Jsic
TWJC_JSIS | 2 | Jsis
TWJC_JSXC | 3 | Jsxc
TWJC_JSXS | 4 | Jsxs
TWJC_NONE | 0 | None
TWJQ_HIGH | -1 | JPEG quality high (0xffffffff)
TWJQ_LOW | -3 | JPEG quality low (0xfffffffd) (seven fs)
TWJQ_MEDIUM | -2 | JPEG quality medium (0xfffffffe)
TWJQ_UNKNOWN | -4 | JPEG quality unknown (0xfffffffc)
TWLP_REFLECTIVE | 0 | 0 - Light path reflective
TWLP_TRANSMISSIVE | 1 | 1 - Light path transmissive
TWLS_BLUE | 2 | 2 - Light source blue
TWLS_GREEN | 1 | 1 - Light source green
TWLS_IR | 6 | 6 - Light source IR
TWLS_NONE | 3 | 3 - Light source none
TWLS_RED | 0 | 0 - Light source red
TWLS_UV | 5 | 5 - Light source ultraviolet
TWLS_WHITE | 4 | 4 - Light source white
TWNF_AUTO | 1 | 1 - Noise filter auto
TWNF_LONEPIXEL | 2 | 2 - Noise filter lone pixel
TWNF_MAJORITYRULE | 3 | 3 - Noise filter majority rule
TWNF_NONE | 0 | 0 - Noise filter none
TWOV_ALL | 4 | 4 - Overscan
TWOV_AUTO | 1 | 1 - Overscan auto
TWOV_LEFTRIGHT | 3 | 3 - Overscan left to right
TWOV_NONE | 0 | 0 - Overscan none
TWOV_TOPBOTTOM | 2 | 2 - Overscan top to bottom
TWPC_CHUNKY | 0 | Chunky
TWPC_PLANAR | 1 | Planar
TWPF_CHOCOLATE | 0 | 0 - Pixel chocolate represents the darkest shade
TWPF_VANILLA | 1 | 1 - zero pixel represents lightest shade.
TWPM_COMPOUNDSTRING | 2 | Compound String
TWPM_MULTISTRING | 1 | Multi String
TWPM_SINGLESTRING | 0 | Single String
TWPR_ENDORSERBOTTOMAFTER | 7 | Endorser Bottom After
TWPR_ENDORSERBOTTOMBEFORE | 6 | Endorser Bottom Before
TWPR_ENDORSERTOPAFTER | 5 | Endorser Top After
TWPR_ENDORSERTOPBEFORE | 4 | Endorser Top Before
TWPR_IMPRINTERBOTTOMAFTER | 3 | Imprinter Bottom After
TWPR_IMPRINTERBOTTOMBEFORE | 2 | Imprinter Bottom Before
TWPR_IMPRINTERTOPAFTER | 1 | Imprinter Top After
TWPR_IMPRINTERTOPBEFORE | 0 | Imprinter Top Before
TWPS_BATTERY | 1 | 1 - Battery power supply
TWPS_EXTERNAL | 0 | 0 - External power supply
TWSG_AUTO | 1 | Auto
TWSG_NONE | 0 | None

Remarks

©2012. Accusoft Corporation. All Rights Reserved.


TP_CapConstants Enumeration

TP_CapConstants Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_CapConstants Enumeration

Glossary Item Box

Description

Option values for use in specifying capabilities.

Members

Member | Value | Description
TWDX_1PASSDUPLEX | 1 | (1) Duplex one pass
TWDX_2PASSDUPLEX | 2 | (2) Duplex two pass
TWDX_NONE | 0 | (0) Twain duplex none
TWPT_BW | 0 | (0) Black & White
TWPT_GRAY | 1 | (1) Grayscale
TWPT_PALETTE | 3 | (3) Palette: 8-bit
TWPT_RGB | 2 | (2) True Color: 24-bit
TWUN_CENTIMETERS | 1 | (1) Twain units in centimeters
TWUN_INCHES | 0 | (0) Twain units in inches
TWUN_MILLIMETERS | 6 | (6) Twain units in millimeters
TWUN_PICAS | 2 | (2) Twain units in picas
TWUN_PIXELS | 5 | (5) Twain units in pixels
TWUN_POINTS | 3 | (3) Twain units in points
TWUN_TWIPS | 4 | (4) Twain units in twips


TP_CapType Enumeration

TP_CapType Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_CapType Enumeration

Glossary Item Box

Description

Option values for use in specifying capabilities for the CapType and CapTypeOut properties.

Members

Member | Value | Description
TWON_ARRAY | 3 | (3) Array - A list of values is returned.
TWON_ENUM | 1 | (1) Enumeration - A list of legal values along with the current and default values are returned.
TWON_ONEVALUE | 0 | (0) One value - The current value is returned.
TWON_RANGE | 2 | (2) Range - A range of legal values along with the current and default values are returned.


TP_ChoiceType Enumeration

TP_ChoiceType Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_ChoiceType Enumeration

Glossary Item Box

Description

Option values which determine the Twain choice type.

Members

Member | Value | Description
TP_ChoiceType_ListAscii | 2 | (2) ASCII list
TP_ChoiceType_ListInt | 1 | (1) Integer list
TP_ChoiceType_Range | 0 | (0) Range


TP_ConditionCode Enumeration

TP_ConditionCode Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_ConditionCode Enumeration

Glossary Item Box

Description

Option values for specifying extended error information.

Members

Member | Value | Description
TWCC_BADCAP | 6 | 6 - Unknown capability
TWCC_BADDEST | 12 | 12 - Unknown destination Application/Source in DSM_Entry
TWCC_BADPROTOCOL | 9 | 9 - not 7, Unrecognized MSG DG DAT combination
TWCC_BADVALUE | 10 | 10 - Data parameter out of range
TWCC_BUMMER | 1 | 1 - Failure due to unknown causes
TWCC_CAPBADOPERATION | 14 | 14 - Operation not supported by capability
TWCC_CAPSEQERROR | 15 | 15 - Capability has dependency on other capability
TWCC_CAPUNSUPPORTED | 13 | 13 - Capability not supported by source
TWCC_CHECKDEVICEONLINE | 23 | 23 - The device went offline prior to or during this operation
TWCC_CUSTOMBASE | 32768 | 0x8000 (32768) - Custom base
TWCC_DAMAGEDCORNER | 25 | 25 - Document has a damaged corner
TWCC_DENIED | 16 | 16 - File System operation is denied (file is protected)
TWCC_DOCTOODARK | 28 | 28 - Document is too dark
TWCC_DOCTOOLIGHT | 27 | 27 - Document is too light
TWCC_FILEEXISTS | 17 | 17 - Operation failed because file already exists
TWCC_FILENOTFOUND | 18 | 18 - File not found
TWCC_FILEWRITEERROR | 22 | 22 - Error writing the file (meant for things like disk full conditions)
TWCC_FOCUSERROR | 26 | 26 - Focusing error during document capture
TWCC_INTERLOCK | 24 | 24 - Cover or door is open
TWCC_LOWMEMORY | 2 | 2 - Not enough memory to perform operation
TWCC_MAXCONNECTIONS | 4 | 4 - DS is connected to max possible applications
TWCC_NODS | 3 | 3 - No Data Source
TWCC_NOMEDIA | 29 |
TWCC_NOTEMPTY | 19 | 19 - Operation failed because directory is not empty
TWCC_OPERATIONERROR | 5 | 5 - DS or DSM reported error, application shouldn't
TWCC_PAPERDOUBLEFEED | 21 | 21 - The feeder detected multiple pages
TWCC_PAPERJAM | 20 | 20 - The feeder is jammed
TWCC_SEQERROR | 11 | 11 - DG DAT MSG out of expected sequence
TWCC_SUCCESS | 0 | 0 - Success

Remarks

Please see the Extended Error Codes xx topic for more information.


TP_DataSourceManagerVersion Enumeration

TP_DataSourceManagerVersion Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_DataSourceManagerVersion Enumeration

Glossary Item Box

Description

Option values for specifying the DataSourceManger Version.

Members

Member | Value | Description
TP_DataSourceManager_LatestSupportedVersionAvailable | 0 | Use the latest supported version of the TWAIN DSM, otherwise default to an older version, otherwise TwainPro will error.
TP_DataSourceManager_None | -1 | Specifies no DSM.
TP_DataSourceManager_Version_1_x | 1 | Use version 1.x of the TWAIN DSM. If it can't be found, TwainPro will error. Note, on native 64-bit systems, Version 1 of the DSM (Data Source Manager) can't be used, you must use at least Version 2.
TP_DataSourceManager_Version_2_x | 2 | Use version 2.x of the TWAIN DSM. If it can't be found, TwainPro will error.


TP_DebugErrorLevel Enumeration

TP_DebugErrorLevel Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_DebugErrorLevel Enumeration

Glossary Item Box

Description

Option values which determine the error level of items to place into the debug log.

Members

Member | Value | Description
TP_DebugErrorLevel_Detailed | 2 | Place as much information into the debug log file as possible. You should use this option when you are tracking down a problem.
TP_DebugErrorLevel_Development | 1 | Place information into the debug log file that is useful during normal development using this toolkit.
TP_DebugErrorLevel_Production | 0 | Place minimal information into the debug log file.

See Also

DebugLogFile Property | Debug Property | DebugErrorLevel Property


TP_ErrorCode Enumeration

TP_ErrorCode Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_ErrorCode Enumeration

Glossary Item Box

Description

Specifies valid values for error codes.

Members

Member | Value | Description
TP_ErrorCode_BadBitDepth | 7019 | Invalid bit depth for file type
TP_ErrorCode_BadIndex | 7015 | Index out of range
TP_ErrorCode_BadLength | 7008 | The string is too long
TP_ErrorCode_BadValue | 7009 | The value is out of range
TP_ErrorCode_Canceled | 7004 | User cancelled operation
TP_ErrorCode_ChromFactorBadValue | 7109 |
TP_ErrorCode_Clipboard | 7017 | Error copying data to clipboard
TP_ErrorCode_CreateFile | 7005 | Error creating file
TP_ErrorCode_DSInvalidOp | 7022 | Data Source performed an illegal operation
TP_ErrorCode_Dsm_SetToNoneNotAllowed | 7105 |
TP_ErrorCode_Dsm1NotAllowedOn64bit | 7103 |
TP_ErrorCode_Dsm2_64NotFound | 7104 |
TP_ErrorCode_DsmNotFound | 7102 |
TP_ErrorCode_DsmV1NotFound | 7101 |
TP_ErrorCode_EnumNotFound | 7032 | Enumeration not found
TP_ErrorCode_FileClose | 7037 | File close
TP_ErrorCode_FileInUse | 7036 | File in use
TP_ErrorCode_FileNotFound | 7034 | File not found
TP_ErrorCode_FileNotOpen | 7029 | File not open
TP_ErrorCode_FileOpen | 7002 | Can't open file
TP_ErrorCode_FileRead | 7026 | File read error
TP_ErrorCode_FileReset | 7038 | File reset
TP_ErrorCode_FileWrite | 7006 | Error writing file
TP_ErrorCode_FormatNotSupported | 7007 | File format not supported
TP_ErrorCode_Ftp | 7013 | FTP error
TP_ErrorCode_InternalError | 7018 | Internal error
TP_ErrorCode_InvalidFilename | 7033 | Invalid file name
TP_ErrorCode_InvalidLicense | 7023 | Invalid license
TP_ErrorCode_LumFactorBadValue | 7108 |
TP_ErrorCode_MemoryAlloc | 7003 | Can't allocate memory for operation
TP_ErrorCode_NameNotFound | 7030 | Name not found
TP_ErrorCode_NoDib | 7010 | No hDib to save to file
TP_ErrorCode_NoImage | 7021 | No hImage to save to file or access
TP_ErrorCode_None | 0 | Error code none
TP_ErrorCode_NoNetFiles | 7012 | Couldn't find wininet files for FTP write
TP_ErrorCode_NoPICFiles | 7011 | Couldn't find PIC files for JPEG write
TP_ErrorCode_NotAvailable | 7020 | Property or method not available
TP_ErrorCode_PathNotFound | 7035 | Path not found
TP_ErrorCode_PngFilterBadValue | 7111 |
TP_ErrorCode_ScannerNotFound | 7031 | Scanner not found
TP_ErrorCode_SettingsFileInit | 7027 | Initial file settings error
TP_ErrorCode_SettingsFileTerm | 7028 | Error terminating the settings file reader system
TP_ErrorCode_SourceCompressedImageOnly | 7106 |
TP_ErrorCode_SubsamplingBadValue | 7110 |
TP_ErrorCode_TiffTagItemNotFound | 7025 | TIFF tag item not found
TP_ErrorCode_TiffTagNotFound | 7024 | TIFF tag not found
TP_ErrorCode_TInit | 7001 | Can't find or load TWAINDSM.dll
TP_ErrorCode_TSeqError | 7014 | Illegal operation for current Source Manager or Source state
TP_ErrorCode_Twain | 7000 | Check ErrorCode & ErrorString properties
TP_ErrorCode_TwainProCompressedImageOnly | 7107 |
TP_ErrorCode_TypeNotFound | 7039 | Type not found
TP_ErrorCode_WrongCapType | 7016 | Invalid property for current capability


TP_EvaluationMode Enumeration

TP_EvaluationMode Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_EvaluationMode Enumeration

Glossary Item Box

Description

Defines named constants for control of trial and full license TwainPRO editions.

Members

Member | Value | Description
TP_EvaluationModeAutomatic | 0 | Automatic evaluation mode. When possible, this component will automatically detect that it is running without a user interface and switch to another evaluation mode. Otherwise, it will display the evaluation mode dialog box.
TP_EvaluationModeTimeout | 1 | Timeout evaluation mode. This is the appropriate evaluation mode for applications that have no user interface.

Remarks

See EvaluationMode property.


TP_ExtendedInfo Enumeration

TP_ExtendedInfo Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_ExtendedInfo Enumeration

Glossary Item Box

Description

Option values for use in specifying capabilities.

Members

Member | Value | Description
TWEI_BARCODECONFIDENCE | 4634 | Barcode confidence
TWEI_BARCODECOUNT | 4633 | Barcode count
TWEI_BARCODEROTATION | 4635 | Barcode rotation
TWEI_BARCODETEXT | 4610 | Barcode text
TWEI_BARCODETEXTLENGTH | 4636 | Barcode text length
TWEI_BARCODETYPE | 4611 | Barcode type
TWEI_BARCODEX | 4608 | Barcode x value
TWEI_BARCODEY | 4609 | Barcode y value
TWEI_BLACKSPECKLESREMOVED | 4647 | Black speckles removed
TWEI_BOOKNAME | 4664 | Book name
TWEI_CAMERA | 4668 | Camera
TWEI_CHAPTERNUMBER | 4665 | Chapter number
TWEI_DESHADEBLACKCOUNTNEW | 4639 | Deshade black count new
TWEI_DESHADEBLACKCOUNTOLD | 4638 | Deshade black count old
TWEI_DESHADEBLACKRLMAX | 4641 | Deshade black right left maximum
TWEI_DESHADEBLACKRLMIN | 4640 | Deshade black right left minimum
TWEI_DESHADECOUNT | 4637 | Deshade count
TWEI_DESHADEHEIGHT | 4614 | Deshade height
TWEI_DESHADELEFT | 4613 | Deshade left
TWEI_DESHADESIZE | 4616 | Deshade size
TWEI_DESHADETOP | 4612 | Deshade top
TWEI_DESHADEWHITECOUNTNEW | 4643 | Deshade white count new
TWEI_DESHADEWHITECOUNTOLD | 4642 | Deshade white count old
TWEI_DESHADEWHITERLAVE | 4645 | Deshade white right left average
TWEI_DESHADEWHITERLMAX | 4646 | Deshade white right left maximum
TWEI_DESHADEWHITERLMIN | 4644 | Deshade white right left minimum(4644)
TWEI_DESHADEWIDTH | 4615 | Deshade width
TWEI_DESKEWSTATUS | 4651 | Deskew status
TWEI_DOCUMENTNUMBER | 4666 | Document number
TWEI_ENDORSEDTEXT | 4627 | Endorsed text
TWEI_FILESYSTEMSOURCE | 4678 | File system source
TWEI_FORMCONFIDENCE | 4628 | Form confidence
TWEI_FORMHORZDOCOFFSET | 4631 | Form horizontal offset
TWEI_FORMTEMPLATEMATCH | 4629 | Form template match
TWEI_FORMTEMPLATEPAGEMATCH | 4630 | Form template page match
TWEI_FORMVERTDOCOFFSET | 4632 | Form vertical offset
TWEI_FRAME | 4670 | Frame
TWEI_FRAMENUMBER | 4669 | Frame number
TWEI_HORZLINECOUNT | 4649 | Horizontal line count
TWEI_HORZLINELENGTH | 4620 | Horizontal line length
TWEI_HORZLINETHICKNESS | 4621 | Horizontal line thickness
TWEI_HORZLINEXCOORD | 4618 | Horizontal line x coordinate
TWEI_HORZLINEYCOORD | 4619 | Horizontal line y coordinate
TWEI_ICCPROFILE | 4672 | ICC Profile
TWEI_LASTSEGMENT | 4673 | Last segment
TWEI_MAGDATA | 4675 | Magnetic data
TWEI_MAGTYPE | 4676 | Magnetic type
TWEI_PAGENUMBER | 4667 | Page number
TWEI_PAGESIDE | 4677 | Page side
TWEI_PATCHCODE | 4626 | Patch code
TWEI_PIXELFLAVOR | 4671 | Pixel flavor
TWEI_SEGMENTNUMBER | 4674 | Segment number
TWEI_SKEWCONFIDENCE | 4654 | Skew confidence
TWEI_SKEWFINALANGLE | 4653 | Skew final angle
TWEI_SKEWORIGINALANGLE | 4652 | Skew original angle
TWEI_SKEWWINDOWX1 | 4655 | Skew window x1
TWEI_SKEWWINDOWX2 | 4657 | Skew window x2
TWEI_SKEWWINDOWX3 | 4659 | Skew window x3
TWEI_SKEWWINDOWX4 | 4661 | Skew window x4
TWEI_SKEWWINDOWY1 | 4656 | Skew window y1
TWEI_SKEWWINDOWY2 | 4658 | Skew window y2
TWEI_SKEWWINDOWY3 | 4660 | Skew window y3
TWEI_SKEWWINDOWY4 | 4662 | Skew window y4
TWEI_SPECKLESREMOVED | 4617 | Speckles removed
TWEI_VERTLINECOUNT | 4650 | Vertical line count
TWEI_VERTLINELENGTH | 4624 | Vertical line length
TWEI_VERTLINETHICKNESS | 4625 | Vertical line thickness
TWEI_VERTLINEXCOORD | 4622 | Vertical line x coordinate
TWEI_VERTLINEYCOORD | 4623 | Vertical line y coordinate
TWEI_WHITESPECKLESREMOVED | 4648 | White speckles removed
TWEJ_MIDSEPARATOR | 1 | Mid separator
TWEJ_NONE | 0 | none
TWEJ_PATCH1 | 2 | Patch 1
TWEJ_PATCH2 | 3 | Patch 2
TWEJ_PATCH3 | 4 | Patch 3
TWEJ_PATCH4 | 5 | Patch 4
TWEJ_PATCH6 | 6 | Patch 6
TWEJ_PATCHT | 7 | Patch T


TP_ExtInfoConstants Enumeration

TP_ExtInfoConstants Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_ExtInfoConstants Enumeration

Glossary Item Box

Description

Specifies valid values for use in specifying capabilities.

Members

Member | Value | Description
TWBCOR_ROT0 | 0 | TWEI_BARCODEROTATION values (BCOR_ means barcode rotation) ("Rotation 0") (0)
TWBCOR_ROT180 | 2 | Rotation 180 (2)
TWBCOR_ROT270 | 3 | Rotation 270 (3)
TWBCOR_ROT90 | 1 | Rotation 90 (1)
TWBCOR_ROTX | 4 | Rotation X (4)
TWBT_2OF5DATALOGIC | 15 | 2 of 5 Datalogic (15)
TWBT_2OF5IATA | 16 | 2 of 5 IATA (16)
TWBT_2OF5INDUSTRIAL | 13 | 2 of 5 Industrial (13)
TWBT_2OF5INTERLEAVED | 1 | 2 of 5 Interleaved (1)
TWBT_2OF5MATRIX | 14 | 2 of 5 Matrix (14)
TWBT_2OF5NONINTERLEAVED | 2 | 2 of 5 Non-interleaved (2)
TWBT_3OF9 | 0 | TWEI_BARCODETYPE values ("3 of 9") (0)
TWBT_3OF9FULLASCII | 17 | 3 of 9 Full ASCII (17)
TWBT_CODABAR | 6 | Codabar (6)
TWBT_CODABARWITHSTARTSTOP | 18 | Codabar with Start/Stop (18)
TWBT_CODE128 | 4 | Code 128 (4)
TWBT_CODE93 | 3 | Code 93 (3)
TWBT_EAN13 | 10 | EAN13 (10)
TWBT_EAN8 | 9 | EAN8 (9)
TWBT_MAXICODE | 19 | Maxicode (19)
TWBT_PDF417 | 12 | PDF417 (12)
TWBT_POSTNET | 11 | Postnet (11)
TWBT_UCC128 | 5 | UCC 128 (5)
TWBT_UPCA | 7 | UPCA (7)
TWBT_UPCE | 8 | UPCE (8)
TWDSK_DISABLED | 3 | Disabled (3)
TWDSK_FAIL | 2 | Fail (2)
TWDSK_REPORTONLY | 1 | Report Only (1)
TWDSK_SUCCESS | 0 | TWEI_DESKEWSTATUS values ("Success") (0)
TWMD_MICR | 0 | MICR
TWPCH_PATCH1 | 0 | TWEI_PATCHCODE values ("Patch 1") (0)
TWPCH_PATCH2 | 1 | Patch 2 (1)
TWPCH_PATCH3 | 2 | Patch 3 (2)
TWPCH_PATCH4 | 3 | Patch 4 (3)
TWPCH_PATCH6 | 4 | Patch 6 (4)
TWPCH_PATCHT | 5 | Patch T (5)


TP_HorizontalAlignment Enumeration

TP_HorizontalAlignment Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_HorizontalAlignment Enumeration

Glossary Item Box

Description

Contains constants for use with the HAlign property.

Members

Member | Value | Description
TP_HorizontalAlignment_Center | 2 | Center (2)
TP_HorizontalAlignment_Left | 0 | Left Justify (0)
TP_HorizontalAlignment_Right | 1 | Right Justify (1)


TP_Orientation Enumeration

TP_Orientation Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_Orientation Enumeration

Glossary Item Box

Description

Option values which determine the ICAP_ORIENTATION capability.

Members

Member | Value | Description
TWOR_AUTO | 4 | Auto
TWOR_AUTOPICTURE | 6 | Auto Picture
TWOR_AUTOTEXT | 5 | Auto Text
TWOR_LANDSCAPE | 3 | Landscape (3)
TWOR_PORTRAIT | 0 | Portrait (0)
TWOR_ROT0 | 0 | Rotation 0 (0)
TWOR_ROT180 | 2 | Rotation 180 (2)
TWOR_ROT270 | 3 | Rotation 270 (3)
TWOR_ROT90 | 1 | Rotation 90 (1)


TP_PngFilter Enumeration

TP_PngFilter Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_PngFilter Enumeration

Glossary Item Box

Description

The filters available for PNG compression.

Members

Member | Value | Description
TP_PngFilter_Average | 3 | The Average filter uses the average of the two neighboring pixels (left and above) to predict the value of a pixel.
TP_PngFilter_None | 0 | Fastest, no filter is used.
TP_PngFilter_Optimal | 5 | Optimal compressed file size, at the expense of speed.
TP_PngFilter_Paeth | 4 | The Paeth filter computes a simple linear function of the three neighboring pixels (left, above, upper left), then chooses as predictor the neighboring pixel closest to the computed value. This technique is due to Alan W. Paeth.
TP_PngFilter_Sub | 1 | The Sub filter transmits the difference between each byte and the value of the corresponding byte of the prior pixel.
TP_PngFilter_Up | 2 | The Up filter is just like the Sub filter except that the pixel immediately above the current pixel, rather than just to its left, is used as the predictor.


TP_SaveFileType Enumeration

TP_SaveFileType Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_SaveFileType Enumeration

Glossary Item Box

Description

Option values which determine the file type to save as.

Members

Member | Value | Description
TP_SaveFileType_Bmp | 2 | Save file as a bitmap (BMP)
TP_SaveFileType_Default | 0 | The default file type.
TP_SaveFileType_Jpeg | 3 | Save file as a jpeg
TP_SaveFileType_Pdf | 5 | Save file as a PDF
TP_SaveFileType_Pic | 4 | Save file as a PIC
TP_SaveFileType_Png | 6 | Save file as a PNG
TP_SaveFileType_Tiff | 1 | Save file as a tiff


TP_SaveJBIG2EncodeModeCompression Enumeration

TP_SaveJBIG2EncodeModeCompression Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_SaveJBIG2EncodeModeCompression Enumeration

Glossary Item Box

Description

Option values which determine the encoding mode to use when creating a JBIG2 compressed file.

Members

Member | Value | Description
TP_SaveJBIG2EncodeModeCompression_AutoDetect | 0 | Default, Lossless generic MQ.
TP_SaveJBIG2EncodeModeCompression_LosslessGenericMMR | 2 | Fast, very good lossless compression, use for any content, similar to G4 coding, uses Huffman/MMR coding.
TP_SaveJBIG2EncodeModeCompression_LosslessGenericMQ | 1 | Fast, great lossless compression, use for any content, uses MQ arithmetic coding.
TP_SaveJBIG2EncodeModeCompression_LosslessTextMMR | 4 | Very good lossless compression possible, use for text or symbols, uses Huffman/MMR coding.
TP_SaveJBIG2EncodeModeCompression_LosslessTextMQ | 3 | Great lossless compression possible, use for text or symbols, uses MQ arithmetic coding.
TP_SaveJBIG2EncodeModeCompression_LosslessTextSPM_MMR | 6 | Potentially the best lossless compression for text or symbols, uses Huffman/MMR coding plus MQ arithmetic coding.
TP_SaveJBIG2EncodeModeCompression_LosslessTextSPM_MQ | 5 | Potentially the best lossless compression for text or symbols, uses MQ arithmetic coding.
TP_SaveJBIG2EncodeModeCompression_LossyHalftoneMMR | 10 | Good lossy compression for halftones, uses Huffman/MMR coding
TP_SaveJBIG2EncodeModeCompression_LossyHalftoneMQ | 9 | Good lossy compression for halftones, uses MQ arithmetic coding
TP_SaveJBIG2EncodeModeCompression_LossyTextMMR | 8 | Very good lossy compression for text or symbols, uses Huffman/MMR coding.
TP_SaveJBIG2EncodeModeCompression_LossyTextMQ | 7 | Great lossy compression for text or symbols, uses MQ arithmetic coding.

Remarks

Text regions can be encoded as lossless or as lossy according to the encoding mode specified. The lossy modes use the value in LoosenessCompression to control how loose to be when matching symbols and thereby increase compression and reduce file size. Compression means loss, however, and a consequence of higher compression is an increased risk of errors in the reconstructed image.

Specify a larger value of looseness to reduce the compressed file size; use a smaller value to reduce the errors, if any. Halftone regions can be encoded lossy by specifying one of the lossy halftone encoding modes. Alternatively, they can be encoded lossless by using the lossless generic encoding mode.


TP_SaveJBIG2FileOrgCompression Enumeration

TP_SaveJBIG2FileOrgCompression Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_SaveJBIG2FileOrgCompression Enumeration

Glossary Item Box

Description

Option values which determine the file organization when saving a JBIG2 compressed file.

Members

Member | Value | Description
TP_SaveJBIG2FileOrgCompression_Default | 0 | Default, sequential organization
TP_SaveJBIG2FileOrgCompression_RandomAccess | 2 | Random access organization
TP_SaveJBIG2FileOrgCompression_Sequential | 1 | Sequential organization

Remarks

A JBIG2 compressed file may be organized in two ways: sequential or random access. Sequential organization is intended for streaming applications, where the decoder reads and decodes the file in order as the data is received. Random access organization permits the decoder to know the entire file structure, without having to read the entire file, and then uses that information to access the required data in a random-access fashion. This organization is useful for applications such as decoding only odd-number pages.


TP_SavePDFCompressionType Enumeration

TP_SavePDFCompressionType Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_SavePDFCompressionType Enumeration

Glossary Item Box

Description

Option values which determine the PDF compression type.

Members

Member | Value | Description
TP_SavePDFCompressionType_CCITTFAX3 | 1 | CCITT Group 3 one-dimensional fax compression
TP_SavePDFCompressionType_CCITTFAX3_2D | 2 | CCITT Group 3 two-dimensional fax compression
TP_SavePDFCompressionType_CCITTFAX4 | 3 | CCITT Group 4 fax compression
TP_SavePDFCompressionType_Default | 6 | Default compression
TP_SavePDFCompressionType_JBIG2 | 4 | JBIG2 compression format
TP_SavePDFCompressionType_SequentialJPEG | 5 | JPEG compression format
TP_SavePDFCompressionType_Uncompressed | 0 | No compression


TP_SaveTIFFCompressionType Enumeration

TP_SaveTIFFCompressionType Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_SaveTIFFCompressionType Enumeration

Glossary Item Box

Description

Contains constants for use with the SaveTIFFCompression property.

Members

Member | Value | Description
TP_SaveTIFFCompressionType_CCITTFAX3 | 2 | CCITT Group 3 Fax (2)
TP_SaveTIFFCompressionType_CCITTFAX3_2D | 3 | CCITT Group 3 2D Fax (3)
TP_SaveTIFFCompressionType_CCITTFAX4 | 4 | CCITT Group 4 Fax (4)
TP_SaveTIFFCompressionType_CCITTRLE | 1 | CCITT RLE (1)
TP_SaveTIFFCompressionType_JPEG6 | 6 | TIFF with JPEG6 (Old-style) compression
TP_SaveTIFFCompressionType_JPEG7 | 7 | TIFF with JPEG7 (New-style) compression
TP_SaveTIFFCompressionType_Uncompressed | 0 | Uncompressed (0)


TP_SubSample Enumeration

TP_SubSample Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_SubSample Enumeration

Glossary Item Box

Description

Contains constants for use with the SaveJPEGSubSampling property.

Members

Member | Value | Description
TP_SubSample_111 | 0 | (0) - SubSample 111
TP_SubSample_211 | 1 | (1) - SubSample 211
TP_SubSample_211v | 3 | (3) - SubSample 211v
TP_SubSample_411 | 2 | (2) - SubSample 411

Remarks

The default value is TP_SubSample_411.

The value 111 provides the highest image quality with lower compression, while the default 411 provides the best compression with lower image quality.


TP_SupportedSizes Enumeration

TP_SupportedSizes Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_SupportedSizes Enumeration

Glossary Item Box

Description

Contains constant sizes for use with the TWCAP_SUPPORTEDSIZES capability.

Members

Member | Value | Description
TWSS_2A0 | 18 | (18) - Supported size 2A0
TWSS_4A0 | 17 | (17) - Supported size 4A0
TWSS_A0 | 19 | (19) - Supported size A0
TWSS_A1 | 20 | (20) - Supported size A1
TWSS_A10 | 25 | (25) - Supported size A10
TWSS_A2 | 21 | (21) - Supported size A2
TWSS_A3 | 11 | (11) - Supported size A3
TWSS_A4 | 1 | (1) - Supported size A4
TWSS_A4LETTER | 1 | (1) - Supported size A4 letter
TWSS_A5 | 5 | (5) - Supported size A5
TWSS_A6 | 13 | (13) - Supported size A6
TWSS_A7 | 22 | (22) - Supported size A7
TWSS_A8 | 23 | (23) - Supported size A8
TWSS_A9 | 24 | (24) - Supported size A9
TWSS_B3 | 12 | (12) - Supported size B3
TWSS_B4 | 6 | (6) - Supported size B4
TWSS_B5LETTER | 2 | (2) - Supported size B5 letter
TWSS_B6 | 7 | (7) - Supported size B6
TWSS_BUSINESSCARD | 53 | (53) - Supported size Business Card
TWSS_C0 | 44 | (44) - Supported size C0
TWSS_C1 | 45 | (45) - Supported size C1
TWSS_C10 | 51 | (51) - Supported size C10
TWSS_C2 | 46 | (46) - Supported size C2
TWSS_C3 | 47 | (47) - Supported size C3
TWSS_C4 | 14 | (14) - Supported size C4
TWSS_C5 | 15 | (15) - Supported size C5
TWSS_C6 | 16 | (16) - Supported size C6
TWSS_C7 | 48 | (48) - Supported size C7
TWSS_C8 | 49 | (49) - Supported size C8
TWSS_C9 | 50 | (50) - Supported size C9
TWSS_ISOB0 | 26 | (26) - Supported size ISOB0
TWSS_ISOB1 | 27 | (27) - Supported size ISOB1
TWSS_ISOB10 | 33 | (33) - Supported size ISOB10
TWSS_ISOB2 | 28 | (28) - Supported size ISOB2
TWSS_ISOB3 | 12 | (12) - Supported size ISOB3
TWSS_ISOB4 | 6 | (6) - Supported size ISOB4
TWSS_ISOB5 | 29 | (29) - Supported size ISOB5
TWSS_ISOB6 | 7 | (7) - Supported size ISOB6
TWSS_ISOB7 | 30 | (30) - Supported size ISOB7
TWSS_ISOB8 | 31 | (31) - Supported size ISOB8
TWSS_ISOB9 | 32 | (32) - Supported size ISOB9
TWSS_JISB0 | 34 | (34) - Supported size JISB0
TWSS_JISB1 | 35 | (35) - Supported size JISB1
TWSS_JISB10 | 43 | (43) - Supported size JISB10
TWSS_JISB2 | 36 | (36) - Supported size JISB2
TWSS_JISB3 | 37 | (37) - Supported size JISB3
TWSS_JISB4 | 38 | (38) - Supported size JISB4
TWSS_JISB5 | 2 | (2) - Supported size JISB5
TWSS_JISB6 | 39 | (39) - Supported size JISB6
TWSS_JISB7 | 40 | (40) - Supported size JISB7
TWSS_JISB8 | 41 | (41) - Supported size JISB8
TWSS_JISB9 | 42 | (42) - Supported size JISB9
TWSS_NONE | 0 | (0) - Supported size none
TWSS_USEXECUTIVE | 10 | (10) - Supported size US executive
TWSS_USLEDGER | 9 | (9) - Supported size US ledger
TWSS_USLEGAL | 4 | (4) - Supported size US legal
TWSS_USLETTER | 3 | (3) - Supported size US letter
TWSS_USSTATEMENT | 52 | (52) - Supported size US statement


TP_TOHDIBMETHOD Enumeration

TP_TOHDIBMETHOD Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_TOHDIBMETHOD Enumeration

Glossary Item Box

Description

Specifies the ToHdib method type.

Members

Member | Value | Description
TP_TOHDIBMETHOD_RETURNDUPLICATE | 0 | Specifies that the DIB is to be duplicated, the user has the responsibility of calling GlobalFree() to clean up the resource.
TP_TOHDIBMETHOD_TRANSFERINTERNAL | 1 | Specifies that the internal DIB is to be used, TwainPro handles cleaning up the resource.


TP_TransferMode Enumeration

TP_TransferMode Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_TransferMode Enumeration

Glossary Item Box

Description

Contains constants for use with the TransferMode property.

Members

Member | Value | Description
TWSX_MEMORY | 2 | Buffered Memory Transfer Mode (2, not 1)
TWSX_NATIVE | 0 | Native Transfer Mode (0)


TP_VerticalAlignment Enumeration

TP_VerticalAlignment Enumeration
AccusoftTwainPro7 ActiveX DLL : TP_VerticalAlignment Enumeration

Glossary Item Box

Description

Contains constants for use with the VAlign property.

Members

Member | Value | Description
TP_VerticalAlignment_Bottom | 1 | Bottom Justify (1)
TP_VerticalAlignment_Center | 2 | Center (2)
TP_VerticalAlignment_Top | 0 | Top Justify (0)


Getting Started - Accusoft TwainPRO 7

Getting Started
Send comments on this topic.

Glossary Item Box


Getting Started - Accusoft TwainPRO 7

Introduction
Send comments on this topic.

Glossary Item Box


References

References
Send comments on this topic.

Glossary Item Box