From 17ef99e4a20181419bdf4ed30065598edd2abb88 Mon Sep 17 00:00:00 2001 From: soukoku Date: Tue, 15 Apr 2014 20:05:44 -0400 Subject: [PATCH] Found some interesting stuff for kodak. --- Spec/Kodak/GettingStarted.htm | 1177 ++ Spec/Kodak/TWAIN_DualStream.htm | 994 ++ Spec/Kodak/TWAIN_ExtImageInfo.htm | 5053 +++++++++ Spec/Kodak/TWAIN_Features.htm | 2707 +++++ Spec/Kodak/TWAIN_FileSystem.htm | 254 + Spec/Kodak/TWAIN_Internationalization.htm | 1099 ++ Spec/Kodak/TWAIN_ProgrammaticControl.htm | 11368 +++++++++++++++++++ Spec/Kodak/TWAIN_ProgrammaticPrinting.htm | 2817 +++++ Spec/Kodak/TWAIN_ScannerIdentification.htm | 218 + Spec/Kodak/debugging.htm | 897 ++ Spec/Kodak/faq.htm | 4520 ++++++++ Spec/Kodak/kdscust.h | 3846 +++++++ Spec/Kodak/links.htm | 719 ++ Spec/Kodak/readme.htm | 241 + Spec/Kodak/simulator.htm | 1808 +++ 15 files changed, 37718 insertions(+) create mode 100644 Spec/Kodak/GettingStarted.htm create mode 100644 Spec/Kodak/TWAIN_DualStream.htm create mode 100644 Spec/Kodak/TWAIN_ExtImageInfo.htm create mode 100644 Spec/Kodak/TWAIN_Features.htm create mode 100644 Spec/Kodak/TWAIN_FileSystem.htm create mode 100644 Spec/Kodak/TWAIN_Internationalization.htm create mode 100644 Spec/Kodak/TWAIN_ProgrammaticControl.htm create mode 100644 Spec/Kodak/TWAIN_ProgrammaticPrinting.htm create mode 100644 Spec/Kodak/TWAIN_ScannerIdentification.htm create mode 100644 Spec/Kodak/debugging.htm create mode 100644 Spec/Kodak/faq.htm create mode 100644 Spec/Kodak/kdscust.h create mode 100644 Spec/Kodak/links.htm create mode 100644 Spec/Kodak/readme.htm create mode 100644 Spec/Kodak/simulator.htm diff --git a/Spec/Kodak/GettingStarted.htm b/Spec/Kodak/GettingStarted.htm new file mode 100644 index 0000000..2f24c74 --- /dev/null +++ b/Spec/Kodak/GettingStarted.htm @@ -0,0 +1,1177 @@ + + + + + + + + +Kodak Document Scanners + + + + + + + + + + +
+ +

Kodak KDS TWAIN Driver

+ +

Getting Started

+ +

20-June-2012

+ +

 

+ +

 

+ +

Contents

+ +

1.     Overview...................................................................................................................... +2

+ +

2.     GUI Based Applications (the old +way)........................................................................... +3

+ +

3.     Programmatic Based Applications +(the newer way)........................................................ 4

+ +

4.     Profile Based Applications (the +best way)...................................................................... +5

+ +

5.     Decoupling.................................................................................................................... +6

+ +

6.     Logging and the Simulator.............................................................................................. +7

+ +

7.     Sample Code................................................................................................................ +8

+ +

 

+ +

 

+ +

 

+ +

1.   Overview

+ +

Developing an application using any image capture +application programming interfaces (API) is a challenge.  The basic +premise of these systems is that the application discovers a device through its +driver, interrogates it about its capabilities, sets a session up, and then +starts scanning.  The problem is that there are a large number of +capabilities all interacting in a variety of ways (some obvious and some not), +so that getting the driver to do exactly what is desired is not always as +straightforward as could be hoped.  And, as with any API, things usual +work well until errors are encountered, then the amount of code increases +dramatically to accommodate all the possible results for any given operation.

+ +

 

+ +

TWAIN provides ways to mitigate this work, though it may not +be obvious from reading the specification.  This document will outline +some development strategies designed to create robust, flexible +applications.  It is assumed that the reader has some familiarity with TWAIN, +either from previous coding experience or from reading some of the TWAIN +specification.

+ +

 

+ +

 

+ +

2.   GUI Based Applications (the old way)

+ +

When TWAIN was developed in the early 1990’s the single +focus of the effort was to bring applications and drivers together.  +Previously an application writer would select a device, like a flatbed scanner, +get the driver for it and write the application code to talk to that +device.  Support for a new device meant getting its driver and writing +code to support it as well.  TWAIN was designed to abstract away that +driver code, hiding it behind a common API.  Now it was possible for an +application to start scanning and capture image data in a way that worked for +any device the came with a TWAIN driver.

+ +

 

+ +

There was one area that the standard did not try to handle +at first, and that was capability negotiation.  True, TWAIN came with a +selection of programmatic capabilities, so that it was possible to negotiate +some kinds of values, but the selection was small.  Instead drivers came +with internally generated dialogs.  The application invoked these dialogs +and left all the problems of negotiation to the driver.  The benefit was +that an application could realize the full functionality of a device while +writing very little code.  The problem was that scanner vendors all had +very different ideas about what these dialogs should look like, so a user +moving from using one scanner to another was very likely to end up working with +a very different user interface.

+ +

 

+ +

 

+ +

3.   Programmatic Based Applications (the newer way)

+ +

Beginning with version 1.7 of the TWAIN specification and +continuing through 1.8 and 1.9 an attempt has been made to allow for more +sophisticated support of scanner capabilities.  In fact the TWAIN +specification doubled in size going from 1.7 to 1.8.  The original 1.5 +description of TWAIN allowed for the following kinds of things:  standard +and custom capability definitions, capabilities using a variety of container +types (enumerations and ranges among them), self-descriptive data types +(integers, strings, etc…), and access modes (read-only, read-write, etc).  +1.8 introduced the ability to independently address the image generating +devices (for instance the front and rear cameras, or the color and bitonal cameras).  It made it possible to write +applications that could drive most or all of the features of a scanner without +resorting to the custom user interface provided by the driver.

+ +

 

+ +

The problem was that most driver writers created their +drivers for specific applications and since these applications didn’t +significantly exercise the programmatic interface, the drivers often did not +perform well when accessed in this way.  Improvements in the testing +documentation and the basic specification, and the stated desire from +applications writers has resulted in better programmatic drivers, but that +still leaves another problem.

+ +

 

+ +

Programmatic interfaces must reflect the abilities of their +drivers.  They must constrain possible values as dictated by the device, +and they must prevent illegal combinations of functionality.  What this +means is that an application may not be limited to just asking what the allowed +values are in a range or an enumeration.  If the application is currently +negotiating on a color camera, then ICAP_THRESHOLDING may not be available +until the camera context is changed to bitonal.  +If the ICAP_XFERMECH is set to allow native mode transfers (bitmaps on Windows +systems) then ICAP_COMPRESSION may only report a possible value of +“none”.  So the application has to conduct inquiries on permutations of +settings within the driver.

+ +

 

+ +

The benefit to all this hard work is that the application +can present a single unified interface to the user, regardless of the physical +device currently in use, which means that end users do not need to be retrained +(save maybe for basic functional differences) anytime they operate a new +scanner with the application.  Over the past several years more and more +application writers have been opting to rely on programmatic control, or in +some cases a combination of programmatic control for the most commonly used +features with the ability to raise the driver GUI for the more rarely used +features.

+ +

 

+ +

 

+ +

4.   Profile Based Applications (the best way)

+ +

There is a third alternative that was introduced with little +fanfare in the TWAIN 1.7 specification.  The operation DAT_CUSTOMDSDATA +(if supported) can be used to take a snapshot of the current state of the +driver.  It can also be used to restore the settings of the driver using +one of these snapshots.  1.7 also introduced the concept of a “settings +only” TWAIN GUI through the DG_CONTROL / DAT_USERINTERFACE / +MSG_ENABLEDSUIONLY.  In this mode the user can set whatever features they +want from the TWAIN supplied GUI, but their only finishing option is to select +OK or CANCEL.

+ +

 

+ +

The application writer creates two programs.  One +program raises the TWAIN GUI, allows the user to set whatever values they want, +then when OK is hit takes a snapshot of the driver using DAT_CUSTOMDSDATA and +saves the result in a file tagged with some useful name or description from the +user, like “photo settings” or “insurance form settings.”  The second +program is the scanning application, but all it presents to the user is a list +of these snapshot or profile descriptions.  So the user selects “photo +settings,” the application reads that file from disk, sends the data to the +driver using DAT_CUSTOMDSDATA, and begins scanning.  Note that it is still +possible to raise the GUI or to programmatically negotiate values; the intention +is to minimize that need.

+ +

 

+ +

In this way we get full access to the features of the device +without writing a lot of code, and protect the scanner operator from having to +be retrained anytime a new scanner shows up.  All of the Kodak Document +Scanners (5000/7000/9000/3000/4000/i30/i40/i200/i600/i800/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000) +support this command.  Most application writers should give serious +thought to using this technique to drive their scanner.

+ +

 

+ +

 

+ +

5.   Decoupling

+ +

One of the most powerful features in TWAIN is its ability to +totally decouple the negotiation phase (state 4/5) from the image capture phase +(state 6/7).  From the earliest versions of the scanner the application +writer has been encouraged to look at the bitmap information for a native +transfer, the header information for a file transfer, or the DAT_IMAGEINFO +information for a memory transfer.  Starting with version 1.7 and +continuing with 1.8 and 1.9 of the TWAIN specification we have supported the +DAT_EXTIMAGEINFO command, which allows for the collection of a block of +metadata associated with an image.

+ +

 

+ +

The gist of it is: never assume that what was negotiated is +what is going to be captured by the scanner.  This applies to the +following items (there may be more): ICAP_AUTOMATICBORDERDETECTION (custom +ICAP_CROPPINGMODE), ICAP_AUTOMATICDESKEW, and ICAP_PIXELTYPE and all related +capabilities (when using the color toggle patch).  The application should +be ready for anything to come from the scanner.  That does not mean it has +to accept the data it is receiving, if it cannot handle a color image when +waiting for a bitonal image, then it should throw an +error to the user.  However, the application should not ASSUME that the +data coming from the scanner is exactly what it negotiated.  If an +application obeys this basic rule of decoupling then it will be never be +surprised by the behavior of the scanner in a way that results in a failure or +a crash.

+ +

 

+ +

 

+ +

6.   Logging and the Simulator

+ +

Other documents in this kit talk about both of these +items.  The purpose of this section is to show how they can be used to aid +in development.  When first writing an application for a Kodak Document +Scanner it might be helpful to see some of the activity that occurs through +TWAIN while the device is being driven by another application.

+ +

 

+ +

The Scanner Validation Tool (SVT) is not necessarily the +best application in the world for this kind of work, but at least it is +something.  If you go into the CONST.INI file and turn on debugging so +that it traces the TWAIN activity:

+ +

 

+ +

            +; Versions 2/3/4

+ +

            +Debug=1

+ +

            +DebugFilter=kdscaps kdsdat

+ +

 

+ +

            +; Version 5+

+ +

            +Debug=1

+ +

            +DebugFilter=TWAIN

+ +

 

+ +

Then when you run the SVT the driver will generate a log of all +the activity that takes place between it and the application.  This +information is written using TWAIN constants that can be found in the +specification and in the TWAIN.H file.  Use this information to understand +what is being done to setup the driver and capture the images.  Please +note that SVT is a GUI Based Application (in fact it is a diagnostic tool), so +it’s not very sophisticated in its ability to programmatically negotiate +settings.  It is, however, very sophisticated in its ability to drive the +scanner to its maximum throughput speeds.  It also has a variety of error +handling abilities, so it responds well to jams and multifeeds, +among the other things that can happen.

+ +

 

+ +

You can use the simulator to get exactly the same results +you would with a real scanner, which is especially useful for testing against +all the varied models supported by the driver.

+ +

 

+ +

 

+ +

7.   Sample Code

+ +

The TWAIN Working Group website (www.twain.org) has sample application +code.  We will include any sample code with this kit as it seems +appropriate.

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/TWAIN_DualStream.htm b/Spec/Kodak/TWAIN_DualStream.htm new file mode 100644 index 0000000..1e66ff5 --- /dev/null +++ b/Spec/Kodak/TWAIN_DualStream.htm @@ -0,0 +1,994 @@ + + + + + +Single Document Multiple Images + + + + + + + +
+ +

Single Document Multiple +Images

+ +

25-Aug-2004

+

Updated: 15-Aug-2006

+ +

 

+

 

+

Table of Contents

+
+

Overview

+

+ ICAP_PIXELTYPE and + DAT_FILESYSTEM Overview

+

+ ICAP_PIXELTYPE

+

DAT_FILESYSTEM

+

+ DAT_FILESYSTEM vs. ICAP_PIXELTYPE

+

+ CAP_CAMERAENABLE vs. CAP_DUPLEXENABLED

+

CAP_CAMERAORDER

+

+ Entire session + (i.e. machine) vs. a single "camera"

+

METADATA

+
+ +

 

+ +

 

+ +

Overview

+ +

 

+ +

This document talks about the Single Document Multiple +Images (SDMI) behavior in TWAIN, describing how it is negotiated and what +additional metadata associated with the image needs to be collected during +image capture.  Since this is a moderately complex subject a number of +other capabilities that have uses beyond SDMI will be discussed as well.

+ +

 

+ +

SDMI behavior is easy to view graphically:

+ +

 

+ +

Original         +Color       Bitonal

+ +

Document         +Image       Image

+ +

+-------+        ++-------+   +-------+

+ +

|    +   |        |       |   |       |

+ +

|   R   |        |   R +  |   |   R   |

+ +

|       |  +      |       |   |       |

+ +

|   G   |  --->  |   G +  | + |   G   |

+ +

|       |    +    |       |   |       |

+ +

|   B   |        |   B |   |   B   |

+ +

|    +   |        |       |   |       |

+ +
+-------+        +-------+   +-------+
 
+ +

In this example a color document results in the capture of +two images, one that is color and one that is bitonal (black & white). Configurations of +this form have a variety of applications, but the most common is when the +application needs a faithful replication of the document for archival purposes +and an image suitable for data collection, such as OCR.

+ +

 

+ +

SDMI puts no limit on the number of images that can result +from a document.

+ +

 

+ +

SDMI is not the same as image segmentation.  Image +segmentation divides a document into sub-images that are optimized for quality +and compression.  In this example the driver could save the text images as +Group-4 and the picture as JPEG:

+ +

 

+ +

Original

+ +

Document

+ +

+-------+

+ +

| a +bit |        Segment 1   Segment 2   Segment 3

+ +

|of +text|        Text        Picture     Text

+ +

| $#$#$ |        +-------+   +-------+   +-------+

+ +

| #$#$# |  --->  | a bit |   | #$#$# |   | more  |

+ +

| $#$#$ |        |of text| + | #$#$# | + | text  |

+ +

| +more  |        +-------+   | #$#$# |   +-------+

+ +

| text  +|                    +-------+

+ +
+-------+        
 
+ +

Image segmentation is typically used to efficiently store +images.  SDMI is used to capture images that are then directed to +different parts of the workflow.  It is possible to mix image segmentation +with SDMI (ex: using image segmentation to produce the faithful replication +image).  The two technologies have different goals, though, so it’s not +advisable to use one to replace the other.

+ +
 
+
 
 
ICAP_PIXELTYPE and DAT_FILESYSTEM Overview
+ +

 

+ +

TWAIN did not start with duplex scanning built into the +standard; this was added in version 1.7.  So prior to 1.7 +ICAP_PIXELTYPE selected the pixel type (i.e. color +vs. grayscale vs. bitonal) for the entire session. This could also be considered +the "color space". An application could configure a driver to output +color or grayscale or bitonal images, but only one of the three, so you can not +get multiple images for a side via ICAP_PIXELTYPE.

+

 

+ +

TWAIN 1.8 introduced DAT_FILESYSTEM.  This +allows an application to setup multiple images for a side. It also +helps support setting of different values for the front and rear. For example, +getting color on the front and grayscale on the rear.

+

 

+

To help maintain backwards compatibility, ICAP_PIXELTYPE needs to +continue to apply to the entire session. This means ICAP_PIXELTYPE should +never be negotiated with DAT_FILESYSTEM.

+

 

+

 

+

 

+
ICAP_PIXELTYPE
 
+ +

Setting ICAP_PIXELTYPE will set both the front and rear +images to the given TWPT_ value and automatically set CAP_DUPLEXENABLED to true. +Use ICAP_BITDEPTH to determine how many bits make a single pixel, such as 8 for 8-bit +grayscale or 24 for 3-channel/8-bits-per-channel RGB. 

 
+
 
+
 
+
DAT_FILESYSTEM
 
+ +

DAT_FILESYSTEM addresses individual “cameras”.  The term “camera” doesn’t +mean that the image capture device uses a camera; rather it’s a generic term +for an image capture source.  DAT_FILESYSTEM calls the front side of the +paper as the 'top' "camera", and the rear as 'bottom'. This doesn't have +anything to do with the physical position of the camera, it is being used to describe what the user +considers the top (i.e. front) of the sheet of paper versus the bottom (i.e. rear).

+

 

+

The driver will output images based on CAP_CAMERAENABLED. So +while a "camera" can be individually set via DAT_FILESYSTEM, you must also set +CAP_CAMERAENABLED to true for each "camera" you want the driver to actually +produce.

+

 

+

The values for DAT_FILESYSTEM are typically:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Camera name
Side
Image
/Camera_Color_Top
frontcolor or grayscale
/Camera_Color_Bottom
rearcolor or grayscale
/Camera_Color_Both
front and rearcolor or grayscale
/Camera_Bitonal_Top
frontbitonal
/Camera_Bitonal_Bottom
rearbitonal
/Camera_Bitonal_Both
front and rearbitonal
+ +

 

+

Using a camera that ends in '_Both' means future settings +will be applied to both the front and rear images.

+

 

+

Sample source code

+ +
 
+
 
+

 

DAT_FILESYSTEM vs. ICAP_PIXELTYPE
 
+ +

If DAT_FILESYSTEM is set, then ICAP_PIXELTYPE must +reflect the current value of the "camera".  For instance, if DAT_FILESYSTEM +is set to /Camera_Color_Both, then ICAP_PIXELTYPE should be set to TWPT_RGB +(this is a basic sanity check for the driver to prevent DAT_FILESYSTEM and ICAP_PIXELTYPE from ever reporting conflicting values).

+ +

 

+ +

However, if ICAP_PIXELTYPE is set, then the following things +must happen to DAT_FILESYSTEM and CAP_CAMERAENABLE:

+ +

 

+ +

If ICAP_PIXELTYPE is set to +          +              +TWPT_RGB

+ +

DAT_FILESYSTEM changes to +            +         /Camera_Color_Both

+ +

CAP_CAMERAENABLE changes to:

+ +

/Camera_Color_Top:     +        +              +TRUE

+ +

/Camera_Color_Bottom:  +                    +TRUE

+ +

/Camera_Bitonal_Top:                         FALSE

+ +

/Camera_Bitonal_Bottom:        +            FALSE

+ +

 

+ +

If ICAP_PIXELTYPE is set to +          +              +TWPT_BW

+ +

DAT_FILESYSTEM changes to +            +         /Camera_Bitonal_Both

+ +

CAP_CAMERAENABLE changes to:

+ +

/Camera_Color_Top:     +          +            FALSE

+ +

/Camera_Color_Bottom:  +        +            FALSE

+ +

/Camera_Bitonal_Top:   +           +           TRUE

+ +

/Camera_Bitonal_Bottom:        +            TRUE

+ +

 

+ +

The behavior guarantees that older applications and newer +applications can work with the same driver.  Application writers need to +decide if they want to use ICAP_PIXELTYPE or DAT_FILESYSTEM +when negotiating with a particular driver, never use both together.  As a +guideline, if DAT_FILESYSTEM are supported by a driver, use them, +since they offer more functionality than ICAP_PIXELTYPE.

+ +

 

+

 

+

 

+ +
CAP_CAMERAENABLE vs. CAP_DUPLEXENABLED
 
+ +

Care needs to be taken when mixing CAP_CAMERAENABLE and +CAP_DUPLEXENABLED. The recommendation is to use one or the other. Here is an +example of the interdependency:

+
+

Table-1 shows an example of creating one color and one + bitonal image from the front of every sheet of paper fed during the scanning + session. In this case, CAP_DUPLEXENABLED would have been set to False.

+
 
+
Table-1
+ + + + + + + + + + + + + + + + + + + + + +
+
DAT_FILESYSTEM
+
CAP_CAMERAENABLE
+
/Camera_Color_Top
+
TRUE
+
/Camera_Color_Bottom
+
FALSE
+
/Camera_Bitonal_Top
+
TRUE
+
/Camera_Bitonal_Bottom
+
FALSE
+

 

+

If the application then sets CAP_DUPLEXENABLED to True, we +would expect the table to change to the following:

+
 
+
Table-2
+ + + + + + + + + + + + + + + + + + + + + +
+
DAT_FILESYSTEM
+
CAP_CAMERAENABLE
+
/Camera_Color_Top
+
TRUE
+
/Camera_Color_Bottom
+
TRUE
+
/Camera_Bitonal_Top
+
TRUE
+
/Camera_Bitonal_Bottom
+
TRUE
+
+ +
 
+

NOTE: Rear only scanning is considered to be a special duplex +operation.  So for the following table CAP_DUPLEXENABLED would be True:

+ +
+
Table-3
+ + + + + + + + + + + + + + + + + + + + + +
+
DAT_FILESYSTEM
+
CAP_CAMERAENABLE
+
/Camera_Color_Top
+
FALSE
+
/Camera_Color_Bottom
+
TRUE
+
/Camera_Bitonal_Top
+
FALSE
+
/Camera_Bitonal_Bottom
+
TRUE
+
+
 
+
 
+
CAP_CAMERAORDER
 
+ +

The output order of the images can be adjusted using +CAP_CAMERAORDER (using the CAP_CAMERA TWCM_*_BOTH values).  This is a TW_ARRAY +container that has the name of each of the cameras in the order they will be +transferred from the driver to the application.  For example, if +CAP_CAMERAORDER is set to TWCM_BW_BOTH TWCM_CL_BOTH, then the bitonal image +will be transferred before the color image.  For a duplex session this +would look like the following:

+ +

 

+ +

        Bitonal Front

+ +

        Color Front

+ +

        Bitonal Rear

+ +

        Color Rear

+ +

 

+ +

To simplify the validation rules between CAP_CAMERAENABLED and +CAP_CAMERAORDER do the following:

+ +

 

+ +

1)    +If CAP_CAMERAORDER includes a "camera" that is set to False, then the +driver will ignore it.

+ +

2)    +If CAP_CAMERAORDER does not include a "camera" that is set to True, +then the driver is free to output the images in whatever ordering it wants.

+ +

 

+

 

+ +
 
+
Entire session (i.e. machine) vs. a single "camera"
 
+ +

The addition of independent front and rear capability +negotiation immediately raises the question: which capabilities belong to the +machine (like CAP_DUPLEX) and which ones belong to a "camera" (like CAP_COMPRESSION).  There is no easy answer to this, since the hardware of +the device dictates the capabilities.  For instance scanner ABC may allow +independent selection of ICAP_COMPRESSION for front and rear cameras because +the designers put in dedicated compression chips for each side.  Whereas +scanner XYZ, in an effort to save costs, only used one chip for this operation, +and they have no way to independently set the front from the rear for this one +capability.

+ +

 

+ +

So, to help figure out where each capability goes, Kodak +scanners have enhancement DG_CONTROL / DAT_CAPABILITY / +MSG_QUERYSUPPORT with additional TWQC_ flags:

+ +

 

+ +

+#define TWQC_MACHINE  +      0x1000    // applies to +entire session/machine

+

+#define TWQC_BITONAL     +   0x2000    // applies to Bitonal "cameras"

+

+#define TWQC_COLOR       +   0x4000    // applies to Color "cameras"

+
+

A +capability cannot mix TWQC_MACHINE with any of the other items listed above; otherwise all +combinations are valid (e.g. a capability could have TWQC_BITONAL and TWQC_COLOR).

+

 

+

Capabilities +that describe themselves as TWQC_MACHINE are accessible at all times, +regardless of the current setting of DAT_FILESYSTEM.  This +means that a capability like CAP_DUPLEXENABLED can always be negotiated, (i.e., +even if the current camera is set to something like /Camera_Bitonal_Rear).

+
+
 
 
METADATA
 
+ +

Metadata is the descriptive data that accompanies an +image.  TWAIN has two primary ways of communicating this information to an +application: DAT_IMAGEINFO and DAT_EXTIMAGEINFO.  Since DAT_EXTIMAGEINFO +is extensible it’s the only way to introduce new metadata items to the TWAIN +specification without creating a new DAT operation (and we don’t really need +any more of those right now).

+ +

 

+ +

SDMI presents a bit of a problem for the application because +the stream of images makes it difficult to tell which ones go with which +document.  This problem becomes compounded with things like +automatic color detection (imagine not knowing if the +application will get color or bitonal data on the next image).

+ +

 

+ +

Since the problem takes the form of a lack-of-communication +problem, the solution is more data.  With the Kodak drivers the following +additional items are added to the list of DAT_EXTIMAGEINFO fields:

+ +

 

+ +

#define +TWEI_HDR_PAGESIDE          0x8001

+ +

#define +TWEI_HDR_IMAGENUMBER       0x8017

+ +

#define +TWEI_HDR_PAGENUMBER        0x8018

+ +

#define TWEI_HDR_PAGEIMAGENUMBER   +0x8019

+ +

 

+ +

TWEI_HDR_PAGESIDE returns 0 for a front image and 1 for a +rear image.

+ +

 

+ +

TWEI_HDR_IMAGENUMBER counts from 1 to 2^32-1 the number of +images captured since the application first MSG_OPENDS’d the driver.

+ +

 

+ +

TWEI_HDR_PAGENUMBER counts from 1 to 2^32-1 the number of +pages of paper captures since the application first MSG_OPENDS’d the driver.

+ +

 

+ +

TWEI_HDR_PAGEIMAGENUMBER counts from 1 to the number of +images captured from the document.  For instance, given an SDMI session +where the driver is transferring a color and a bitonal image for the front and +a bitonal image for the rear we get the following sequence:

+ +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Image

+
+

Page Side

+
+

Image Number

+
+

Page Number

+
+

PageImageNumber

+
+

Color

+
+

Front

+
+

1

+
+

1

+
+

1

+
+

Bitonal

+
+

Front

+
+

2

+
+

1

+
+

2

+
+

Color

+
+

Rear

+
+

3

+
+

1

+
+

3

+
+

Color

+
+

Front

+
+

4

+
+

2

+
+

1

+
+

Bitonal

+
+

Front

+
+

5

+
+

2

+
+

2

+
+

Color

+
+

Rear

+
+

6

+
+

2

+
+

3

+
+ +

 

+ + + +

 

+ +
+ + + + diff --git a/Spec/Kodak/TWAIN_ExtImageInfo.htm b/Spec/Kodak/TWAIN_ExtImageInfo.htm new file mode 100644 index 0000000..48f2fe7 --- /dev/null +++ b/Spec/Kodak/TWAIN_ExtImageInfo.htm @@ -0,0 +1,5053 @@ + + + + + + + + +Kodak KDS TWAIN Driver - Extended Image Info + + + + + + + + + + +
+ +

Kodak KDS TWAIN Driver

+ +

Extended Image Info (DAT_EXTIMAGEINFO)

+ +

17-January-2013

+ +

 

+ +

 

+ +

Contents

+ +

1.     Overview...................................................................................................................... +2

+ +

2.     CAP_EXTIMAGEINFO.............................................................................................. +3

+ +

3.     MSG_GETSPECIAL................................................................................................... +4

+ +

4.     Supported +Information................................................................................................... +5

+ +

5.     Sample Code................................................................................................................ +7

+ +

 

+ +

 

+ +

 

+ +

1.   Overview

+ +

One of TWAIN’s strengths is its ability to decouple the +negotiation phase (state 4/5) from the image capture phase (state 6/7).  +For this to work the application need image meta-data to describe each image so +that it doesn’t have to rely on the negotiated values to understand what it is +getting.  Take for example the image width and height, if +ICAP_AUTOMATICBORDERDETECTION is TRUE then these values will vary from image to +image.  Now in this case DAT_IMAGEINFO is sufficient to collect the needed +information, but the TW_IMAGEINFO structure is fixed, and only contains a +fraction of the possible meta-data values that can be associated with an image.

+ +

 

+ +

Extended Image Info (DAT_EXTIMAGEINFO) was introduced in 1.7 +of the TWAIN specification as a way to collect a tagged list of meta-data for +every captured image.  The Kodak Document Scanners significantly extend +this list with custom data.  The purpose of this document is to detail +what information is present and how to get it.

+ +

 

+ +

The term “All of the Kodak Document Scanners” refers to the +following models or families:

+ +

 

+ +

            +3000/4000

+ +

            +5000/7000/9000

+ +

            +i30/i40

+ +

            +i200

+ +

            +i600

+ +

            +i700

+ +

            +i800

+ +

            +i900

+ +

            +i1100

+ +

            +i1200

+ +

            +i1300

+ +

            +i1400

+ +

            +i1800

+ +

            +i2000

+ +

            +i2900

+ +

            +i3000

+ +

            +i4000

+ +

            +i5000

+ +

            +PS50/PS80

+ +

 

+ +

2.   CAP_EXTIMAGEINFO

+ +

All of the Kodak Document Scanners support DAT_EXTIMAGEINFO, +however a well designed TWAIN application should confirm this by testing that +the capability CAP_EXTIMAGEINFO is TRUE.

+ +

 

+ +

 

+ +

3.   MSG_GETSPECIAL

+ +

The TWAIN specification (currently at 2.1) indicates that +DG_IMAGE / DAT_EXTIMAGEINFO / MSG_GET is only supported in state 7, after the +image has been fully transferred (that is after the receipt of TWRC_XFERDONE).  +All of the Kodak Document Scanners are able to report everything there is to +know about an image in state 6, prior to transferring the image (this applies +to DAT_IMAGEINFO, as well).

+ +

 

+ +

In order to support this behavior without violating the +TWAIN specification we have added a new custom message MSG_GETSPECIAL.  +DG_IMAGE / DAT_EXTIMAGEINFO / MSG_GETSPECIAL can be used in state 6 or 7, and +will report identical information for an image in either state.

+ +

 

+ +

 

+ +

4.   Supported Information

+ +

The following Extended Image +Information values are supported by the TWAIN driver.  Those fields +followed by a TWAIN name (such as ICAP_COMPRESSION) indicate that the values +for that field come from that capability (ex: TWCP_GROUP4).

+ +

 

+ +

Not all fields are supported for +all scanners.  The following codes can be used to figure out which scanner +family/models support a given item.

+ +

 

+ +

            +g - 5000/7000/9000 +series support

+ +

      v - 3000/4000 series +support

+ +

p - i800 series support

+ +

a - i200 series support

+ +

m - i30/i40/i55/i65 series support

+ +

f - i1100 series support

+ +

o - i600/i700/i1800 series support

+ +

h - i1200/i1300/i1400 series +support

+ +

d - +i2000/i2900/i3000/i4000/i5000/PS50/PS80 series support

+ +

r - i900 series support

+ +

 

+ +

* - Reference Gemini Integrator’s Guide for further +information

+ +

 

+ +

If a field is unsupported, +TWRC_INFONOTSUPPORTED (8) will be returned as the condition code.

+ +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

TWAIN + Standard

+
+

Type

+
+

Description

+
+

Supported + Models

+
+

TWEI_BOOKNAME

+
+

TWTY_STR255

+
+

- Image + Address fixed field

+
+

g,p,i1800

+
+

TWEI_CAMERA

+
+

TWTY_STR255

+
+

- + DAT_FILESYSTEM camera

+
+

all

+
+

TWEI_CHAPTERNUMBER

+
+

TWTY_UINT32

+
+

- Image + Address level 3

+
+

p,i1800

+
+

TWEI_DESKEWSTATUS

+
+

TWTY_UINT32

+
+

- + Disabled (3), Pass(0), Fail(2)

+
+

all

+
+

TWEI_DOCUMENTNUMBER

+
+

TWTY_UINT32

+
+

- Document + count

+
+

all

+
+

TWEI_FILESYSTEMSOURCE

+
+

TW_STR255

+
+

- The + camera that captured the image data

+
+

d,r

+
+

TWEI_FRAME

+
+

TWTY_FRAME

+
+

- + Similar to ICAP_FRAME

+
+

all

+
+

TWEI_FRAMENUMBER

+
+

TWTY_UINT32

+
+

- + Always 1 (only 1 cropping region per image)

+
+

all

+
+

TWEI_IMAGEMERGED

+
+

TW_BOOL

+
+

- + Indicates that the current image is merged between the front and rear images

+
+

d,r

+
+

TWEI_PAGENUMBER

+
+

TWTY_UINT32

+
+

- Page + count

+
+

all

+
+

TWEI_PAGESIDE

+
+

TWTY_UINT16

+
+

- Page + side TWCS_TOP/TWCS_BOTTOM

+
+

d,r

+
+

TWEI_PIXELFLAVOR

+
+

TWTY_UINT16

+
+

- + Similar to ICAP_PIXELFLAVOR

+
+

all

+
+

TWEI_SKEWORIGINALANGLE

+
+

TWTY_UINT32

+
+

- The + amount of skew in the original image

+
+

all

+
+

 

+
+

 

+
+

 

+
+

 

+
+

Custom + Data

+
+

 

+
+

 

+
+

 

+
+

TWEI_HDR_AUTOCOLORAMOUNT

+
+

TWTY_UINT32

+
+

- Auto color + amount

+
+

all + (except g,v,p,a,m,f)

+
+

TWEI_HDR_AUTOCOLORDETECTED

+
+

TWTY_UINT32

+
+

- Auto + color detected

+
+

all + (except g,v,p,a,m,f)

+
+

TWEI_HDR_AUTOCOLORTHRESHOLD

+
+

TWTY_UINT32

+
+

- Auto + color threshold

+
+

all + (except g,v,p,a,m,f)

+
+

TWEI_HDR_BARCODE

+
+

TWTY_STR255

+
+

- KDIS + formatted barcodes*

+
+

g

+
+

TWEI_HDR_BINARIZATIONQUALITY

+
+

TWTY_UINT32

+
+

- + Conveys the quality level of the binarized image

+
+

d,r

+
+

TWEI_HDR_BITONALCONTRAST

+
+

TWTY_UINT32

+
+

- + Bitonal contrast (0-FFFh)

+
+

o

+
+

TWEI_HDR_BITONALCONTRASTPERCENTAGE

+
+

TWTY_UINT32

+
+

- + Bitonal contrast percentage (0-100d)

+
+

o

+
+

TWEI_HDR_BITONALTHRESHOLD

+
+

TWTY_UINT32

+
+

- + Bitonal threshold (0-255d)

+
+

o

+
+

TWEI_HDR_BITORDER

+
+

TWTY_UINT32

+
+

- + Similar to ICAP_BITORDER (MSB->LSB)

+
+

all

+
+

TWEI_HDR_BOOKNAME_A

+
+

TWTY_STR255

+
+

- Fixed + field A (unsupported unless field A is fixed)

+
+

g,p,i1800

+
+

TWEI_HDR_BOOKNAME_B

+
+

TWTY_STR255

+
+

- Fixed + field B (unsupported unless field B is fixed)

+
+

p,i1800

+
+

TWEI_HDR_BOOKNAME_C

+
+

TWTY_STR255

+
+

- Fixed + field C (unsupported unless field C is fixed)

+
+

p,i1800

+
+

TWEI_HDR_BOOKNAME_D

+
+

TWTY_STR255

+
+

- Fixed + field D (unsupported unless field D is fixed)

+
+

p,i1800

+
+

TWEI_HDR_COMPRESSION

+
+

TWTY_UINT32

+
+

- + Similar to ICAP_COMPRESSION

+
+

all

+
+

TWEI_HDR_DATE

+
+

TWTY_UINT32

+
+

- Date + (YYMMDD)

+
+

all

+
+

TWEI_HDR_DESKEW

+
+

TWTY_UINT32

+
+

- Image + Manager deskew flag: Yes(1), No(0), Disabled(-1).  If -1 check + TWEI_DESKEWSTATUS.

+
+

all

+
+

TWEI_HDR_DESKEWANGLE

+
+

TWTY_UINT32

+
+

- Angle + in 1/10000 degrees - Example: 4.7 degress is represented as 47000

+
+

h,d,r

+
+

TWEI_HDR_DESKEWANGLEACTUAL

+
+

TWTY_INT32

+
+

- Angle + (-450 to 450 degrees, -450,450 = Fail, signed 10ths of a degree)

+
+

o

+
+

TWEI_HDR_DESKEWCONFIDENCEFACTOR

+
+

TWTY_UINT32

+
+

- + Deskew confidence (1-99d, 1%=Fail, 99%=Success)

+
+

o

+
+

TWEI_HDR_DIFFERENCEHISTOGRAM

+
+

TWTY_UINT8

+
+

- + Difference histogram (256 bytes)

+
+

o

+
+

TWEI_HDR_DITHER

+
+

TWTY_STR255

+
+

- + Similar to ICAP_HALFTONES

+
+

g,v,p,a,m,f,o,h

+
+

TWEI_HDR_DOCUMENTCOUNT

+
+

TWTY_UINT32

+
+

- Doc + counter (CAP_PRINTERINDEX for gp, for va only if printer installed))

+
+

all

+
+

TWEI_HDR_DROPOUTSTATUS

+
+

TWTY_INT32

+
+

- ECDO + Algorithm Status (0 = Success, >0 Algorithm Specific Error)

+
+

h,d 

+
+

TWEI_HDR_DUALSTACKINGSTACK

+
+

TWTY_UINT32

+
+

- When + dual stacking is enabled, contains output tray a document was dropped into (1,2)

+
+

d-i5000 + only

+
+

TWEI_HDR_FEATUREPATCH

+
+

TWTY_UINT32

+
+

- + Feature patch value (1,4,6)

+
+

p,a,o,i1400,i3000,i4000,i5000

+
+

TWEI_HDR_FOLDEDCORNERPERCENTAGE

+
+

TWTY_UINT32

+
+

- Folded + corner percentage (0-100d) 0->Not folded, 100->Folded along the + diagonal

+
+

o

+
+

TWEI_HDR_GAMMATABLE

+
+

TWTY_UINT8

+
+

- Gamma + table (256 bytes)

+
+

o

+
+

TWEI_HDR_IMAGEADDRESSDEFS

+
+

TWTY_STR255

+
+

- IA definitions + (ex: FFF.333.222.111) (where each field is and how they are formatted)

+
+

p,i1800

+
+

TWEI_HDR_IMAGEADDRESSSTRING

+
+

TWTY_STR255

+
+

- + Formatted image address string

+
+

p,i1800

+
+

TWEI_HDR_IMAGENUMBER

+
+

TWTY_UINT32

+
+

- Count + of images in this session (since starting the application)

+
+

all

+
+

TWEI_HDR_IMAGESTATUS

+
+

TWTY_UINT32

+
+

- Image + status

+
+

none

+
+

TWEI_HDR_LATCHEDFLAG

+
+

TWTY_UINT32

+
+

- Latch + switch flag*

+
+

g

+
+

TWEI_HDR_LENGTH

+
+

TWTY_UINT32

+
+

- Size of + image data from scanner (bytes)

+
+

all

+
+

TWEI_HDR_LEVEL

+
+

TWTY_UINT32

+
+

- Image + Address Level  (0,1,2,3)

+
+

g,p,i1800

+
+

TWEI_HDR_LINELENGTH

+
+

TWTY_UINT32

+
+

- Image + width (pixels)

+
+

all

+
+

TWEI_HDR_LONGPAPERLASTSEGMENT

+
+

TWTY_UINT32

+
+

- Image + last segment

+
+

a

+
+

TWEI_HDR_LONGPAPERSEGMENTNUMBER

+
+

TWTY_UINT32

+
+

- Image + segment number

+
+

a

+
+

TWEI_HDR_MODE

+
+

TWTY_UINT32

+
+

- Mode* +

+
+

g

+
+

TWEI_HDR_MULTIFEED

+
+

TWTY_UINT32

+
+

- + Multifeed detected: Yes(1), No(0))

+
+

all + (except g,v,p)

+
+

TWEI_HDR_MOMENTARYFLAG

+
+

TWTY_UINT32

+
+

- + Momentary flag*

+
+

g

+
+

TWEI_HDR_PAGEIMAGENUMBER

+
+

TWTY_UINT32

+
+

- Image + count on sheet (1 – 4)

+
+

all

+
+

TWEI_HDR_PAGELENGTH

+
+

TWTY_UINT32

+
+

- Image + height (pixels)

+
+

all

+
+

TWEI_HDR_PAGENUMBER

+
+

TWTY_UINT32

+
+

- Count + of sheets in this session

+
+

all

+
+

TWEI_HDR_PAGESIDE

+
+

TWTY_UINT32

+
+

- Page + side: Front(0), Rear(1)

+
+

all

+
+

TWEI_HDR_PATCHDETECTED

+
+

TWTY_UINT32

+
+

- Patch + code detected on this sheet

+
+

p,a,o,i1400,i3000,i4000,i5000

+
+

TWEI_HDR_PCARD_HEADER

+
+

TWTY_STR255

+
+

- + Personality-Card Header

+
+

none

+
+

TWEI_HDR_PCARD_FOOTER

+
+

TWTY_STR255

+
+

- + Personality-Card Footer

+
+

none

+
+

TWEI_HDR_POLARITY

+
+

TWTY_UINT32

+
+

- SCSI + RIF value: 0 is White(0), 1 is White(1)

+
+

gvpam

+
+

TWEI_HDR_PRINTERINDEX

+
+

TWTY_UINT32

+
+

- String + Doc counter (CAP_PRINTERINDEX)

+
+

all

+
+

TWEI_HDR_PRINTERSTRING

+
+

TWTY_STR255

+
+

- + String printed on document

+
+

v,p,a,d,i1400

+
+

TWEI_HDR_PROCESSINGSTATUS

+
+

TWTY_UINT32

+
+

- + Processing Status (0 = Disabled, 1 = Success, 2 = Skipped, 4 = Fail)

+
+

none

+
+

TWEI_HDR_RAWIMAGEHEADER

+
+

TWTY_STR255

+
+

- Raw + image header from scanner

+
+

p,o

+
+

TWEI_HDR_REGENERATION

+
+

TWTY_UINT32

+
+

- Retry + count

+
+

none

+
+

TWEI_HDR_RESOLUTION

+
+

TWTY_UINT32

+
+

- + ICAP_RESOLUTION

+
+

all

+
+

TWEI_HDR_ROLL

+
+

TWTY_UINT32

+
+

- Roll + number*

+
+

g-990 + only

+
+

TWEI_HDR_SKEW

+
+

TWTY_UINT32

+
+

- Skew flag detect: Yes(1), No(0)*

+
+

g-5000/7000 only

+
+

TWEI_HDR_SUMHISTOGRAM

+
+

TWTY_UINT8

+
+

- Sum + histogram (256 bytes)

+
+

none

+
+

TWEI_HDR_TIME

+
+

TWTY_UINT32

+
+

- Time + (HHMMSS)

+
+

all

+
+

TWEI_HDR_TOKEN_COUNT

+
+

TWTY_UINT32

+
+

- Token + flag

+
+

none

+
+

TWEI_HDR_XOFFSET

+
+

TWTY_UINT32

+
+

- + X-offset of image (pixels)

+
+

all

+
+

TWEI_HDR_XML

+
+

TWTY_HANDLE

+
+

- + Everything in XML format (<reportimage> data)

+
+

d,r

+
+

TWEI_HDR_YOFFSET

+
+

TWTY_UINT32

+
+

- + Y-offset of image (pixels)

+
+

all

+
+ +

 

+ +

 

+ +

5.   Sample Code

+ +

This section shows all the fields being collected in a +single DAT_EXTIMAGEINFO call.  Hopefully this is enough information to get +the information needed by your application.  We strongly recommend against +getting fields you don’t need, especially ones that require memory allocations, +as this can impact the performance of the system (especially on the faster +scanners).

+ +

 

+ +

 

+ +

// This function creates a huge string that +has ExtImageData in

+ +

// it along with some text headers.  The +main purpose of the

+ +

// function is to show how to collect +different kinds of data.

+ +

// Real applications should whittle this +function down to exactly

+ +

// what they need.

+ +

#define cvtf(x) (((float)(x.Whole))+(((float)x.Frac)/65536.0))

+ +

#define FI(x) FindIndex(eii,x)

+ +

int FindIndex

+ +

(

+ +

       +TW_EXTIMAGEINFO      *eii,

+ +

       +int                  +InfoID

+ +

)

+ +

{

+ +

       +for (int ii=0; +eii->Info[ii].InfoID; ii++)

+ +

       +{

+ +

              +if +(eii->Info[ii].InfoID == InfoID) return(ii);

+ +

       +}

+ +

       +return(0);

+ +

}

+ +

 

+ +

void ShowExtImageInfo

+ +

(

+ +

void

+ +

)

+ +

{

+ +

       int +                 +ii;

+ +

       int +                 +sts;

+ +

       int +                 +len;

+ +

       int +                 +tmpint;

+ +

       char +                +*str;

+ +

       TW_EXTIMAGEINFO +     *eii;

+ +

       TW_FRAME +            *f;

+ +

char hdr_titles[8192];

+ +

char hdr_data[8192];

+ +

 

+ +

       // Allocate the string...

+ +

       str = +(char*)GlobalAlloc(GPTR,65536);

+ +

if (!str)

+ +

{

+ +

       +// GlobalAlloc failed...

+ +

return;

+ +

}

+ +

 

+ +

       // Allocate the table...

+ +

       eii = (TW_EXTIMAGEINFO*)GlobalAlloc

+ +

(

+ +

GPTR,

+ +

sizeof(TW_EXTIMAGEINFO)+(sizeof(TW_INFO)*64)

+ +

);

+ +

if (!eii)

+ +

{

+ +

       +// GlobalAlloc failed...

+ +

return;

+ +

}

+ +

 

+ +

       // Build the table...

+ +

       ii = 0;

+ +

       +eii->Info[ii++].InfoID  = TWEI_BOOKNAME;

+ +

       eii->Info[ii++].InfoID  += TWEI_CAMERA;

+ +

       +eii->Info[ii++].InfoID  += TWEI_CHAPTERNUMBER;

+ +

       +eii->Info[ii++].InfoID  = TWEI_DESKEWSTATUS;

+ +

       +eii->Info[ii++].InfoID  = TWEI_DOCUMENTNUMBER;

+ +

       +eii->Info[ii++].InfoID  = TWEI_FRAME;

+ +

       eii->Info[ii++].InfoID  += TWEI_FRAMENUMBER;

+ +

       +eii->Info[ii++].InfoID  = TWEI_PAGENUMBER;

+ +

       +eii->Info[ii++].InfoID  = TWEI_PIXELFLAVOR;

+ +

       +eii->Info[ii++].InfoID  = TWEI_SKEWORIGINALANGLE;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_BARCODE;

+ +

       eii->Info[ii++].InfoID  += TWEI_HDR_BITORDER;

+ +

       eii->Info[ii++].InfoID  += TWEI_HDR_COMPRESSION;

+ +

       +eii->Info[ii++].InfoID  += TWEI_HDR_DATE;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_DESKEW;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_DESKEWANGLE;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_DESKEWANGLEACTUAL;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_DOCUMENTCOUNT;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_DUALSTACKINGSTACK;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_FEATUREPATCH;

+ +

       eii->Info[ii++].InfoID  += TWEI_HDR_IMAGEADDRESSSTRING;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_IMAGEADDRESSDEFS;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_IMAGENUMBER;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_LATCHEDFLAG;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_LENGTH;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_LEVEL;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_LINELENGTH;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_LONGPAPERLASTSEGMENT;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_LONGPAPERSEGMENTNUMBER;

+ +

       eii->Info[ii++].InfoID  += TWEI_HDR_MODE;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_MOMENTARYFLAG;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_PAGEIMAGENUMBER;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_PAGELENGTH;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_PAGENUMBER;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_PAGESIDE;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_POLARITY;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_PRINTERSTRING;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_RESOLUTION;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_ROLL;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_SKEW;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_TIME;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_XOFFSET;

+ +

       +eii->Info[ii++].InfoID  = TWEI_HDR_YOFFSET;

+ +

       eii->Info[ii++].InfoID  = TWEI_HDR_XML;

+ +

       eii->NumInfos = +ii;

+ +

 

+ +

       // Issue the command to the driver...

+ +

       sts = (*pDSM_Entry)

+ +

(

+ +

&AppId,

+ +

&SourceId,

+ +

DG_IMAGE,

+ +

DAT_EXTIMAGEINFO,

+ +

MSG_GETSPECIAL,

+ +

(TW_MEMREF)eii

+ +

);

+ +

if (sts != TWRC_SUCCESS)

+ +

{

+ +

       +// DAT_EXTIMAGEINFO failed…

+ +

       +return;

+ +

}

+ +

 

+ +

// Grab the barcode +length (if there is one)…

+ +

if (eii->Info[FI(TWEI_HDR_BARCODE)].CondCode +== TWRC_SUCCESS)

+ +

{

+ +

       +len = strlen((char*)eii->Info[FI(TWEI_HDR_BARCODE)].Item);

+ +

}

+ +

else

+ +

{

+ +

       +len = 0;

+ +

}

+ +

 

+ +

       // Format the headers...

+ +

       str[0] = 0;

+ +

       +sprintf(&str[strlen(str)],"Standard Extensions\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_CAMERA:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_FRAME:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_PIXELFLAVOR:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_DESKEWSTATUS:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_SKEWORIGINALANGLE:\n");

+ +

       +sprintf(&str[strlen(str)],"\nImage Address\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_BOOKNAME:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_CHAPTERNUMBER:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_DOCUMENTNUMBER:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_PAGENUMBER:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_FRAMENUMBER:\n");

+ +

       +sprintf(&str[strlen(str)],"\nCustom Extensions\n");

+ +

       if (len < 40) {

+ +

              +sprintf(&str[strlen(str)],"TWEI_HDR_BARCODE:\n");

+ +

       } else if (len < 80) +{

+ +

              +sprintf(&str[strlen(str)],"TWEI_HDR_BARCODE:\n\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"TWEI_HDR_BARCODE:\n\n\n");

+ +

       }

+ +

       sprintf(&str[strlen(str)],"TWEI_HDR_BITORDER:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_COMPRESSION:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_DATE:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_DESKEW:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_DESKEWANGLE:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_DESKEWANGLEACTUAL:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_DOCUMENTCOUNT:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_DUALSTACKINGSTACK:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_FEATUREPATCH:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_IMAGEADDRESDEFS:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_IMAGEADDRESSTRING:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_IMAGENUMBER:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_LATCHEDFLAG:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_LENGTH:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_LEVEL:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_LINELENGTH:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_LONGPAPERLASTSEGMENT:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_LONGPAPERSEGMENTNUMBER:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_MODE:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_MOMENTARYFLAG:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_PAGEIMAGENUMBER:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_PAGELENGTH:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_PAGENUMBER:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_PAGESIDE:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_POLARITY:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_PRINTERSTRING:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_RESOLUTION:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_ROLL:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_SKEW:\n");

+ +

       sprintf(&str[strlen(str)],"TWEI_HDR_TIME:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_XOFFSET:\n");

+ +

       +sprintf(&str[strlen(str)],"TWEI_HDR_YOFFSET:\n");

+ +

       +strcpy(hdr_titles,str);

+ +

 

+ +

       // Blank lines...

+ +

       str[0] = 0;

+ +

       +sprintf(&str[strlen(str)],"\n");

+ +

 

+ +

       // +Camera...

+ +

       +if (eii->Info[ii=FI(TWEI_CAMERA)].CondCode +!= TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +sprintf(&str[strlen(str)],"<%s>\n",eii->Info[ii].Item);

+ +

              +GlobalFree((void*)eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Frame...

+ +

       if (eii->Info[ii=FI(TWEI_FRAME)].CondCode != +TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +f = (TW_FRAME*)eii->Info[ii].Item;

+ +

              +sprintf

+ +

(

+ +

&str[strlen(str)],

+ +

"L%.2f  R%.2f  +T%.2f  B%.2f\n",

+ +

cvtf(f->Left),

+ +

cvtf(f->Top),

+ +

cvtf(f->Right),

+ +

cvtf(f->Bottom)

+ +

);

+ +

              +GlobalFree((void*)eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // PixelFlavor...

+ +

       if (eii->Info[ii=FI(TWEI_PIXELFLAVOR)].CondCode != +TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +switch (eii->Info[ii].Item)

+ +

{

+ +

                     +default:

+ +

                           +sprintf(&str[strlen(str)],"*** ERROR ***\n");

+ +

                           +break;

+ +

                     +case TWPF_CHOCOLATE:

+ +

                           +sprintf(&str[strlen(str)],"TWPF_CHOCOLATE\n");

+ +

                           +break;

+ +

                     +case TWPF_VANILLA:

+ +

                           +sprintf(&str[strlen(str)],"TWPF_VANILLA\n");

+ +

                           +break;

+ +

              +}

+ +

       }

+ +

 

+ +

       // DeskewStatus...

+ +

       if (eii->Info[ii=FI(TWEI_DESKEWSTATUS)].CondCode +!= TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +switch (eii->Info[ii].Item)

+ +

{

+ +

                     +default:

+ +

                           +sprintf(&str[strlen(str)],"*** ERROR ***\n");

+ +

                           +break;

+ +

                     +case TWDSK_SUCCESS:

+ +

                           +sprintf(&str[strlen(str)],"TWDSK_SUCCESS\n");

+ +

                           +break;

+ +

                     +case TWDSK_REPORTONLY:

+ +

                           +sprintf(&str[strlen(str)],"TWDSK_REPORTONLY\n");

+ +

                           +break;

+ +

                     +case TWDSK_FAIL:

+ +

                           +sprintf(&str[strlen(str)],"TWDSK_FAIL\n");

+ +

                           +break;

+ +

                     +case TWDSK_DISABLED:

+ +

                           +sprintf(&str[strlen(str)],"TWDSK_DISABLED\n");

+ +

                           +break;

+ +

              +}

+ +

       }

+ +

 

+ +

       // SkewOriginalAngle...

+ +

       if +(eii->Info[ii=FI(TWEI_SKEWORIGINALANGLE)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Blank lines...

+ +

       +sprintf(&str[strlen(str)],"\n\n");

+ +

 

+ +

       // BookName...

+ +

       if (eii->Info[ii=FI(TWEI_BOOKNAME)].CondCode != +TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"<%s>\n",eii->Info[ii].Item);

+ +

              +GlobalFree((void*)eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // ChapterNumber...

+ +

       if (eii->Info[ii=FI(TWEI_CHAPTERNUMBER)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // DocumentNumber...

+ +

       if (eii->Info[ii=FI(TWEI_DOCUMENTNUMBER)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // PageNumber...

+ +

       if (eii->Info[ii=FI(TWEI_PAGENUMBER)].CondCode != +TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // FrameNumber...

+ +

       if (eii->Info[ii=FI(TWEI_FRAMENUMBER)].CondCode != +TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Blank lines...

+ +

       +sprintf(&str[strlen(str)],"\n\n");

+ +

 

+ +

       // Barcode...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_BARCODE)].CondCode != +TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +if (len <= 0) {

+ +

                     +sprintf(&str[strlen(str)],"<>\n");

+ +

              +} else if (len +< 40) {

+ +

                     +sprintf(&str[strlen(str)],"<%s>\n",eii->Info[ii].Item);

+ +

                     +str[strlen(str)-3] = '$';

+ +

              +} else if (len +< 80) {

+ +

                     +char xxx[512];

+ +

                     +strcpy(xxx,(char*)eii->Info[ii].Item);

+ +

                     +xxx[40] = 0;

+ +

                     +sprintf(&str[strlen(str)],"<%s\n",xxx);

+ +

                     +strcpy(xxx,&((char*)eii->Info[ii].Item)[40]);

+ +

                     +sprintf(&str[strlen(str)],"%s>\n",xxx);

+ +

                     +str[strlen(str)-3] = '$';

+ +

              +} else {

+ +

                     +char xxx[512];

+ +

                     +strcpy(xxx,(char*)eii->Info[ii].Item);

+ +

                     +xxx[40] = 0;

+ +

                     +sprintf(&str[strlen(str)],"<%s\n",xxx);

+ +

                     +strcpy(xxx,&((char*)eii->Info[ii].Item)[40]);

+ +

                     +xxx[40] = 0;

+ +

                     +sprintf(&str[strlen(str)],"%s\n",xxx);

+ +

                     +strcpy(xxx,&((char*)eii->Info[ii].Item)[80]);

+ +

                     +sprintf(&str[strlen(str)],"%s>\n",xxx);

+ +

                     +str[strlen(str)-3] = '$';

+ +

              +}

+ +

              +GlobalFree((void*)eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // BitOrder...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_BITORDER)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Compression...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_COMPRESSION)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Date...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_DATE)].CondCode != +TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +tmpint = eii->Info[ii].Item;

+ +

              +sprintf

+ +

(

+ +

&str[strlen(str)],

+ +

"%02d/%02d/%02d\n",

+ +

tmpint/10000,

+ +

(tmpint/100)-((tmpint/10000)*100),

+ +

tmpint-((tmpint/100)*100)

+ +

);

+ +

       }

+ +

 

+ +

       // Deskew...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_DESKEW)].CondCode != +TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // DeskewAngle...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_DESKEWANGLE)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

// DeskewAngleActual...

+ +

if (eii->Info[ii=FI(TWEI_HDR_DESKEWANGLEACTUAL)].CondCode +!= TWRC_SUCCESS) {

+ +

       +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

} else +{

+ +

       +sprintf(&str[strlen(str)],"%d.%d\n",((TW_INT32)eii->Info[ii].Item)/10,abs(((TW_INT32)eii->Info[ii].Item)) +% 10);

+ +

}

+ +

 

+ +

       // DocumentCount...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_DOCUMENTCOUNT)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       } 

+ +

 

+ +

       // Dropout Status...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_DROPOUTSTATUS)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Dualstackingstack...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_DUALSTACKINGSTACK)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // FeaturePatch...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_FEATUREPATCH)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

  

+ +

       // ImageAddressDefs...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_IMAGEADDRESSDEFS)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"<%s>\n",eii->Info[ii].Item);

+ +

              +GlobalFree((void*)eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // ImageAddressString...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_IMAGEADDRESSSTRING)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"<%s>\n",eii->Info[ii].Item);

+ +

              +GlobalFree((void*)eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // ImageNumber...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_IMAGENUMBER)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // LatchedFlag...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_LATCHEDFLAG)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Length...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_LENGTH)].CondCode != +TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Level...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_LEVEL)].CondCode != +TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // LineLength...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_LINELENGTH)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

      

+ +

       +// LongPaperLastSegment...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_LONGPAPERLASTSEGMENT)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       +// LongPaperSegmentNumber...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_LONGPAPERSEGMENTNUMBER].CondCode != TWRC_SUCCESS){

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       +// Mode...

+ +

       +if (eii->Info[ii=FI(TWEI_HDR_MODE)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // MomentaryFlag...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_MOMENTARYFLAG)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // PageImageNumber...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_PAGEIMAGENUMBER)].CondCode != TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // PageLength...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_PAGELENGTH)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // PageNumber...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_PAGENUMBER)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // PageSide...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_PAGESIDE)].CondCode +!= TWRC_SUCCESS) {

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       } else {

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Polarity...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_POLARITY)].CondCode +!= TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // PrinterString...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_PRINTERSTRING)].CondCode != TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +sprintf(&str[strlen(str)],"<%s>\n",eii->Info[ii].Item);

+ +

              +GlobalFree((void*)eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Resolution...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_RESOLUTION)].CondCode +!= TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Roll...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_ROLL)].CondCode != TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Skew...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_SKEW)].CondCode != TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Time...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_TIME)].CondCode != TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +tmpint = eii->Info[ii].Item;

+ +

              +sprintf

+ +

(

+ +

&str[strlen(str)],

+ +

"%02d:%02d:%02d\n",

+ +

tmpint/10000,

+ +

(tmpint/100)-((tmpint/10000)*100),

+ +

tmpint-((tmpint/100)*100)

+ +

);

+ +

       }

+ +

 

+ +

       // Xoffset...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_XOFFSET)].CondCode != +TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // Yoffset...

+ +

       if (eii->Info[ii=FI(TWEI_HDR_YOFFSET)].CondCode != +TWRC_SUCCESS)

+ +

{

+ +

              +sprintf(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

else

+ +

{

+ +

              +sprintf(&str[strlen(str)],"%d\n",eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

       // XML...

+ +

       if +(eii->Info[ii=FI(TWEI_HDR_XML)].CondCode != TWRC_SUCCESS)

+ +

       {

+ +

              sprintf +(&str[strlen(str)],"*** unsupported ***\n");

+ +

       }

+ +

       else

+ +

       {

+ +

              sprintf +(&str[strlen(str)],"<%s>\n",eii->Info[ii].Item);

+ +

              GlobalFree((void*)eii->Info[ii].Item);

+ +

       }

+ +

 

+ +

strcpy(hdr_data,str);

+ +

 

+ +

       // At this point hdr_titles is an array of the TWEI* names, +and hdr_data is the array of the data for the TWEI*’s

+ +

       +// Final cleanup

+ +

GlobalFree(eii);

+ +

}

+ +

 

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/TWAIN_Features.htm b/Spec/Kodak/TWAIN_Features.htm new file mode 100644 index 0000000..d5beeb2 --- /dev/null +++ b/Spec/Kodak/TWAIN_Features.htm @@ -0,0 +1,2707 @@ + + + + + + + + +Correct TWAIN Usage + + + + + + + + + +
+ +

Background Smoothing:

+ +

 

+ +

The purpose of Background Smoothing is to remove overall +mottle or discolorations in the background of the scanned image typically +resulting from scanning and/or paper non-uniformity. Background Smoothing improves +overall appearance of the image and also results in higher file compression +ratios. These results are achieved by “smoothing” up to three background colors +(one neutral and two additional colors). Optionally one or more background +colors may be smoothed to white.

+ +

 

+ +

Background smoothing is only available for Color/Grayscale +output.

+ +

 

+ +

The type of background smoothing that is applied to the +image is selected using ICAP_BACKGROUNDADJUSTMODE. Selecting TWBS_AUTOMATIC or +TWBS_AUTOMATICBASIC will “smooth” up to three background colors. Selecting +TWBS_CHANGETOWHITE will allow one or more background colors to be smoothed to +white.

+ +

 

+ +

When the TWBS_CHANGETOWHITE adjustment mode is selected, +ICAP_ BACKGROUNDADJUSTAPPLYTO becomes available. ICAP_ BACKGROUNDADJUSTAPPLYTO +is used to select which background colors to smooth +to white.

+ +

TWBA_ PREDOMINATE will smooth the predominate background +color to white.

+ +

TWBA_NEUTRAL will smooth just the +neutral color to white and also smooth the two additional background colors.

+ +

TWBA_ALL will smooth up to three background colors to white.

+ +

 

+ +

The aggressiveness of the background smoothing is selected +using ICAP_BACKGROUNDADJUSTAGGRESSIVENESS. The more higher the value, the more +likely a pixel will be determined to be background.

+ +

This is available when ICAP_BACKGROUNDADJUSTMODE is not set +to TWBS_NONE or TWBS_AUTOMATICBASIC.

+ +

 

+ +

 

+ +

Blank Image Deletion:

+ +

 

+ +

This +feature allows the user to instruct the driver to remove images that are +considered blank. The driver can determine if an image is blank based on the +content in the image or the final image size after any compression. The driver +determines if it is blank on a per image basis. For example, if a Color and +Black and White images are being created on the Front, it is possible that Front +Color image will not be considered blank, but the Black and White image will be +considered blank.

+ +

 

+ +

Blank +image deletion, for a camera, can be turned on by setting CAP_BLANKPAGEMODE to +TWBM_CONTENT (content based) or TWBM_COMPSIZE (final image size). It can be +turned off by setting CAP_BLANKPAGEMODE to TWBM_NONE. However, blank page +detection based on content is not available for all scanners.

+ +

 

+ +

When +TWBM_CONTENT is selected, CAP_BLANKPAGECONTENT becomes available.  +CAP_BLANKPAGECONTENT is used to set the content percentage.  If the image +content is less or equal to the percent specified, the image will be deleted.

+ +

 

+ +

When +TWBM_COMPSIZE is selected, CAP_BLANKPAGECOMPSIZEBW (Black and White image), +CAP_BLANKPAGECOMPSIZEGRAY (Grayscale image) and CAP_BLANKPAGECOMPSIZERGB (Color +image) are use to set the image size. If the final image size is less that the +corresponding value, the image is deleted. For backward compatibility, the +value CAP_BLANKPAGEMODE will be changed when any CAP_BLANKPAGECOMPSIZExxx +is changed. If any value becomes non-zero, CAP_BLANKPAGEMODE will be set to +TWBM_COMPSIZE. If all three values become zero, CAP_BLANKPAGEMODE well be set +to TWBM_NONE.

+ +

 

+ +

 

+ +

Color Adjustments:

+ +

 

+ +

There are +adjustments for Color/Grayscale outputs. These adjustments allow users to +modify the overall Brightness, Contrast and Hue (red, green and blue) of their +scanned documents; they are applied after the image has been color corrected. +The user may also turn off color correction, including gamma correction (i.e. +raw scanner image); the other adjustments are still applied.

+ +

 

+ +

All the +possible adjustments are: Brightness, Contrast, Red, Green, Blue, and Raw. +However, not all scanners support these.

+ +

 

+ +

Brightness +and Contrast is controlled using ICAP_COLORBRIGHTNESSMODE.

+ +

            +TWCBR_NONE means no adjustment is made.

+ +

            +TWCBR_MANUAL means the user can adjust Brightness and Contrast (see +ICAP_BRIGHTNESS and ICAP_CONTRAST).

+ +

            +TWCBR_AUTOMATICBASIC means the scanner will automatically adjust the image.

+ +

 

+ +

Brightness +is controlled using ICAP_BRIGHTNESS. Increasing this will make documents appear +to be lighter. This is ignored if ICAP_COLORBRIGHTNESSMODE is not set to +TWCBR_MANUAL.

+ +

 

+ +

Contrast +is controlled using ICAP_CONTRAST. Increasing this, for Color/Grayscale, will +increase the image’s tonal range. This is ignored if ICAP_COLORBRIGHTNESSMODE +is not set to TWCBR_MANUAL.

+ +

 

+ +

Color +Balance is controlled using ICAP_COLORBALANCEMODE.

+ +

            +TWCBM_NONE means no adjustment is made.

+ +

            +TWCBM_MANUAL means the user can adjust Red, Green and Blue (see +ICAP_COLORBALANCEREAD/GREEN/BLUE)

+ +

            +TWCBM_AUTOMATICBASIC means the scanner will automatically adjust the balance to +be white.

+ +

            +TWCBM_AUTOMATIC is the same as TWCBM_AUTOMATICBASIC but the user can also +adjust the aggressiveness of the balance (see +ICAP_COLORBALANCEAUTOMATICAGRESSIVENESS)

+ +

            +

+ +

The +aggressiveness of the auto white is set using ICAP_COLORBALANCEAUTOMATICAGGRESSIVENESS. +The higher the value, the more likely a pixel will be determined to be white.

+ +

 

+ +

Red, +Green, and Blue are controlled using ICAP_COLORBALANCERED, +ICAP_COLORBALANCEGREEN, and ICAP_COLORBALANCEBLUE; respectively. Increasing +Blue, for example, will make the image appear bluer. This is ignored if +ICAP_COLORBALANCEMODE is not set to TWCBM_MANUAL

+ +

 

+ +

Raw +(i.e. no color/gamma correction) is controlled using ICAP_GAMMAENABLED.

+ +

 

+ +

 

+ +

Color +Sharpening:

+ +

 

+ +

Apply ICAP_COLORSHARPEN to color and grayscale +images:  0 indicates no sharpening. 1 is normal, 2 is more sharpening, and +a value of 3 applies a lot of sharpening.

+ +

 

+ +

 

+ +

Document Type

+ +

 

+ +

If supported by the scanner, Document type indicates the +type of content that is on the document. This is available for all outputs; +however, for some scanners the selection needs to be the same for the Front and +Back.

+ +

 

+ +

This is controlled using ICAP_DOCUMENTTYPE.

+ +

 

+ +

 

+ +

How to select the type:

+ +

------------------------------------------------------

+ +

If your documents contain a mix of text and business +graphics (e.g. charts, graphs, etc), then select: TWDT_TEXTWITHGRAPHICS.

+ +

 

+ +

If your documents contain only text, then select: +TWDT_TEXT.

+ +

 

+ +

If your documents contain mainly photographs, or you want +the color correction optimized for photographs, then select: TWDT_PHOTO.

+ +

 

+ +

If, supported by the scanner and, your documents contain a +mix of text and photographs, then select: TWDT_TEXTWITHPHOTO. If not supported, +then TWDT_PHOTO or TWDT_TEXTWITHGRAPHICS is suggested.

+ +

 

+ +

 

+ +

NOTE: refer to the Color Table section of this guide for +information on backward compatibility with color tables

+ +

 

+ +

 

+ +

Media Type

+ +

 

+ +

If supported by the scanner, Media type indicates the type +of paper being scanned. This is available for all outputs; however, for some scanners +the selection needs to be the same for the Front and Back.

+ +

 

+ +

This is controlled using ICAP_MEDIATYPE.

+ +

 

+ +

 

+ +

How to select the type:

+ +

------------------------------------------------------

+ +

If your documents are normal everyday paper (e.g. copier +paper, inkjet paper, etc), then select: TWMT_PLAINPAPER.

+ +

 

+ +

If your documents are lightweight or thin (e.g. rice paper, +‘tissue’ paper, etc), then select: TWMT_THINPAPER.

+ +

 

+ +

If your documents are glossy (e.g. photographic paper), +then select: TWMT_GLOSSYPAPER.

+ +

 

+ +

If your documents are magazine articles, then select: +TWMT_MAGAZINE. If not supported, then TWMT_GLOSSYPAPER or TWMT_PLAINPAPER is +suggested.

+ +

 

+ +

If your documents appear to be normal everyday paper but +are thick (e.g. card stock), then select: TWMT_CARDSTOCK.

+ +

 

+ +

NOTE: unless otherwise specified, if the desired type is +not supported by the scanner, then select TWMT_PLAINPAPER.

+ +

 

+ +

 

+ +

NOTE: refer to the Color Table section of this guide for +information on backward compatibility with color tables

+ +

 

+ +

 

+ +

Color Tables

+ +

 

+ +

For scanners than now support Document Type +(ICAP_DOCUMENTTYPE) and Media Type (ICAP_MEDIATYPE), Color Tables is only +supported for backwards compatibility. That means selecting ICAP_COLORTABLE +will still work, however it is highly recommend that code be setup to handle +Document and Media Type.

+ +

 

+ +

For reference, the mapping between Color Tables and +Document/Media Types is as follows:

+ +

--------------------------------------------------------------------------------------------

+ +

‘Mixed’ and ‘Text with Pictures’: TWDT_TEXTWITHGRAPHICS / +TWMT_PLAINPAPER.

+ +

 

+ +

‘Photo’ and ‘Pictures’: TWDT_PHOTO / TWMT_GLOSSY.

+ +

 

+ +

‘Text’: TWDT_TEXT / TWMT_PLAINPAPER

+ +

 

+ +

 

+ +

Electronic +Color Drop-Out (ECDO):

+ +

 

+ +

There are adjustments for Bitonal/Grayscale +outputs. These adjustments allow users to select the ECDO color of their +scanned documents.

+ +

 

+ +

The applications should only try to set the TWCD_FILE +values.  The DAT_ECDO operation for a way to map the display strings to +the various ICAP_ECDO values.

+ +

 

+ +

ICAP_ECDOTREATASCOLOR +allows you to indicate that a color other than black or dark blue ink was used +for the data entered on the form. This not available on all scanner models or +when ECDO is set to (none).

+ +

 

+ +

NOTE: refer to the ICAP_FILTERENUM +section of this guide for information on backward compatibility with ECDO

+ +

 

+ +

 

+ +

Orthogonal Rotation:
+
+This will rotate an image in 90 degree increments. The rotation occurs after +the image has been cropped and/or deskewed.
+
+This is set using ICAP_ROTATION to indicate the number of degrees.
+
+Some scanners support Automatic orthogonal rotation. When set, the driver will +automatically determine the degrees of rotation based on the content of the +image. This is turned on by setting ICAP_AUTOMATICROTATE to true.
+
+ICAP_ORTHOGONALROTATE is a custom capability. It’s a combination of +ICAP_AUTOMATICROTATE and ICAP_ROTATION plus the TWOROT_AUTOMATIC_90 (or 180, +270). When ICAP_ORTHOGONALROTATE sets to TWOROT_AUTOMATIC_90 the driver uses +auto-orient algorithm automatically determine orthogonal rotation. However, if +the orientation cannot be determined, the image will be rotated 90 degrees.
+
+For your reference, the following table shows the mapping between +ICAP_ORTHOGONALROTATE and ICAP_AUTOMATICROTATE and ICAP_ROTATION.

+ +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

ICAP_ORTHOGONALROTATE

+
+

ICAP_AUTOMATICROTATE

+
+

ICAP_ROTATION

+
+

TWOROT_NONE

+
+

False

+
+

0

+
+

TWOROT_90

+
+

False

+
+

90

+
+

TWOROT_180

+
+

False

+
+

180

+
+

TWOROT_270

+
+

False

+
+

270

+
+

TWOROT_AUTOMATIC

+
+

True

+
+

0

+
+

TWOROT_AUTOMATIC_90

+
+

True

+
+

0

+
+

TWOROT_AUTOMATIC_180

+
+

True

+
+

0

+
+

TWOROT_AUTOMATIC_270

+
+

True

+
+

0

+
+ +

 
+
+Automatic Rotation:
+
+If Automatic orthogonal rotation is supported (see Orthogonal Rotation) then +the TWAIN feature Automatic Rotate is also supported (ICAP_AUTOMATICROTATE).
+
+If ICAP_AUTOMATICROTATE is set to true, then ICAP_ROTATION is set to 0
+
+ICAP_AUTOMATICROTATE will automatically be updated anytime ICAP_ROTATION is +changed

+ +

 

+ +

Multifeed UDDS Sensors
+
+The TWAIN driver provides the ability to detect a multifeed +condition by setting the CAP_ULTRASONICSENSITIVITY to TWUS_LOW, TWUS_MEDIUM or +TWUS_HIGH.
+
+When CAP_ULTRASONICSENSITIVITY is not TWUSS_DISABLED, if supported, each sensor +(CAP_ULTRASONICSENSOR*) can be individually turned on (TWUO_ENABLED) or off +(TWUO_DISABLED). For scanners that support the “Ignore” feature, +TWUO_IGNOREZONE can also be selected.
+NOTE: at least one sensor must remain on.
+
+When TWUO_IGNOREZONE is selected, the height of the area to be ignored is +controlled by CAP_ULTRASONICSENSORZONEHEIGHT. This setting will apply to all +sensors set to TWUO_IGNOREZONE.

+ +

 

+ +

Multifeed Response:

+ +

 

+ +

The Multifeed Response is used to +indicate what action to take when a multifeed is +detected by the scanner. This value is only available when multifeed +detection is turned on (i.e. CAP_ULTRASONICSENSITIVITY is not set to +TWUSS_DISABLED, or CAP_PAGESIZELIMIT is not zero).

+ +

 

+ +

Going forward CAP_MULTIFEEDRESPONSE should be used instead +of the values: CAP_DOUBLEFEEDSTOP and CAP_DOUBLEFEEDENDJOB. These values don’t +allow access to all the possible multifeed responses, +but are left in for backwards compatibility. All three values will +automatically be updated, to stay in sync, when any of them are changed.

+ +

 

+ +

For your reference, the following +table shows the mapping between CAP_MULTIFEEDRESPONSE and CAP_DOUBLEFEEDSTOP and CAP_DOUBLEFEEDENDJOB.

+ +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

CAP_DOUBLEFEEDSTOP

+
+

CAP_DOUBLEFEEDENDJOB

+
+

CAP_MULTIFEEDRESPONSE

+
+

True

+
+

True

+
+

TWMR_ENDOFJOB

+
+

True

+
+

True

+
+

TWMR_ENDOFJOBLEAVEPAPER

+
+

True

+
+

False

+
+

TWMR_STOPFEEDER

+
+

False

+
+

False

+
+

TWMR_CONTINUE

+
+ +

 

+ +

 

+ +

Image Edge Fill:

+ +

 

+ +

This feature fills the edges of the final electronic image +by covering the area with the specified color. Use ICAP_IMAGEEDGEFILL to +specify the color to fill with.
+
+If scanner supported TWIE_AUTOMATIC and TWIE_AUTOMATICWITHTEAR the edge of an +image is automatically filled in with the same color space as the image.

+ +

 

+ +

When TWIE_AUTOMATIC or TWIE_AUTOMATICWITHTEAR is selected +the ICAP_CROPPINGMODE is automatically changed to TWCR_AUTOMATICBORDERDETECTION +and the ICAP_AUTOMATICDESKEW is also changed to TRUE.

+ +

 

+ +

If the current value of ICAP_IMAGEEDGEFILL is TWIE_AUTOMATIC +or TWIE_AUTOMATICWITHTEAR and ICAP_CROPPINGMODE is changed to not +TWCR_AUTOMATICBORDERDETECTION or ICAP_AUTOMATICDESKEW is changed to FALSE then +ICAP_IMAGEEDGEFILL is automatically changed to TWIE_NONE.
+
+For the TWIE_WHITE and TWIE_BLACK, use ICAP_IMAGEEDGELEFT, ICAP_IMAGEEDGERIGHT, +ICAP_IMAGEEDGETOP and ICAP_IMAGEEDGEBOTTOM to specify the amount of fill for +each edge.
+
+If you want all sides to be forced to have the same amount of fill, then set +ICAP_IMAGEEDGEFILLALLSIDES to True. The driver uses the value for the top edge +(ICAP_IMAGEEDGETOP) as the size of the fill for the other three edges. In +addition, the left (ICAP_ IMAGEEDGELEFT), right (ICAP_ IMAGEEDGERIGHT), and +bottom (ICAP_ IMAGEEDGEBOTTOM) edge will have read-only access since their +values are automatically set to match the top edge.

+ +

 

+ +

Sides Different:

+ +

 

+ +

The purpose of Sides Different allows the user to determine +if Front and Rear values need to be the same or not.

+ +

 

+ +

When CAP_SIDESDIFFERENT is changed to False (i.e. +transitioned from True to False), the driver will make the sides the same by +copying all the Front camera settings to the Rear camera. While CAP_SIDESDIFFERENT +is False, any value that is set on the current camera (e.g. Front) will +automatically be set on the opposite camera (e.g. Rear).

+ +

 

+ +

When CAP_SIDESDIFFERENT is set to True, the driver would +then allow different values for the Front and Rear camera. Realize that when +CAP_SIDESDIFFERENT has a value of True, the values for Front and Rear may not +actually be different. This would be the case when Sides Different is first set +to True (i.e. transitioned from False to True), and no other values have been +changed.

+ +

 

+ +

 

+ +

Device +Events:

+ +

 

+ +

Applications can register for device events by issuing a +CAP_DEVICEEVENT for events the driver wants to receive. For a list of supported +events for each scanner model, refer to kdscust.h.

+ +

 

+ +

Applications are notified of device events via DG_CONTROL +/ DAT_NULL / MSG_DEVICEEVENT.  Upon receiving a MSG_DEVICEEVENT, the +application must immediately issue a DG_CONTROL / MSG_DEVICEEVENT / MSG_GET to +obtain the event information.

+ +

 

+ +

TWDE_LAMPWARMUP

+ +

For version 9.3 drivers and up, the application +can ask the driver to send this custom CAP_DEVICEEVENT if the lamps need to warmup prior to scanning. This event will be issued after a +MSG_ENABLEDS if the lamps are not warmed up. The number of seconds before the +lamps are ready will be in the TimeBeforeFirstCapture +field of the TW_DEVICEVENT structure.

+ +

 

+ +

NOTE: The number of seconds may be longer than +what it actually take. This could happen because an error occurred (e.g. +opening cover, cancelling) or for models that do not have an accurate warmup value.  Because of this, if your application is +displaying a “please wait” message for the user, the message needs to be closed +when MSG_XFERREADY is received.

+ +

 

+ +

 

+ +

Blank Image Deletion:

+ +

 

+ +

This +feature allows the user to instruct the driver to remove images that are +considered blank. The driver can determine if an image is blank based on the +content in the image or the final image size after any compression. The driver +determines if it is blank on a per image basis. For example, if a Color and +Black and White images are being created on the Front, it is possible that +Front Color image will not be considered blank, but the Black and White image +will be considered blank.

+ +

 

+ +

Blank image +deletion, for a camera, can be turned on by setting CAP_BLANKPAGEMODE to +TWBM_CONTENT (content based) or TWBM_COMPSIZE (final image size). It can be +turned off by setting CAP_BLANKPAGEMODE to TWBM_NONE. However, blank page +detection based on content is not available for all scanners.

+ +

 

+ +

When +TWBM_CONTENT is selected, CAP_BLANKPAGECONTENT becomes available.  +CAP_BLANKPAGECONTENT is used to set the content percentage.  If the image +content is less or equal to the percent specified, the image will be deleted.

+ +

 

+ +

When +TWBM_COMPSIZE is selected, CAP_BLANKPAGECOMPSIZEBW (Black and White image), +CAP_BLANKPAGECOMPSIZEGRAY (Grayscale image) and CAP_BLANKPAGECOMPSIZERGB (Color +image) are use to set the image size. If the final image size is less that the +corresponding value, the image is deleted. For backward compatibility, the +value CAP_BLANKPAGEMODE will be changed when any CAP_BLANKPAGECOMPSIZExxx +is changed. If any value becomes non-zero, CAP_BLANKPAGEMODE will be set to +TWBM_COMPSIZE. If all three values become zero, CAP_BLANKPAGEMODE well be set +to TWBM_NONE.

+ +

 

+ +

 

+ +

Getting Logs +Programmatically:

+ +

 

+ +

This +feature allows the user to retrieve logs. There are text based logs, XML +based logs and EKLOG package files. A log is +retrieved by issuing a DG_CONTROL/DAT_LOG/MSG_GET with a properly filled in +TW_LOG structure. Fill in a TW_LOG structure with the desired log (LogType), the desired device (DeviceType), +and the full path and name of the file (Filename) to store the log data into.

+ +

 

+ +

For all +scanners, set DeviceType to TWDV_ADF to get the base +scanners information. For those scanners that support the flatbed as an +accessory (e.g. i1200, i1300, i1400), you will need to make a second call, with +DeviceType set to TWDV_FLATBED, to get the flatbed’s +information. This is necessary because the flatbed is a separate device.

+ +

 

+ +

DAT_LOG +will return TWRC_FAILURE/TWCC_OPERATIONERROR if a request is made for a log +that is not supported by the scanner (e.g. not all scanners have an operator +log).

+ +

 

+ +

DAT_LOG +will return TWRC_FAILURE/TWCC_BADVALUE if the DeviceType +is TWDV_FLATBED and there is no separate flatbed scanner (e.g. i1000A4 & +i1000A3) attached. Since this is the only case when this error code is +returned, applications could make use of this by always issuing the second +DAT_LOG call and let this be the way to know there is no separate flatbed +scanner attached.

+ +

 

+ +

The +text based logs are ones that can be easily viewed in something like Notepad, +each log entry will be on its own line. These logs contain the same information +as is shown on the driver UI on the Log tab. The language for the translated +text will be based on the current language selected for the driver. The +format of each log entry is not guaranteed, so you should never parse the +entries to get information.

+ +

 

+ +

The XML +based logs are designed to be flexible across scanners and to allow for future +expansion. The following notes apply to the XML based logs:

+ +
    +
  1. Not all fields may be returned for each scanner. For + example, rear lamp-on hours would not be returned for a simplex scanner; + patch counts would not be returned on a scanner that does not support + patch reading; and versions will only be returned for the items that the + scanner actually has. Therefore, it is the responsibility of the + application to handle tags not being there.
  2. +
  3. The order of the tags is not guaranteed. Therefore it + is the responsibility of the application to parse the entire XML.
  4. +
  5. The character format for the entire XML is UTF-8
  6. +
  7. The + spacing shown below is for clarity; it may or may not be as shown. It is + the responsibility of the application to handle variable spacing.
  8. +
+ +

 

+ +

The +possible logs (LogType) are:

+ +
    +
  1. TWGL_GENERAL: this returns the text based log called + General on the driver UI. This log is not common among scanner families.
  2. +
  3. TWGL_OPERATOR: this returns the text based log called + Operator on the driver UI. This log is not common among scanner families.
  4. +
  5. TWGL_GENERAL_XML: this returns a XML based log that + contains information typically found in the General log: model, serial + number, versions, meters, etc.
  6. +
  7. TWGL_EKLOG: returns an EKLOG package file for Service + (the same kind of file that can be generated from the TWAIN User + Interface); when using this type be sure to offer a description of the log + (why it’s being sent), and set SaveImages to + TRUE if delivering device or application images with the package.  + This is not a viewable log.
  8. +
+ +

 

+ +

The XML +format of the TWGL_GENERAL_XML log is as follows. Included are examples of what +the tag values could be. The text to the right of the tags is a description of +what the tag is (the numbers in parenthesis refer to the tag notes below. The +descriptions will not appear in the log file:

+ +

<tw_log>

+ +

    <cdname> +KODAK i1210/i1220 Scanner</cdname>                +Family name from CD

+ +

    <modelname>i1220</modelname>                                            +name of scanner model

+ +

    +<versioncd>1.25</versioncd>                                                    +CD version

+ +

    +<versiontwain>9.64</versiontwain>                                           +TWAIN driver version

+ +

    +<versionui>3.23</versionui>                                                      +TWAIN UI version

+ +

    +<flatbed>false</flatbed>                                                            +flatbed attached (1)

+ +

    +<printer>false</printer>                                                             +printer accessory available (1)

+ +

    +<background>black</background>                                           +front camera’s background color (2)

+ +

    +<backgroundrear>black</backgroundrear>                               +rear camera’s background color (2)

+ +

    <connection>USBSCAN +2.0</connection>                               +interface scanner is connected to (3)

+ +

    +<serialnumber>1234567890</serialnumber>                              +scanner’s serial number

+ +

    +<versionfirmware>1.43</versionfirmware>                                 +scanner firmware version

+ +

    +<versionhippo>4.5.1</versionhippo>                                         +image processing version

+ +

    +<versiondriver>2.3</versiondriver>                                            +driver.dll version

+ +

    +<versiondevice>2.10</versiondevice>                                        +device.dll version

+ +

    <versiondevicemanager>1.1</versiondevicemanager>                +devicemanager.dll version

+ +

    <meterpower>104</meterpower>                                             +time scanner has been on (4)

+ +

    +<metertransport>99</metertransport>                                        +time transport has been on (4)

+ +

    +<meterlampfront>104</meterlampfront>                                    +time front lamps have been on (4)

+ +

    +<meterlamprear>100</meterlamprear>                                      +time rear lamps have been on (4)

+ +

    <meterfirstscan>2008/12/03 +15:58:44.245</meterfirstscan>       +time & date of first scan (5)

+ +

    +<meterpagecount>5</meterpagecount>                                      +number of pages scanned

+ +

    +<multifeedcount>0</multifeedcount>                                          +# multifeeds seen (6)

+ +

    <patchcountfront>0</patchcountfront>                                       +# patches seen on the front (6)

+ +

    +<patchcountrear>0</patchcountrear>                                         +# patches seen on the rear (6)

+ +

</tw_log>

+ +

 

+ +

Tag Notes:

+ +
    +
  1. The values for this tag are: true and false. If this + tag is not present, then assume the value is false.
  2. +
  3. The values for this tag are: black, white and + switchable. If this tag is not present, then assume the background is + black.
  4. +
  5. Typical values will be: USBSCAN 2.0, USBSCAN 1.1, and + SCSISCAN (for 1394 devices).
  6. +
  7. This tag will contain the number of hours in tenths. + For example, a value of 104 equates to 10.4 hours.
  8. +
  9. This tag will contain a zero-filled date and time with + the format: YYYY/MM/DD[space]HH:MM:SS.mmm
  10. +
  11. This count is based on what occurred during the + previous scan session. This value is reset to zero at the start of every + scan session.
  12. +
+ +

 

+ +

 

+ +

Combine/Merge Front and +Back Images:

+ +

 

+ +

This feature +allows the user to instruct the driver to combine the front and back images +from a document into a single image. This feature is designed +for use with Duplex scanning from the document feeder, where there is +one image per side and the front and back camera settings are the same. For +example: CAP_DUPLEXENABLED set to True; Sides Different (CAP_SIDESDIFFERENT) is +False; one camera per side has been enabled (i.e. just Color, or just +Grayscale, or just Black and White).

+ +

 

+ +

This feature +is only available for duplex scanner models. Even if this is turned on, the +images will not be combined if more than one camera per side is enabled or the +flatbed is scanned.

+ +

 

+ +

When this +feature is on, the application will receive one image that contains both the +front and the back of the page; instead of one image for the front and another +image for the rear. If the final image has the original images one on top of +the other (e.g. front on top of back), then the width of the final image will +be based on the wider of the two original images. If the final image has the +original images one to the left of the other (e.g. front to the left of the +back), then the height of the final image will be based on the taller of the +two original images. Any area that needs to be filled in (i.e. any padding of +the narrower or shorter image) will be based on the color of the camera’s +background. For example, if the camera’s background is black, then the image +will be padded with black.

+ +

 

+ +

This feature +can be turned on by setting CAP_IMAGEMERGE to a value other than TWIM_NONE. The +valid choices are: TWIM_FRONTONTOP (front is on top of the back), TWIM_FRONTONBOTTOM +(back is on top of front), TWIM_FRONTONLEFT (front is to the left of the back), +and TWIM_FRONTONRIGHT (back is to the left of the front).

+ +

 

+ +

 

+ +

Feeder Mode

+ +

 

+ +

This allows +you to select how the scanner transports documents through the scanner. This affects +how the documents are fed into the scanner, how fast they move through the +scanner, and how they are placed in the output tray.

+ +

 

+ +

The available +enumerations for this capability, ICAP_FEEDERMODE, are different based on +scanner and defined as follows:

+ +

·            +TWFM_NONE: No additional handling is performed. Best used when all documents +are similar in size.

+ +

·            +TWFM_STACKINGIMPROVED: Aids in controlling how the documents are +stacked/ordered in the output tray for mixed document sets. This should work +for the majority of mixed sets.

+ +

·            +TWFM_STACKINGBEST: When your document set contains a great variability in size, +this option provides the best control of how the documents are stacked/ordered +within the output tray.

+ +

·            +TWFM_SPECIAL: For irregularly shaped documents (e.g., pages with coupons +removed or documents with large holes or cutouts in them).

+ +

·            +TWFM_FRAGILE: For documents that need extra care as they are transported +through the scanner and placed in the output tray.

+ +

·            +TWFM_THICK: For thick documents.

+ +

  

+ +

 

+ +

Controlled Dual Stacking +Accessory

+ +

 

+ +

If you have +the Controlled Dual Stacking Accessory installed, then you can separate +documents into the two stacks of the Dual Stacking Accessory output tray. +Separation of documents will be possible via any combination of document +length, document content (toggle patch), and multifeed detection.

+ +

 

+ +

The first step +is to turn on the feature by setting the following CAP:

+ +

·            +CAP_DUALSTACKINGENABLED                  +- Set to TRUE to enable the Controlled Dual Stacking Accessory

+ +

 

+ +

Next, +determine which stack of the output tray to place detected documents into by +setting the following CAP.

+ +

·            +CAP_DUALSTACKINGSTACK                        +- If CAP_DUALSTACKINGSTACK is set to TWDSS_STACK1, +then documents that match any of the defined detection settings will be +separated from the document set and placed in stack 1. All other documents will +be placed in stack 2.

+ +

- If CAP_DUALSTACKINGSTACK +is set to TWDSS_STACK2, then documents +that match any of the defined detection settings will be separated from the +document set and placed in stack 2. All other documents will be placed in stack +1.

+ +

 

+ +

Next, define +the document detection criteria. Separation of documents will be possible via +any combination of document length, document content (toggle patch), and multifeed detection.

+ +

 

+ +

If you would +like to select which documents to separate from the document set based on the +document's length, then you would set the following CAPs:

+ +

·            +CAP_DUALSTACKINGLENGTHMODE         - Set to TWDSLM_LESSTHAN, +TWDSLM_GREATERTHAN, or TWDSLM_BETWEEN

+ +

·            +CAP_DUALSTACKINGLENGTH1                   +- If CAP_DUALSTACKINGLENGTHMODE is set to TWDSLM_LESSTHAN, then any +documents shorter than this length will be separated and placed in the +selected  CAP_DUALSTACKINGSTACK.

+ +

- If CAP_DUALSTACKINGLENGTHMODE is set to +TWDSLM_GREATERTHAN, then any documents longer than this length will be +separated and placed in the selected CAP_DUALSTACKINGSTACK.

+ +

- If CAP_DUALSTACKINGLENGTHMODE is set to TWDSLM_BETWEEN, +then any documents whose length falls between  +CAP_DUALSTACKINGLENGTH1 and CAP_DUALSTACKINGLENGTH2 will be separated +and placed in the selected CAP_DUALSTACKINGSTACK.

+ +

·            +CAP_DUALSTACKINGLENGTH2                   +- If CAP_DUALSTACKINGLENGTHMODE is "between", then any +documents whose length falls between  +CAP_DUALSTACKINGLENGTH1 and CAP_DUALSTACKINGLENGTH2 will be separated +and placed in the selected CAP_DUALSTACKINGSTACK.

+ +

 

+ +

If you would like +to select which patch sheets, if any, to separate from the document set and +place in the selected stack, then you would set the following CAPs:

+ +

·            +CAP_DUALSTACKINGPATCHTRANSFER   - Set to +TRUE will place Patch Type Transfer sheets in the selected +CAP_DUALSTACKINGSTACK.

+ +

·            +CAP_DUALSTACKINGPATCHTYPE1            - Set to TRUE will place Patch Type 1 sheets +in the selected CAP_DUALSTACKINGSTACK.

+ +

·            +CAP_DUALSTACKINGPATCHTYPE2            - +Set to TRUE will place Patch Type 2 sheets in the selected +CAP_DUALSTACKINGSTACK.

+ +

·            +CAP_DUALSTACKINGPATCHTYPE3            - Set +to TRUE will place Patch Type 3 sheets in the selected CAP_DUALSTACKINGSTACK.

+ +

·            +CAP_DUALSTACKINGPATCHTYPE4            - +Set to TRUE will place Patch Type 4 sheets in the selected +CAP_DUALSTACKINGSTACK.

+ +

·            +CAP_DUALSTACKINGPATCHTYPE6            - +Set to TRUE will place Patch Type 6 sheets in the selected +CAP_DUALSTACKINGSTACK.

+ +

NOTE: You can +select any combination of the above Patch Types.

+ +

 

+ +

If you would +like to separate all documents that are determined to have been multifed, then you would set the following CAPs:

+ +

·            +CAP_DUALSTACKINGMULTIFEED              - +Set to TRUE will place documents that are determined to have been multifed in the selected CAP_DUALSTACKINGSTACK

+ +

 

+ +

 

+ +

Background

+ +

 

+ +

This will +allow the user to select the color of the imaging background. This can be set +differently per side.. The imaging background is what the scanner will see +where there is no paper.

+ +

 

+ +

Use +CAP_BACKGROUND to set the background color to white (i.e. TWBK_WHITE) or Black +(i.e.TWBK_BLACK),

+ +

 

+ +

Examples of +when the white background is useful are:

+ +

·            +Scanning non-rectangular documents and, in the final image, you want the area +outside the document to be White instead of Black.

+ +

·            +Scanning lightweight or thin paper, with printing on one side, and you do not +want the black background to bleed through the document and appear in the final +image.

+ +

 

+ +

 

+ +

Physical Height Adjust

+ +

 

+ +

For scanners that support this setting, it is provided as a +way to optimize throughput. It limits the maximum document length that the +scanner can scan. So while the scanner is capable of scanning longer documents, +it will not process any documents that are longer then this setting. Setting +this to larger lengths may reduce the scanner’s throughput. For example, the +scanner may be able to scan up to an 80 inch long document (i.e. the range +maximum would be 80 inches), but if the default for this setting is 17 inches +then the scanner will stop if something longer than 17 inches is scanned. To +scan something longer than the default, this capability will need to be +modified.

+ +

 

+ +

The range for this setting is determined by the scanner; +therefore it should be read when connecting to the scanner. An example range is +2.5” to 3 meters.

+ +

 

+ +

When this +capability, ICAP_PHYSICALHEIGHTADJUST, is modified the maximum paper size (i.e. +ICAP_PHYSICALHEIGHT) will be impacted as well as any settings based on that +(e.g. ICAP_SUPPORTEDSIZES, ICAP_FRAMES, CAP_PRINTERPOSITION, +CAP_PAGESIZELIMIT). Therefore, it is recommended to re-read those values as +appropriate.

+ +

 

+ +

NOTE: Some +combinations of ICAP_PIXELTYPE and ICAP_XRESOLUTION may not be supported by the +scanner when this capability is set to larger values. Instead of preventing +these values from being set, and to allow for greater flexibility with +applications, the scanner will not generate an error until it scans a document +whose length is not supported.

+ +

 

+ +

 

+ +

OCP Buttons:
+
+This feature allows the application to set the displayed text on the OCP for +each button. The driver may not remember this information. So we recommend that +the application should send the text after successfully MSG_OPENDS. The maximum +number of buttons that are allowed to be configured is 9.

+ +


+To configure the number of buttons for the user to scroll through, the App must +send an array of TW_OCPBUTTONS structures which has the number of the buttons +defined plus an extra one that has Text field blank. For example, if the user +wants to setup the text for 3 buttons then define the array of 4 TW_OCPBUTTONS +structures. Set the Text for the first 3 items and set the Text to blank for +the 4th.

+ +


+For the scanners that don’t have the ability to display the text, the +application still can configure the number of buttons for the user to scroll +through.

+ +


+The order of the buttons displayed on the OCP is the same order of the buttons +defined in the array.

+ +


+The Text is in the current language. The Ansi code +page which is based on the CAP_LANGUAGE is used for the conversion.

+ +

 

+ +

NumDataFields indicates how +many fields, after it and before Reserved, are filled in by the application.

+ +

 

+ +

PaperSource is used to +indicate which Paper Source the button will scan from. Set it to the desired +TWPU_* value. Refer to CAP_PAPERSOURCE for a list of TWPU_* values. For +example, if setting a button to "Color PDF" and the paper source is +"Document Feeder", then set:

+ +

Text = "Color PDF"

+ +

NumDataFields = 1

+ +

PaperSource = TWPU_ADF

+ +

NOTE: Not all scanners make use of PaperSource

+ +

 

+ +

The Reserved +field must be initialized to zero.

+ +

 

+ +

Hole Fill:

+ +

 

+ +

The +Hole Fill feature is designed to remove “punch holes” in the original document +from the resultant image. The output image is the same as the input image with +the identified “holes” in the document image filled in with background.  +In the Bitonal case the background is white.

+ +

 

+ +

This feature can be turned on by +setting ICAP_HOLEFILLENABLED to TRUE.

+ +

 

+ +

 

+ +

Streak Filter:

+ +

 

+ +

The Streak Filter Fill feature is +designed to remove “streaks” in the original document from the resultant image. +The amount of "aggressiveness" that the Streak Filter algorithm +applies can be adjusted as needed.

+ +

 

+ +

This feature can be turned on by setting ICAP_STREAKREMOVALENABLED +to TRUE.

+ +

 

+ +

The amount of aggressiveness can be adjusted by setting +ICAP_STREAKREMOVALAGGRESSIVENESS to a value ranging from -2 to 2 in steps of 1; +the default is 0. This value does not apply if ICAP_STREAKREMOVALENABLED is +FALSE.

+ +

 

+ +

 

+ +

Cropping Mode:

+ +

 

+ +

This feature allows the user to specify how the scanner will +detect document as it is being fed through the scanner.

+ +

 

+ +

The available +enumerations for this capability, ICAP_CROPPINGMODE, are different based on +scanner and defined as follows:

+ +

·            +TWCR_AUTOMATICBORDERDETECTION: The scanner will automatically find each +document (regardless of size).

+ +

·            +TWCR_TRANSPORT: The scanner will return an image based on the area you specify in +the ICAP_FRAMES or ICAP_FRAMESANGLE. It is suggested that you only use this +option for scan jobs that contain same-sized documents.

+ +

·            +TWCR_DOCUMENT: The scanner will return an image based on the area you specify +in the ICAP_FRAMES or ICAP_FRAMESANGLE which is relative to entire document.

+ +

·            +TWCR_AGGRESSIVEAUTOCROP: The scanner will automatically find each document and +will straighten any document that may have been fed crooked.  It’s also +eliminating any residual border. Residual border can be caused by variations in +a document edge; for example, when a document is not a perfect rectangle and/or +was fed crooked.

+ +

·            +TWCR_CONTINUOUS: The scanner will split the document into separate images based +on the area you specify with the ICAP_FRAMES or ICAP_FRAMESANGLE. It is +suggested that you select an area that covers the entire width of the document +and a height around 11 inches (297 mm).

+ +

·            +TWCR_PHOTO: The scanner will locate the photograph on the document and return +an image that contains just the photograph. If the scanner finds more than one +photograph on a document, one image is still returned which contains all +photographs.

+ +

·            +TWCR_PHOTOINROI: The scanner will locate the photograph on the area you specify +in the ICAP_FRAMES or ICAP_FRAMESANGLE and return an image that contains just +the photograph. If the scanner finds more than one photograph on a specify +area, one image is still returned which contains all photographs.

+ +

 

+ +

When +TWIE_AUTOMATIC or TWIE_AUTOMATICWITHTEAR is selected from ICAP_IMAGEEDGEFILL +the ICAP_CROPPINGMODE is automatically changed to TWCR_AUTOMATICBORDERDETECTION +and the ICAP_AUTOMATICDESKEW is also changed to TRUE.

+ +

 

+ +

When the ICAP_CROPPINGMODE value is changed other +capabilities are also changed. The following table shows the mapping between +ICAP_CROPPINGMODE and ICAP_AUTOMATICDESKEW and ICAP_IMAGEEDGEFILL

+ +

 

+ +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

ICAP_CROPPINGMODE

+
+

ICAP_AUTOMATICDESKEW

+
+

ICAP_IMAGEEDGEFILL + (If current value is TWIE_AUTOMATIC or TWIE_AUTOMATICWITHTEAR)

+
+

TWCR_AUTOMATICBORDERDETECTION

+
+

TRUE

+
+

No change

+
+

TWCR_TRANSPORT

+
+

FALSE

+
+

TWIE_NONE

+
+

TWCR_DOCUMENT

+
+

TRUE

+
+

TWIE_NONE

+
+

TWCR_AGGRESSIVEAUTOCROP

+
+

TRUE

+
+

TWIE_NONE

+
+

TWCR_CONTINUOUS

+
+

FALSE

+
+

TWIE_NONE

+
+

TWCR_PHOTO

+
+

TRUE

+
+

TWIE_NONE

+
+

TWCR_PHOTOINROI

+
+

TRUE

+
+

TWIE_NONE

+
+ +

 

+ +

 

+ +

Foreground Boldness:

+ +

 

+ +

Use this option for documents or forms where you want the +foreground (e.g. text, lines, etc.) to be more prominent.

+ +

 

+ +

Foreground Boldness is only available for Color/Grayscale +output.

+ +

 

+ +

The available +enumerations for this capability, ICAP_FOREGROUNDBOLDNESSMODE are defined as +follows:

+ +

·            +TWFB_NONE: No Foreground Boldness is applied to the image.

+ +

             TWFB_AUTOMATICBASIC: All +foreground will be bolder.

+ +

             TWFB_AUTOMATIC: For advanced users +that want to further adjust the aggressiveness of the Foreground Boldness +algorithm.

+ +

 

+ +

The aggressiveness of the Foreground Boldness algorithm is +selected using ICAP_FOREGROUNDBOLDNESSAGGRESSIVENESS. The higher the value, the +more boldness is applied to the image foreground. This is available only when +ICAP_FOREGROUNDBOLDNESSMODE is set to TWFB_AUTOMATIC.

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/TWAIN_FileSystem.htm b/Spec/Kodak/TWAIN_FileSystem.htm new file mode 100644 index 0000000..1336dc5 --- /dev/null +++ b/Spec/Kodak/TWAIN_FileSystem.htm @@ -0,0 +1,254 @@ + + + + + +Here is some sample code for how to change cameras using the DG_CONTROL +/ DAT_FILESYSTEM operations + + + + + + + +
+ +

Here is some sample code +for how to change cameras using the DG_CONTROL / DAT_FILESYSTEM operations.

+ +

 

+ +

 

+ +

TW_FILESYSTEM fs;

+ +

TW_STR255 cameraname[3];

+ +

 

+ +

// For loop used to discover available cameras...

+ +

memset(cameraname,0,sizeof(cameraname));

+ +

for (rc = (*pDSM_Entry)

+ +

            (&AppId,&SourceId,

+ +

             DG_CONTROL,

+ +

             DAT_FILESYSTEM,

+ +

             MSG_GETFIRSTFILE,(TW_MEMREF)&fs);

+ +

     rc == TWRC_SUCCESS;

+ +

     rc = (*pDSM_Entry)

+ +

            (&AppId,&SourceId,

+ +

             DG_CONTROL,

+ +

             DAT_FILESYSTEM,

+ +

             MSG_GETNEXTFILE,(TW_MEMREF)&fs)) {

+ +

 

+ +

      // This is the combined front / rear camera...

+ +

      // In each case, just take the first one we find...

+ +

      if (fs.FileType == TWFY_CAMERA) {

+ +

            if (!cameraname[0][0]) +strcpy(cameraname[0],fs.OutputName);

+ +

      // This is the front camera...

+ +

      } else if (fs.FileType == TWFY_CAMERA_TOP) {

+ +

            if (!cameraname[1][0]) +strcpy(cameraname[1],fs.OutputName);

+ +

      // This is the rear camera...

+ +

      } else if (fs.FileType == TWFY_CAMERA_BOTTOM) {

+ +

            if (!cameraname[2][0]) +strcpy(cameraname[2],fs.OutputName);

+ +

      }

+ +

}

+ +

 

+ +

// Change to the front camera...

+ +

strcpy(fs.InputName,cameraname[1]);

+ +

rc = (*pDSM_Entry)

+ +

      (&AppId,&SourceId,

+ +

       DG_CONTROL,

+ +

       DAT_FILESYSTEM,

+ +

       MSG_CHANGEDIRECTORY,(TW_MEMREF)&fs);

+ +

// Set some front capabilities, like ICAP_CONTRAST

+ +

...

+ +

 

+ +

// Change to the rear camera...

+ +

strcpy(fs.InputName,cameraname[2]);

+ +

rc = (*pDSM_Entry)

+ +

      (&AppId,&SourceId,

+ +

       DG_CONTROL,

+ +

       DAT_FILESYSTEM,

+ +

       MSG_CHANGEDIRECTORY,(TW_MEMREF)&fs);

+ +

// Set some rear capabilities, like ICAP_CONTRAST

+ +

...

+ +

 

+ +

// Change back to the combined camera (have to do

+ +

// this before scanning starts, but can also do

+ +

// this to simultaneously change front and rear

+ +

// values).  Note that this is the default camera

+ +

// when the Source is first started...

+ +

strcpy(fs.InputName,cameraname[0]);

+ +

rc = (*pDSM_Entry)

+ +

      (&AppId,&SourceId,

+ +

       DG_CONTROL,

+ +

       DAT_FILESYSTEM,

+ +

       MSG_CHANGEDIRECTORY,(TW_MEMREF)&fs);

+ +

...

+ +
+ + + + diff --git a/Spec/Kodak/TWAIN_Internationalization.htm b/Spec/Kodak/TWAIN_Internationalization.htm new file mode 100644 index 0000000..b9fa73b --- /dev/null +++ b/Spec/Kodak/TWAIN_Internationalization.htm @@ -0,0 +1,1099 @@ + + + + + + + + +; Copyright (c) 1998-2004 Eastman Kodak Company, All Rights Reserved + + + + + + + + + + +
+ +

Kodak KDS TWAIN Driver

+ +

Internationalization

+ +

06-Jun-2012

+ +

 

+ +

 

+ +

Overview

+ +

TWAIN supports internationalization, making it possible for +an application to negotiate an awareness of the current language and country with +the driver.  This awareness is intended primarily for the driver’s GUI, +but it has the potential to influence any textual output.

+ +

 

+ +

As of this writing fourteen languages are supported: Chinese +Simplified, Chinese Traditional, Czechoslovakian, Dutch, English, French, German, +Italian, Japanese, Korean, Portuguese Brazilian, Russian, Spanish, and Turkish.  +In situations where an unsupported sublanguage seems like the only possible +match for a primary language, the primary language is selected (ex: French is +substituted for French Canadian).  If no match is possible the driver +defaults to English.

+ +

 

+ +

There are four ways to negotiate the language with the +driver.  This document describes each method.

+ +

 

+ +

 

+ +

 

+ +

TW_IDENTITY

+ +

This is a part of the TWAIN Specification; please refer to +it for more information.

+ +

 

+ +

When an application calls the DG_CONTROL / DAT_PARENT / +MSG_OPENDSM message in state 2, it has to send the pointer to a TW_IDENTITY +structure to the TWAIN Data Source Manager.  This structure describes the +application and includes a TW_IDENTITY.Language +field.  If the value of this field is TWLG_USERLOCALE, then the driver +attempts to match the desktop language of the user.  Any other value for +this field will result in the driver attempting to use that language.  For +instance, if the application sets the field to TWLG_FRENCH, then the driver +will load French regardless of the desktop locale.

+ +

 

+ +

In most cases a value of TWLG_USERLOCALE is preferred for +this field.

+ +

 

+ +

This technique works for all versions of the driver; it has +the lowest priority (which means it can be overridden by anything else).

+ +

 

+ +

 

+ +

 

+ +

CAP_LANGUAGE

+ +

This is a part of the TWAIN Specification; please refer to +it for more information.

+ +

 

+ +

The driver allows the language to be changed in state 4 +(programmatic negotiation).  This may be necessary if the application is +using a TWAIN toolkit.  Some toolkits don’t allow the TW_IDENTITY.Language +field to be selected, so the only way to change the language is as a part of +normal negotiation.

+ +

 

+ +

This technique works for all versions of the driver; it has the +highest priority (which means if you set it then you get it).

+ +

 

+ +

 

+ +

 

+ +

DefaultLanguage

+ +

This is a custom feature. It is available for 6+ versions of +the driver; it has the third highest priority.

+ +

 

+ +

In some instances the user may have no control of the application +or the toolkit, so a special CONST.INI setting has been provided to allow the +driver’s language to be changed.  Edit the CONST.INI file and add the +following line under the [dsIdentity] section.

+ +

 

+ +

DefaultLanguage=L_XX_YYY

+ +

 

+ +

Where L_XX_YYY is one of the following:

+ +

 

+ +

            +L_CH_CHN    - Chinese Simplified

+ +

            +L_CH_TWN   - Chinese Traditional

+ +

            +L_CS_CZE      - Czechoslovakian

+ +

            +L_DE_DEU     - German

+ +

            +L_EN_USA     - English

+ +

            +L_ES_ESP       - Spanish

+ +

            +L_FR_FRA      - French

+ +

            +L_IT_ITA        - Italian

+ +

            +L_JA_JPN       - Japanese (for drivers prior +to 11.x)

+ +

            +L_JP_JPN        - Japanese (for drivers +11.x+)

+ +

            +L_KO_KOR    - Korean

+ +

            +L_NL_NLD     - Dutch

+ +

            +L_PT_BRA      - Portuguese Brazilian

+ +

            +L_RU_RUS     - Russian

+ +

            +L_TR_TUR     - Turkish

+ +

            +

+ +

 

+ +

 

+ +

KDS_LANGUAGE

+ +

This is a custom feature.

+ +

 

+ +

Older versions of the driver allowed the language to be +selected from an environment variable.  This method is preserved for +backwards compatibility, but this is not the recommended way to negotiate the +language.  The value is numeric and is taken from the TWLG_* entries in +the TWAIN.H header file.

+ +

 

+ +

            +41        - Chinese Simplified

+ +

            +43        - Chinese Traditional

+ +

            +45        - Czechoslovakian

+ +

            +1          - Dutch

+ +

            +2          - English

+ +

            +5          - French

+ +

            +6          - German

+ +

            +8          - Italian

+ +

            +68        - Japanese

+ +

            +69        - Korean

+ +

            +76        - Portuguese Brazilian

+ +

            +78        - Russian

+ +

            +11        - Spanish

+ +

            +85        - Turkish

+ +

            +

+ +

This technique works for all versions of the driver except +5; it has the second highest priority.

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/TWAIN_ProgrammaticControl.htm b/Spec/Kodak/TWAIN_ProgrammaticControl.htm new file mode 100644 index 0000000..9115f5a --- /dev/null +++ b/Spec/Kodak/TWAIN_ProgrammaticControl.htm @@ -0,0 +1,11368 @@ + + + + + + + + + +Kodak KDS TWAIN Driver + + + + + + + + + + + + + +
+ +

Kodak KDS TWAIN Driver

+ +

TWAIN interface

+ +

21-January-2013

+ +

 

+ +

 

+ +

Contents

+ +

1.     DG_CONTROL.. 2

+ +

2.     DG_IMAGE.. 2

+ +

3.     DG_CUSTOM.. 2

+ +

4.     CAP_Capabilities. 5

+ +

5.     ICAP_Capabilities. 14

+ +

 

+ +

Capabilities and descriptions are color coded for clarity:

+ + + + + + + + + + + + + + +
+

GREEN

+
+

Full support

+
+

PURPLE

+
+

Kodak Custom

+
+

RED

+
+

Unsupported

+
+ +

 

+ +

Values are specified with units (in most cases +inches).  If changing ICAP_UNITS, the allowed values change accordingly.

+ +

 

+ +
+
+ +

1.       +DG_CONTROL

+ +

 

+ +

DAT_CAPABILITY                                 +Full support.

+ +

 

+ +

DAT_COLORTABLEMAP                      +Custom: All Models (except for i2000/i2900/i3000/i4000/i5000).

+ +

-  +This will allows an application to map the ICAP_COLORTABLE numeric values to +both the English and current language strings.

+ +

-  The value of +0xFFFF for ColorTableValue indicates the end of the +array.

+ +

-  +Only MSG_GET, MSG_GETCURRENT and MSG_GETDEFAULT are supported.

+ +

 

+ +

DAT_CUSTOMDSDATA                        +Full support.

+ +

-  +Data is Source specific, applications must not parse it.

+ +

 

+ +

DAT_DEVICEEVENT                              +Full support

+ +

 

+ +

DAT_DEVICEINFO                      +            +Custom: All Models

+ +

-  +This provides additional information about the device that may be useful with +some system message, such as WM_DEVICECHANGE.

+ +

-  The dwFields value indicates how many fields are supported by +the driver (the value doesn't include the dwFields, +itself).

+ +

-  +Only MSG_GET, MSG_GETCURRENT and MSG_GETDEFAULT are supported.

+ +

 

+ +

DAT_ECDO                      +                       +Custom: i900/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

-  +This will allows an application to map the ICAP_ECDO numeric values to both the +English and current language strings.

+ +

-  The value of +0xFFFF for EcdoValue indicates the end of the array.

+ +

-  +Only MSG_GET, MSG_GETCURRENT and MSG_GETDEFAULT are supported.

+ +

 

+ +

DAT_EVENT                                           +Full support.

+ +

 

+ +

DAT_FILESYSTEM                                +Supports 'camera' devices.

+ +

Default: /Camera_Bitonal_Both

+ +

-  +The following devices are supported, depending on the scanner model:

+ +

/Camera_Bitonal_Both

+ +

/Camera_Bitonal_Top

+ +

/Camera_Bitonal_Bottom

+ +

/Camera_Color_Both

+ +

/Camera_Color_Top

+ +

/Camera_Color_Bottom

+ +

-  +Image storage is not supported.

+ +

 

+ +

DAT_IDENTITY                                      +Full support.

+ +

  

+ +

DAT_LOG +                       +                      Custom: +i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

-  +Used by an application to collect log information from the scanner.

+ +

-  Refer to kdscust.h for details about how to use this call.

+ +

-  +Only MSG_GET is supported.

+ +

 

+ +

DAT_NULL                                             +Full support.

+ +

-  +MSG_CLOSEDSREQ is sent when the Source's Cancel button is pressed.

+ +

-  +MSG_CLOSEDKOK is sent when the Source's OK button is pressed.

+ +

-  +MSG_XFERREADY is sent after the first image is scanned.

+ +

-  +MSG_DEVICEEVENT is supported.

+ +

 

+ +

DAT_OCPBUTTONS                              +Custom: i2000/i2900/i3000

+ +

-  +This feature allows the application to set the displayed text on the OCP for +each button, as well as to indicate which Paper +Source the button will scan from.

+ +

-  +Only MSG_SET is supported.

+ +

 

+ +

DAT_PARENT                                         +Full support.

+ +

-  +This operation only communicates with the Source Manager.

+ +

 

+ +

DAT_PASSTHRU                                    +Unsupported

+ +

 

+ +

DAT_PENDINGXFERS                             +Full support.

+ +

MSG_STOPFEEDER +is a TWAIN 1.9 operation that may be issued in State 6.  Use it when you +want to stop the transport, but continue transferring any images that are in the +device's buffers.

+ +

 

+ +

DAT_PROFILES                                       +Custom: i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

-  +This allows an application to manage profiles.

+ +

-  +These messages are supported for DAT_PROFILES: MSG_GET, MSG_GETCURRENT, +MSG_GETDEFAULT, MSG_PROFILECREATE, MSG_PROFILEDELETE,

+ +

MSG_PROFILESAVE, +MSG_PROFILERENAME, MSG_PROFILERESTORE, MSG_PROFILEEXPORT, MSG_PROFILEIMPORT, +MSG_PROFILESET

+ +

 

+ +

DAT_SETUPFILEXFER                           +Full support.

+ +

-  +Supports TWFF_BMP, TWFF_TIFF.

+ +

-  +TWFF_JFIF is not supported on 3500/3510/3520/i810/i830.

+ +

-  +TWFF_BMP is not supported for the i600/i700/i800/i1800 Series when ForceAfterburner=1 in the CONST.INI file.

+ +

 

+ +

DAT_SETUPMEMXFER                          +Full support.

+ +

-  +The Source uses the MaxBufSize to pre-allocate a +scratch buffer, which for the 3000/4000 scanners must exceed the size of +the largest image that the application expects to ever scan.  The default +size is sufficient for this, and should not be changed without consulting +Eastman Kodak.

+ +

 

+ +

DAT_STATUS                                        +Full support.

+ +

-  In +some cases the status is returned by the Source Manager.

+ +

 

+ +

DAT_USERINTERFACE                          +Full support.

+ +

-  For +MSG_ENABLEDS the SCAN, STOP and CANCEL buttons are shown.

+ +

-  +For MSG_ENABLEDSUIONLY the OK and CANCEL buttons are shown.

+ +

ShowUI == FALSE is supported (no UI).

+ +

ModalUI == TRUE is supported, but works by issuing an EnableWindow(hParent,FALSE) on the +calling application.

+ +

-  +MSG_SETUPDS is a custom command that downloads the current settings to the +scanner, but does not initiate a scanning session.  The Source remains in +state 4.  This command has been added to allow application writers to use +more than one of the Gemini modes.  See also the ForceAcceptMode +variable in const.ini, which can be used to disable mode checking by the +Source.

+ +

-  +MSG_ENABLESCANNER is a custom command that starts a scanning session without +downloading any settings.

+ +

 

+ +

DAT_WINDOW                                        +Custom: i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

-  +This utility allows an application to add and remove windows.

+ +

-  A window is an +index to a set of cameras, such as front_bitonal, front_color.

+ +

-  +Only MSG_ADDWINDOW and MSG_DELETEWINDOW are supported.

+ +

 

+ +

DAT_XFERGROUP                                  +Full support.

+ +
+
+ +

 

+ +

2.       +DG_IMAGE

+ +

  

+ +

DAT_CIECOLOR                                    +Unsupported.

+ +

 

+ +

DAT_EXTIMAGEINFO                            +Full support.

+ +

-  +Please reference TWAIN_ExtImageInfo.htm for a complete +list.

+ +

MSG_GETSPECIAL +is a custom feature that allows this command to be issued in state 6, before +the image data is transferred, instead of state 7, after it has been +transferred.

+ +

 

+ +

DAT_GRAYRESPONSE                          +Unsupported.

+ +

 

+ +

DAT_IMAGEFILEXFER                           +Full support.

+ +

-  Supports scan error +condition codes (ex: TWCC_PAPERJAM).

+ +

 

+ +

DAT_IMAGEINFO                                   +Full support.

+ +

 

+ +

DAT_IMAGELAYOUT                            +Full support.

+ +

-  +Value is shared with ICAP_FRAMES.

+ +

-  +ICAP_SUPPORTEDSIZES will be set to TWSS_NONE if this operation is used with +MSG_SET.

+ +

-  +The image width must at a minimum be on a 16-bit boundary.  Color images +must have a length that falls on an 8-bit boundary.  An application can +make these calculations itself when the dimensions are in TWUN_PIXELS +units.  The Source makes any corrections to the settings (on the +application's behalf) just prior to downloading to the device.

+ +

-  +Because converting between ICAP_UNITS can result in loss of resolution, +applications are encouraged to use TWUN_PIXELS when getting information, to +guarantee that the dimensions of the image are accurately reported.

+ +

 

+ +

DAT_IMAGEMEMXFER                          +Full support.

+ +

-  +Applications should use the Preferred value from the DAT_SETUPMEMXFER operation +to set the minimum transfer buffer size.  Because of the high performance +of the scanners, memory transfers must move the entire image in one call to +guarantee best throughput.

+ +

-  Supports scan error +condition codes (ex: TWCC_PAPERJAM).

+ +

 

+ +

DAT_IMAGENATIVEXFER                     +Full support.

+ +

-  +Applications cannot use native mode transfers for anything other than +uncompressed data.

+ +

-  +Native transfers are less efficient than memory transfers, since the Source +must rotate the image around the x-axis to match the BITMAP format, and convert +RGB to BGR in the case of color data.

+ +

-  Supports scan error +condition codes (ex: TWCC_PAPERJAM).

+ +

 

+ +

DAT_JPEGCOMPRESSION                    +Full support.

+ +

-  +Supported for all models (except for 5000/7000/9000).

+ +

-  +TWPT_YUV is the only pixel type supported.

+ +

Chroma and Luma tables may be +replaced.

+ +

-  +Huffman tables are reported, but may not be changed.

+ +

 

+ +

DAT_PALETTE8                                     +Unsupported.

+ +

 

+ +

DAT_RGBRESPONSE                             +Unsupported.

+ +

 

+ +

 

+ +

 

+ +

3.       +DG_CUSTOM

+ +

 

+ +

DAT_AUTOCOLORLEARN                    +Custom: i600/i700/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

-  +This utility will determine the proper ‘Color Amount’ value to use with +the current ‘Color Threshold’ value, in order to save a representative stack of +color documents as either color or grayscale images.

+ +

-  +There is no associated TW_AUTOCOLORLEARN, applications should send NULL for the +data.

+ +

-  +Only MSG_SET and MSG_RESET are supported.

+ +

-  +This is only available when ICAP_AUTOCOLORCONTENT is set to Custom.

+ +

 

+ +

DAT_STATUSRAW                                +Custom: All Models

+ +

-  +This command may be issued at any time. It reports the raw data for the last +error status report by scanner.

+ +

 

+ +

4.       +CAP_ Capabilities

+ +

 

+ +

ACAP_AUDIOFILEFORMAT                  +Unsupported.

+ +

 

+ +

ACAP_XFERMECH                                 +Unsupported.

+ +

 

+ +

CAP_ALARMS                                       +Standard: i600/i700/i800/i1800/i5000

+ +

                                                                +Allowed: TWAL_PATCHCODE

+ +

                                                                +Default: Empty

+ +

 

+ +

CAP_ALARMVOLUME                          +Standard: i600/i700

+ +

                                                                +Allowed: 0 - 3

+ +

                                                                +Default: 2

+ +

 

+ +

CAP_AUTHOR                                        +Standard: All Models (except for i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: Any TW_STR128 string

+ +

                                                                +Default: Eastman Kodak Company

+ +

 

+ +

CAP_AUTOFEED                                    +Standard: All Models

+ +

                                                                +Allowed: TRUE

+ +

                                                                +Default: TRUE

+ +

-  +This capability is read-only.

+ +

 

+ +

CAP_AUTOMATICCAPTURE                +Unsupported.

+ +

 

+ +

CAP_AUTOMATICSENSEMEDIUM       Standard: i2000/i2900/i3000/i5000

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-   Automatically +chooses whether to acquire images from the ADF or from the Flatbed.

+ +

 

+ +

CAP_AUTOSCAN                                  +Standard: All Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

3000/4000 +supports TRUE for CAP_XFERCOUNT == -1 and FALSE for CAP_XFERCOUNT > 0.

+ +

5000/7000/9000 +only supports TRUE.

+ +

-  Other +offer full supports.

+ +

 

+ +

CAP_BACKGROUND                              +Custom: All Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: TWBK_BLACK, TWBK_WHITE

+ +

                                                                +Default: scanner dependent

+ +

-    Reports +what the scanner background was at the time the scanner was started. This +capability cannot detect a "hot" change.

+ +

-  +This is a read-only capability except for i4000/i5000. It allows the +user to select the color of the imaging background. This can be set differently +per side.

+ +

 

+ +

CAP_BACKGROUNDFRONT                  +Custom: i100/i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: TWBK_BLACK, TWBK_WHITE

+ +

                                                                +Default: scanner dependent

+ +

-    Reports +what the scanner front background was at the time the scanner was +started.  This capability cannot detect a "hot" change.

+ +

-  +This is a read-only capability.

+ +

 

+ +

CAP_BACKGROUNDREAR                    +Custom: i160/i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: TWBK_BLACK, TWBK_WHITE

+ +

                                                                +Default: scanner dependent

+ +

-    Reports +what the scanner rear  background was at the time the scanner was +started.  This capability cannot detect a "hot" change.

+ +

-  +This is a read-only capability.

+ +

 

+ +

CAP_BATCHCOUNT                              +Custom: i800/i1800

+ +

                                                                +Allowed: 0 – 32,767

+ +

                                                                +Default: 0 (disabled)

+ +

-  +Controls the number of batches to be processed before applying the batch end +function.

+ +

 

+ +

CAP_BATCHENDFUNCTION                  +Custom: i800/i1800

+ +

                                                                +Allowed: TWBE_NONE, TWBE_STOPFEEDER, TWBE_ENDOFJOB, TWBE_NEWBATCH

+ +

                                                                +Default: TWBE_NONE

+ +

-  +Action to be taken when the batch count is complete.

+ +

 

+ +

CAP_BATCHLEVEL                               +Custom: i800/i1800

+ +

                                                                +Allowed: TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3

+ +

                                                                +Default: TWPL_LEVEL1

+ +

-  +Level used to decrement the batch count.

+ +

 

+ +

CAP_BATCHSTARTFUNCTION            +Custom: i800/i1800

+ +

                                                                +Allowed: TWPL_NONE, TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3

+ +

                                                                +Default: TWPL_NONE

+ +

-  +Initial level for the batch.

+ +

 

+ +

CAP_BATTERYMINUTES                      +Unsupported.

+ +

 

+ +

CAP_BATTERYPERCENTAGE               +Unsupported.

+ +

 

+ +

CAP_BINARIZATION                             +Custom: 3590

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +For use with Multistream(tm), this field must be set +to TRUE to get the TWAIN driver to produce

+ +

   +a bitonal image from the color camera.  (see +CAP_CAMERAENABLE).

+ +

 

+ +

CAP_BLANKPAGE                                 +Custom: All Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: TWBP_IMAGE

+ +

                                                                +Default: TWBP_IMAGE

+ +

-  +Blank page detection.                                                 +

+ +

 

+ +

CAP_BLANKPAGEMODE                      +Custom: All Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: TWBM_NONE, TWBM_COMPSIZE, TWBM_CONTENT

+ +

                                                                +Default: TWBM_NONE

+ +

-  +Blank image deletion mode. Not all values are supported on all scanners.

+ +

 

+ +

CAP_BLANKPAGECOMPSIZEBW        +Custom: All Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: 0 - 1000 KB

+ +

                                                                +Default: 0

+ +

-  +Delete Bitonal image if the final size is less than specific +number of KB.

+ +

- Value needs to be in +1024 increments.

+ +

- The front and rear +values can be different expect for i30/i40/i55/i65.

+ +

- When set to a +non-zero value: CAP_BLANKPAGEMODE is automatically set to TWBM_COMPSIZE

+ +

  If set zero and +CAP_BLANKPAGECOMPSIZEBW and CAP_BLANKPAGECOMPSIZERGB are zero,

+ +

  then +CAP_BLANKPAGEMODE is automatically changed to TWBM_NONE.

+ +

 

+ +

CAP_BLANKPAGECOMPSIZEGRAY    Custom: All +Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: 0 - 1000 KB

+ +

                                                                +Default: 0

+ +

-  +Delete Gray image if the final size is less than specific number of KB.

+ +

- Value needs to be in +1024 increments.

+ +

- The front and rear +values can be different except for i30/i40/i55/i65.

+ +

- When set to a +non-zero value: CAP_BLANKPAGEMODE is automatically set to TWBM_COMPSIZE

+ +

  If set zero and +CAP_BLANKPAGECOMPSIZEBW and CAP_BLANKPAGECOMPSIZERGB are zero,

+ +

  then +CAP_BLANKPAGEMODE is automatically changed to TWBM_NONE.

+ +

 

+ +

CAP_BLANKPAGECOMPSIZERGB      +Custom: All Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: 0 - 1000 KB

+ +

                                                                +Default: 0

+ +

-  +Delete Color image if the final size is less than specific number of KB.

+ +

- Value needs to be in +1024 increments.

+ +

- The front and rear +values can be different except for i30/i40/i55/i65.

+ +

- When set to a +non-zero value: CAP_BLANKPAGEMODE is automatically set to TWBM_COMPSIZE

+ +

  If set zero and +CAP_BLANKPAGECOMPSIZEBW and CAP_BLANKPAGECOMPSIZERGB are zero,

+ +

  then +CAP_BLANKPAGEMODE is automatically changed to TWBM_NONE.

+ +

 

+ +

CAP_BLANKPAGECONTENT              +Custom: i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: 0 - 100

+ +

                                                                +Default: 0

+ +

-  If +the percent of content on the image is less than or equal to this amount, the +image will be deleted.

+ +

- This is +only valid when CAP_BLANKPAGEMODE is set to TWBM_CONTENT.

+ +

  

+ +

CAP_CAMERAENABLE                         +Custom: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: FALSE, TRUE

+ +

Default 3590: Front Bitonal - FALSE, Rear Bitonal - +always TRUE,

+ +

                +      Front Color - TRUE

+ +

                                                                +Default i55/i65/i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000: Front/Rear Color - FALSE, Front/Rear Bitonal +- TRUE

+ +

                                                                +Default Other: Front/Rear Color - TRUE, Front/Rear Bitonal +- FALSE

+ +

-  +For use with Multistream(tm), this field must be set +to TRUE to get the TWAIN driver to transfer

+ +

   +the image for that camera.  Use DG_CONTROL / DAT_FILESYSTEM / +MSG_CHANGEDIRECTORY

+ +

   +to select the camera to set.  If using the 3590, CAP_BINARIZATION +must be set for these fields

+ +

   +to have any meaning.

+ +

 

+ +

CAP_CAMERAORDER                           +Custom: All Models (except for 5000/7000/9000)

+ +

Allowed: +TWCM_CL_BOTH/TWCM_BW_BOTH or TWCM_BW_BOTH/TWCM_CL_BOTH

+ +

                                                                +Default: TWCM_CL_BOTH/TWCM_BW_BOTH

+ +

-  An +array determining which should be transferred first for a side: the color or +the bitonal image.

+ +

 

+ +

CAP_CAMERAPREVIEWUI                    +Unsupported.

+ +

 

+ +

CAP_CAPTION                                      +Standard: All Models (except for i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: Any TW_STR255 string

+ +

                                                                +Default: (empty string)

+ +

 

+ +

CAP_CHECKDIGIT              +                  +Custom: i800/i1800 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  If +set to TRUE the scanner will check image address digit.

+ +

 

+ +

CAP_CLEARBUFFERS                           +Standard: All Models (except for i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed:  3000/4000/5000/7000/9000:       TWCB_AUTO, +TWCB_CLEAR, TWCB_NOCLEAR

+ +

                                                                                +Other:                                         +TWCB_AUTO (Read +Only)                             +

+ +

                                                                +Default: TWCB_AUTO

+ +

 

+ +

CAP_CLEARPAGE                                 +Unsupported.

+ +

 

+ +

CAP_CUSTOMDSDATA                        +Standard: All Models

+ +

                                                                +Allowed: TRUE

+ +

                                                                +Default: TRUE

+ +

-  +This is a read-only capability.

+ +

 

+ +

CAP_CUSTOMINTERFACEGUID           +Standard: i2000/i2900/i3000/i5000

+ +

                                                                +Allowed: {642881CE-9F18-448c-8FD8-F77A51E0B85A}

+ +

                                                                +Default: {642881CE-9F18-448c-8FD8-F77A51E0B85A}

+ +

-   Uniquely +identifies an interface for a Data Source, so that an Application can properly +interpret its custom content.

+ +

-  +This is a read-only capability.

+ +

 

+ +

CAP_DEVICEEVENT                              +Standard: All Models

+ +

                                                                +Allowed: TWDE_PAPERJAM, TWDE_PAPERDOUBLEFEED

+ +

                                                                +Default: (empty TW_ARRAY)

+ +

                                                                +- TWDE_PAPERDOUBLEFEED is on all models (except for 5000/7000/9000).

+ +

 

+ +

CAP_DEVICEONLINE                             +Standard: All Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: (none)

+ +

-  +This is a read-only capability.

+ +

-  To +comply with the TWAIN specification the Source issues a command to the device +to confirm that it is up and communicating (the command used is a SCSI +test-unit-ready command).

+ +

 

+ +

CAP_DEVICETIMEDATE                        +Standard: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: TW_STR32 of the form YYYY/MM/DD HH:MM:SS.sss

+ +

                                                                +Default: (none)

+ +

 

+ +

CAP_DOCUMENTCOUNT                      +Custom: 5000/7000/9000 Series

+ +

                                                                +Allowed: 0 - 999999999

+ +

                                                                +Default: 0

+ +

-  +This value overrides CAP_PRINTERINDEX if CAP_DOCUMENTCOUNTENABLED == TRUE

+ +

 

+ +

CAP_DOCUMENTCOUNTENABLED      +Custom: 5000/7000/9000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-    Determines +if the CAP_DOCUMENTCOUNT is downloaded to the scanner.

+ +

 

+ +

CAP_DOUBLEFEEDENDJOB                  +Custom: i600/i700/i800/i1800/i2000/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

-  If +set to TRUE the scanner will stop scanning on detection of a multifeed.

+ +

 

+ +

CAP_DOUBLEFEEDSTOP                      +Custom: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

-  If +set to TRUE the scanner will stop scanning on detection of a multifeed.  The 3000/4000 scanners will +disable.

+ +

 

+ +

CAP_DUALSTACKINGENABLED           Custom: i5000 +Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- If +set to TRUE +the Controlled Dual Stacking Accessory will be enabled.

+ +

- It +can only be enabled if the accessory is installed.

+ +

 

+ +

CAP_DUALSTACKINGLENGTHMODE    Custom: i5000 Series

+ +

                                                                +Allowed: TWDSLM_NONE, TWDSLM_LESSTHAN, TWDSLM_GREATERTHAN, +TWDSLM_BETWEEN

+ +

                                                                +Default: TWDSLM_NONE

+ +

Indicates +the +length method being used to make document separation decisions

+ +

  for the Controlled Dual Stacking Accessory. The stacking length mode only

+ +

  has meaning if +CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUALSTACKINGLENGTH1            Custom: +i5000 Series

+ +

                                                                +Allowed: Scanner +specific

+ +

                                                                +Default: Scanner specific

+ +

                                                                - If +CAP_DUALSTACKINGLENGTHMODE is "less than", then any documents shorter

+ +

                                                                  than this length will be separated and placed +in the selected  CAP_DUALSTACKINGSTACK.

+ +

                                                                - +If CAP_DUALSTACKINGLENGTHMODE is "greater than", then any documents +longer

+ +

                                                                  than this length will be separated and placed +in the selected CAP_DUALSTACKINGSTACK.

+ +

                                                                - +If CAP_DUALSTACKINGLENGTHMODE is "between", then any documents longer +than

+ +

                                                                  this length and shorter than +CAP_DUALSTACKINGLENGTH2 will be separated and placed in the

+ +

                                                                  selected CAP_DUALSTACKINGSTACK.

+ +

                                                                - +Only valid if CAP_DUALSTACKINGENABLED is TRUE and CAP_DUALSTACKINGLENGTHMODE

+ +

                                                                  is set to any value other than TWDSLM_NONE.

+ +

                                                                - +The range is determined by the scanner, so an application might want to

+ +

                                                                  ask what the range is

+ +

 

+ +

CAP_DUALSTACKINGLENGTH2            Custom: +i5000 Series

+ +

                                                                +Allowed: Scanner +specific

+ +

                                                                +Default: Scanner specific

+ +

- If CAP_DUALSTACKINGLENGTHMODE is "between", then +any documents whose length falls within

+ +

  the selected range of CAP_DUALSTACKINGLENGTH1 and CAP_DUALSTACKINGLENGTH2 will be

+ +

  separated and placed +in the selected CAP_DUALSTACKINGSTACK.

+ +

- Only valid if CAP_DUALSTACKINGENABLED is TRUE and +CAP_DUALSTACKINGLENGTHMODE

+ +

  is +set to TWDSLM_BETWEEN.

+ +

- The +range is determined by the scanner, so an application might want to

+ +

  ask what the range is.

+ +

 

+ +

CAP_DUALSTACKINGMULTIFEED        +Custom: i5000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- Indicates if Multifed documents +should be separated and placed in

+ +

  the +selected  CAP_DUALSTACKINGSTACK.

+ +

- Only valid if CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUALSTACKINGPATCHTRANSFER

+ +

                                                                 Custom: i5000 +Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- Indicates if Patch Type Transfer documents should be +separated and placed in

+ +

  the +selected  CAP_DUALSTACKINGSTACK.

+ +

- Only valid if CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUALSTACKINGPATCHTYPE1 +Custom: i5000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- Indicates if Patch Type 1 +documents should be separated and placed in

+ +

  the +selected  CAP_DUALSTACKINGSTACK.

+ +

- Only valid if CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUALSTACKINGPATCHTYPE2 +Custom: i5000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- Indicates if Patch Type 2 documents should be separated and +placed in

+ +

  the +selected  CAP_DUALSTACKINGSTACK.

+ +

- Only valid if CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUALSTACKINGPATCHTYPE3 +Custom: i5000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- Indicates if Patch Type 3 documents should be separated and +placed in

+ +

  the +selected  CAP_DUALSTACKINGSTACK.

+ +

- Only valid if CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUALSTACKINGPATCHTYPE4 +Custom: i5000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- Indicates if Patch Type 4 documents should be separated and +placed in

+ +

  the +selected  CAP_DUALSTACKINGSTACK.

+ +

- Only valid if CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUALSTACKINGPATCHTYPE6 +Custom: i5000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- Indicates if Patch Type 6 documents should be separated and +placed in

+ +

  the +selected  CAP_DUALSTACKINGSTACK.

+ +

- Only valid if CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUALSTACKINGSTACK                +Custom: i5000 Series

+ +

                                                                +Allowed: TWDSS_STACK1, TWDSS_STACK2

+ +

                                                                +Default: TWDSS_STACK1

+ +

Indicates +which stack to put detected documents in when a document matches the

+ +

  defined stacking criteria (patch type, +length, and/or multifeed).

+ +

- +Only valid if CAP_DUALSTACKINGENABLED is TRUE.

+ +

 

+ +

CAP_DUPLEX                                         +Standard: All Models

+ +

                                                                +Allowed: TWDX_NONE, TWDX_1PASSDUPLEX

+ +

                                                                +Default: TWDX_NONE for Simplex scanners, and TWDX_1PASSDUPLEX for Duplex scanners

+ +

-  +This is a read-only capability.

+ +

 

+ +

CAP_DUPLEXENABLED                         +Standard: All Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

-    If +CAP_DUPLEX is TWDX_NONE, then this capability is FALSE.

+ +

 

+ +

CAP_EASYSTACKING                           +Custom: i600/i700/i1800

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  If set to TRUE then the +scanner makes adjustments to improve the arrangement of the output stack as the +paper exits the transport.

+ +

 

+ +

CAP_ENABLECOLORPATCHCODE      +Custom: 3590

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +Controls recognition of the patch code that moves the scanner mirror, letting +it scan bitonal or color on the front camera.

+ +

 

+ +

CAP_ENABLEDSUIONLY                       +Standard: All Models (except for i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: TRUE

+ +

                                                                +Default: TRUE

+ +

-  +This is a read-only capability.

+ +

 

+ +

CAP_ENDORSER                                    +Unsupported.

+ +

 

+ +

CAP_ENERGYSTAR                               +Custom: All Models (except for i800/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: i30/i40/i55/i65/i100/i600/i700/i1800:        +0, 5 - 60

+ +

                                                                               i200:                                                          +0, 15 - 60

+ +

                                                                               +i1100/i1200/i1300/i1400:                         + 0, 5 - 240

+ +

                                                                               +i2000/i4000/i5000:                                    5 - 240

+ +

                                                                               +i900/i2900/i3000:  +               +                     1 - 240

+ +

                                                                +Default: 15

+ +

-  +Selects the idle time required before the Energy Star power saver is activated.

+ +

 

+ +

CAP_EXTENDEDCAPS                           +Unsupported.

+ +

 

+ +

CAP_FEEDERALIGNMENT                     +Standard: All Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed:  TWFA_CENTER

+ +

                                                                +Default:    TWFA_CENTER

+ +

                                                                +- This is a read-only capability

+ +

 

+ +

CAP_FEEDERENABLED                          +Standard: All Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

i200: +FALSE is only permitted if the flatbed platen is installed.

+ +

-  +This is always TRUE for all other models and read only (except for +i2000/i2900/i3000/i4000/i5000).

+ +

 

+ +

CAP_FEEDERKEEPALIVE                      +Custom: 3000/4000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  If +TRUE the feeder is kept running forever waiting for the first sheet of paper.

+ +

 

+ +

CAP_FEEDERLOADED                           +Standard: All Models

+ +

                                                                +Allowed: TRUE

+ +

                                                                +Default: TRUE

+ +

-  +This is a read-only capability.

+ +

-  +See CAP_PAPERDETECTABLE.

+ +

 

+ +

CAP_FEEDERMODE                               +Custom: i280/i1440/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: i280/i1440: TWFM_NONE, TWFM_SPECIAL

+ +

                                                                               +Other: Scanner specific

+ +

                                                                +Default: i280/i1440: TWFM_NONE

+ +

                                                                             +Other: Scanner specific

+ +

- +CAP_FEEDERMODE is for Special Document

+ +

- For i1440, +TWFM_NONE will show “Off” on the UI, TWFM _SPECIAL will show “On”.

+ +

 

+ +

CAP_FEEDERORDER                              +Unsupported.

+ +

 

+ +

CAP_FEEDPAGE                                    +Unsupported.

+ +

 

+ +

CAP_FIXEDDOCUMENTSIZE                 +Custom: 3000/4000 Series (except for 3500)

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +Set this value to true to speed up scanning.  Note that the speed up can +only occur if all of the documents in the batch are the same size.  +Speed-up is from 75ppm to 85ppm for 8.5x11 documents fed landscape.

+ +

 

+ +

CAP_FOLDEDCORNER                          +Custom: i600/i700

+ +

                                                                +Allowed: TWFC_DISABLED, TWFC_STOP, TWFC_ENDOFJOB

+ +

                                                                +Default: TWFC_DISABLED

+ +

-    Controls +Folded Corner detection and the action taken if one is discovered during +scanning.

+ +

-  +This is TWFC_DISABLED and read-only at this time.

+ +

 

+ +

CAP_FOLDEDCORNERSENSITIVITY     Custom: i600/i700

+ +

                                                                +Allowed: 1 - 100

+ +

                                                                +Default: 2

+ +

-    Controls +the folded corner sensitivity, if folder corner detection is turned on.

+ +

-  +This is a read-only capability at this time.

+ +

 

+ +

CAP_FUNCTIONKEY1

+ +

CAP_FUNCTIONKEY2

+ +

CAP_FUNCTIONKEY3                            +Custom: i800/i1800 Series

+ +

Allowed: TWFK_NONE, +TWFK_ENDOFJOB, TWFK_TERMINATEBATCH, TWFK_SKIPMULTIFEED, TWFK_SKIPPRINTING, +TWFK_SKIPBATCH

+ +

                                                                +Default: TWFK_NONE

+ +

-    Controls +the programmable keys on the scanner console.

+ +

 

+ +

CAP_IMAGEADDRESS                          +Custom: 5000/7000/9000/i800/i1800 Series

+ +

                                                                +Allowed: Any valid image address

+ +

                                                                +Default:    i800: None. Empty string indicates to use the +current scanner value.

+ +

                                                                                +i1800: Current scanner value.  Empty string indicates to use +Scanner defaults (ex: .0.0.1)

+ +

                                                                                +Other:  DEFAULT

+ +

                                                                +-  Specifies the image address used to start this session.

+ +

 

+ +

CAP_IMAGEADDRESSENABLED          +Custom: 5000/7000/9000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +Determines if the CAP_IMAGEADDRESS is downloaded to the scanner.

+ +

 

+ +

CAP_IMAGEADDRESSTEMPLATES     Custom: i800/i1800 +Series

+ +

                                                                +Allowed: TWIA_CUSTOM, TWIA_NONE, TWIA_1 - TWIA_5

+ +

                                                                +Default: TWIA_1

+ +

-  +Populates the template and level to follow fields.

+ +

TWIA_CUSTOM is a read +only value and if CAP_IMAGEADDRESS_A or B, C, D or CAP_LEVELTOFOLLOW1, 2, 3 are changed, then this capability will revert to +TWIA_CUSTOM.

+ +

TWIA_NONE is Fix +"FFFFFFFFF"

+ +

TWIA_1 is Level 3 +"FFFFFFFFF.333333.222222.111111"

+ +

TWIA_2 is Level 2 +"FFFFFFFFF.222222222.111111111"

+ +

TWIA_3 is Level 1 +"FFFFFFFFF.111111111"

+ +

TWIA_4 is Level 3 +Offset "FFFFFFFFF.333333333.222222222"

+ +

TWIA_5 is Level 2 +Offset "FFFFFFFFF.222222222"

+ +

 

+ +

CAP_IMAGEADDRESS_A

+ +

CAP_IMAGEADDRESS_B

+ +

CAP_IMAGEADDRESS_C

+ +

CAP_IMAGEADDRESS_D                      +Custom: i800/i1800 Series

+ +

Allowed: F, 3, 2, 1 or nothing, +according to the image address template rules (see the context sensitive help +for this field for more information)

+ +

                                                                +Default: FFFFFFFFF.333333.222222.111111

+ +

                                                                +-  Specifies the image address template.

+ +

 

+ +

CAP_IMAGESDIFFERENT                      Custom: +i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: FALSE, TRUE
+                                                                +Default: FALSE

+ +

                                                                +-  When this is TRUE the user can set different values for the color and bitonal cameras.

+ +

                                                                +-  When set to FALSE a value set on a color +camera will be matched (if possible) by the bitonal +camera, and vice versa.

+ +

 

+ +

CAP_IMAGEMAGNIFICATIONFACTOR            +

+ +

                                                                +Unsupported.  

+ +

 

+ +

CAP_IMAGEMERGE                              Custom: +i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000

+ +

                                                                +Allowed: TWIM_NONE, TWIM_FRONTONTOP, TWIM_FRONTONBOTTOM, TWIM_FRONTONLEFT, +TWIM_FRONTONRIGHT

+ +

                                                                +Default: TWIM_NONE

+ +

                                                                +-  Merges the front and back images into a single image that is returned +to the application.

+ +

 

+ +

CAP_INDICATORS                                 +Standard: All Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +The TWAIN default is TRUE, so it is up to the Application to turn the indicator +off if it wants complete UI-less control of the Source.

+ +

-  +The Source supports pTW_UIINTERFACE.ShowUI being +FALSE, but CAP_INDICATORS being TRUE.  In this case the Source will +display just the Progress tab.

+ +

 

+ +

CAP_INDICATORSWARMUP +               +Custom: All Models (except for 3000/4000/5000/7000/9000/i800)

+ +

Allowed: TRUE, FALSE

+ +

                                                                +Default: TRUE

+ +

-          +Controls the appearance of the LampSaver +and Warmup dialogs.  Only turn this off if these +dialogs are interfering with the operation of your application.

+ +

 

+ +

CAP_INTELLIGENTDOCUMENTPROTECTION          +

+ +

                                                                +Custom: i2900/i3000 Series

+ +

                                                                +Allowed: TWIDP_NONE, TWIDP_MINIMUM, TWIDP_NORMAL, TWIDP_MAXIMUM

+ +

                                                                +Default: TWIDP_NORMAL

+ +

                                                                +-  Controls the level of document protection.

+ +

 

+ +

CAP_JOBCONTROL                              +Unsupported.

+ +

 

+ +

CAP_LANGUAGE                                   +Standard: All Models

+ +

Allowed:  +TWLG_ENGLISH*

+ +

                                     TWLG_CHINESE*

+ +

                                     TWLG_CZECH

+ +

                   +TWLG_DUTCH*

+ +

       +                              TWLG_FRENCH*

+ +

                                     +TWLG_GERMAN*

+ +

       +            +                  +TWLG_ITALIAN*

+ +

        +            +                 +TWLG_JAPANESE

+ +

                       +              +TWLG_KOREAN*

+ +

                          +           +TWLG_PORTUGUESE*

+ +

                           +          TWLG_RUSSIAN        +

+ +

            +               +          TWLG_SPANISH*

+ +

                +              +       TWLG_TURKISH

+ +

                                                                +Default: The application's language[1]

+ +

 

+ +

CAP_LEVELTOFOLLOW1

+ +

CAP_LEVELTOFOLLOW2

+ +

CAP_LEVELTOFOLLOW3                     +Custom: i800/i1800 Series

+ +

                                                                +Allowed: TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3

+ +

                                                                +Default: TWPL_LEVEL1

+ +

                                                                +-  Specifies the level to follow rules for the current image address +template.

+ +

 

+ +

CAP_MAXBATCHBUFFERS                  +Unsupported.

+ +

 

+ +

CAP_MODE                                            +Custom: 5000/7000/9000 Series

+ +

                                                                +Allowed: 1 - 18

+ +

                                                                +Default: 1

+ +

-  +Allows the selection of the mode to be used during the scanning session.

+ +

-  +Only one mode is permitted per session.

+ +

 

+ +

CAP_MULTIFEEDCOUNT +                     +Custom: All Models (except for i800/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: 0 - 32767

+ +

                                                                +Default: 0

+ +

                                                                 +- Count of multifeeds per scan session.

+ +

                                                                 +- Setting this capability has no effect.

+ +

 

+ +

CAP_MULTIFEEDRESPONSE                +Custom: i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: i1100: +                          +   TWMR_CONTINUE, TWMR_ENDOFJOB

+ +

                                                                               +i600/i700/i1800:            +  TWMR_CONTINUE, TWMR_ENDOFJOB, TWMR_STOPFEEDER

+ +

                                                                               +i1200/i1300/i1400:          TWMR_CONTINUE, TWMR_ENDOFJOB, +TWMR_ENDOFJOBLEAVEPAPER

+ +

                                                                               +i900/i2000:                      TWMR_CONTINUE, TWMR_ENDOFJOB, +TWMR_ENDOFJOBLEAVEPAPER, TWMR_ENDOFJOBGENERATEIMAGE

+ +

                                                                               +i2900/i3000/i4000/i5000: TWMR_CONTINUE, +TWMR_ENDOFJOB, TWMR_ENDOFJOBLEAVEPAPER, TWMR_ENDOFJOBGENERATEIMAGE,

+ +

                                                                                +                                        TWMR_STOPFEEDER, TWMR_STOPFEEDERLEAVEPAPER

+ +

                                                                +Default: TWMR_ENDOFJOB

+ +

                                                                 +- Action +taken when the multifeed detected.

+ +

                                                                 +- Note: The allowed values may have been changed after the initial release of +the scanner. So it is best to get the list from the TWAIN driver.

+ +

 

+ +

CAP_MULTIFEEDSOUND +                      +Custom: All Models (except for i800/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: Text

+ +

                                                                +Default: "ding.wav"

+ +

- Sound +played when detect document multifeeds.

+ +

 

+ +

CAP_MULTIFEEDTHICKNESSDETECTION

+ +

                                                                +Custom: 3000 Series (except for 3500)

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +Turns multifeed thickness detection on or off.

+ +

 

+ +

CAP_NOWAIT                                        +Custom: All Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  If +set to TRUE then potentially blocking commands (ones that wait for image data +from the scanner) will return TWRC_BUSY if they are not ready.  This +allows the application to poll the command until data does arrive, which +prevents applications from appearing to hang from the user's point of view.

+ +

 

+ +

CAP_PAGECOUNT                                +Custom: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: 0 - 32767

+ +

                                                                +Default: 0 (disabled)

+ +

-  If +CAP_XFERCOUNT is set to -1 and this field is non-zero, then the specified +number of sheets of paper will be scanned.  This keeps the application +from having to figure out how what value of CAP_XFERCOUNT is needed to get a +specific number of sheets of paper scanned.

+ +

 

+ +

CAP_PAGESIZELIMIT                           +Custom: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: 0 - ICAP_PHYSICALHEIGHT

+ +

                                                                +Default: 0 (disabled)

+ +

-  +This is a double document detection system.  If greater than zero then the +scanner will detect an attempt to scan anything larger than the specified +length value.  The AddPageSizeLimit in the +CONST.INI file can be modified to change the fudge factor in identifying multifeeds.

+ +

-  +The i30/i40/i55/i65 cannot guarantee multifeed detection +for documents that are 14” in length if allows value is 14.77.

+ +

 

+ +

CAP_PAPERDETECTABLE                    +Standard: All Models

+ +

                                                                +Allowed: FALSE

+ +

                                                                +Default: FALSE

+ +

-  +Indicates that the scanner cannot detect the presence of paper in the feeder +area.

+ +

- This +is a read-only capability.

+ +

 

+ +

CAP_PAPERSOURCE +                           +Custom: All Models (except for 4000/5000/7000/9000)

+ +

                                                                +Allowed:  i30/i40/i100/i900/i1100TWPU_ADF.

+ +

                                                                +Allowed:  i55/i65:  TWPU_ADF, TWPU_AUTO, TWPU_PLATEN

+ +

Allowed:  i200/i1200/i1300/i1400/i2000TWPU_ADF.  If platen +installed TWPU_AUTO and TWPU_PLATEN also allowed.

+ +

                                                                +Allowed:  i600/i700/i1800/i4000: TWPU_ADF, TWPU_ELEVATOR100, TWPU_ELEVATOR250, +TWPU_ELEVATOR500

+ +

                                                                +Allowed:  i5000: TWPU_ADF, +TWPU_ELEVATOR100, TWPU_ELEVATOR250, TWPU_ELEVATOR500, TWPU_ELEVATOR750

+ +

                                                                +Allowed:  i2900/i3000: TWPU_ADF, +TWPU_ELEVATOR100, TWPU_ELEVATOR250. If platen installed TWPU_AUTO, +TWPU_PLATEN,

+ +

                                                                                 +TWPU_ELEVATOR100PLATEN,  +TWPU_ELEVATOR250PLATEN also allowed

+ +

                                                                +Default:    i30/i40/i100/i200/i900/i1100: TWPU_ADF

+ +

                                                                +Default:    i600/i700/i1800/i4000: TWPU_ELEVATOR500

+ +

                                                                +Default:   i5000: TWPU_ELEVATOR750

+ +

                                                                +Default:    i55/i65i/1200/i1300/i1400/i2000: TWPU_AUTO

+ +

                                                                +Default:   i2900/i3000: TWPU_ELEVATOR250. If +platen installed TWPU_ELEVATOR250PLATEN.

+ +

- +TWPU_ADF-    Selects source of paper (ADF or Platen). TWPU_AUTO. +Selects ADF but changes to platen if the ADF has no paper in it at the start of +the scanning session.

+ +

 

+ +

CAP_PATCHCOUNT +                             +Custom: i280/i600/i700/i1400/i1800/i4000/i5000

+ +

                                                                +Allowed: 0 - 32767

+ +

                                                                +Default: 0

+ +

                                                                 +- Count of patches per scan session.

+ +

                                                                 +- Setting this capability has no effect.

+ +

 

+ +

CAP_PATCHHEAD1 +                              +Custom: i1800

+ +

                                                                +Allowed: TRUE/FALSE

+ +

                                                                +Default: TRUE

+ +

                                                                 +- Enables/disables +the first patch reader

+ +

 

+ +

CAP_PATCHHEAD2                               +Custom: i1800

+ +

                                                                +Allowed: TRUE/FALSE

+ +

                                                                +Default: TRUE

+ +

                                                                 +- Enables/disables +the second patch reader

+ +

 

+ +

CAP_PATCHHEAD3 +                              +Custom: i1800

+ +

                                                                +Allowed: TRUE/FALSE

+ +

                                                                +Default: TRUE

+ +

                                                                 +- Enables/disables +the third patch reader

+ +

 

+ +

CAP_PATCHHEAD4 +                              +Custom: i1800

+ +

                                                                +Allowed: TRUE/FALSE

+ +

                                                                +Default: TRUE

+ +

                                                                 +- Enables/disables +the fourth patch reader

+ +

 

+ +

CAP_PCARDENABLED                          +Unsupported.

+ +

                                                                +

+ +

CAP_POWEROFFTIMEOUT                   +Custom: i2900/i3000 series

+ +

                                                                +Allowed: i2900/i3000:   0 - 240

+ +

                                                                +Default: 60

+ +

-  +Selects the number of minutes to wait after the scanner enters low power mode, +before it powers off

+ +

 

+ +

CAP_POWERSUPPLY                            +Unsupported.

+ +

 

+ +

CAP_PRINTER                                        +Standard: 3520/4500/5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 +Series

+ +

Allowed:  +TWPR_IMPRINTERTOPBEFORE,

+ +

                +TWPR_IMPRINTERBOTTOMBEFORE (except i600/i700/i800/i1800/i4000/i5000),

+ +

                +TWPR_IMPRINTERBOTTOMAFTER ( i200/i1400 only).

+ +

                                                                +Default 3520/4500: TWPR_IMPRINTERTOPBEFORE

+ +

Default 5000/7000: +TWPR_IMPRINTERTOPBEFORE (TWPR_IMPRINTERBOTTOMBEFORE if there is no top printer)

+ +

                                                                +Default i200/i1400/i2900/i3000: TWPR_IMPRINTERBOTTOMAFTER

+ +

                                                                +Default i600/i700/i800/i1800/i4000/i5000: TWPR_IMPRINTERTOPBEFORE

+ +

 

+ +

CAP_PRINTERDATE                               +Custom: i600/i700/i1800/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: YYYY/MM/DD      +(YYYY - year, MM - month, DD - day)

+ +

                                                                +Default: empty string

+ +

                                                                 +- Set to empty string to disable.

+ +

                                                                 +- This will set the scanner to a specific date prior to printing.

+ +

                                                                 +- The scanner will be returned to the original date afterwards.

+ +

 

+ +

CAP_PRINTERDATEDELIMITER            +Custom: 3520/4500/5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: TWPD_NONE, TWPD_FORWARDSLASH, TWPD_HYPHEN, TWPD_PERIOD, TWPD_BLANK

+ +

                                                                +Default i800: TWPD_FORWARDSLASH

+ +

                                                                +Default Other: TWPD_NONE

+ +

-  +Selects the delimiter between the fields in the date.  The delimiter in +the time field is always a colon (:).

+ +

 

+ +

CAP_PRINTERDATEFORMAT               +Custom: i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: i600/i800/i1400:    TWPE_MMDDYYYY, TWPE_DDMMYYYY, +TWPE_YYYYMMDD,

+ +

                                                +                               +Other:                   +TWPE_MMDDYYYY, TWPE_DDMMYYYY, TWPE_YYYYMMDD, TWPE_DDD, TWPE_YYYYDDD

+ +

                                                                +Default: i800:    TWPE_MMDDYYYY

+ +

                                                                +Default: Other:  TWPE_YYYYMMDD

+ +

-  +Selects the format of the date.

+ +

 

+ +

CAP_PRINTERENABLED                        +Standard: 3520/4500/5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

- Turns +printing on and off.  Note that printing for the 5000/7000 is side +dependent.

+ +

 

+ +

CAP_PRINTERFONT                              +Custom: 3520/4500/5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                +Allowed: 3520/4500/5000/7000/i200/i1400:    +TWPN_LARGECOMIC, TWPN_LARGECINE, TWPN_SMALLCOMIC, TWPN_SMALLCINE

+ +

                                                                               +i600/i700/i800/i1800:      TWPN_LARGECOMIC, +TWPN_LARGECINE, TWPN_LARGECOMIC180, TWPN_LARGECINE180, 

+ +

                                                                                       +                                +TWPN_SMALLCOMIC, TWPN_SMALLCINE, TWPN_SMALLCOMIC180, TWPN_SMALLCINE180

+ +

                                                                               +i2900/i3000/i5000:          +TWPN_LARGECOMIC, TWPN_LARGECINE, TWPN_LARGECOMIC180, TWPN_LARGECINE180,

+ +

                                                                                       +                                +TWPN_SMALLCOMIC, TWPN_SMALLCINE, TWPN_SMALLCOMIC180, TWPN_SMALLCINE180,

+ +

                                                                                                                       +TWPN_BOLDLARGECOMIC, TWPN_BOLDLARGECINE, +TWPN_BOLDLARGECOMIC180, TWPN_BOLDLARGECINE180

+ +

                                                                               +i4000:                              TWPN_LARGECOMIC, TWPN_LARGECINE, +TWPN_LARGECOMIC180, TWPN_LARGECINE180,

+ +

                                                                                                                       +TWPN_SMALLCOMIC, TWPN_SMALLCINE, TWPN_SMALLCOMIC180, +TWPN_SMALLCINE180,

+ +

                                                                                       +                                +TWPN_BOLDLARGECOMIC, TWPN_BOLDLARGECINE

+ +

                                                                +Default:    i800/i2900/i3000/i4000/i5000: TWPN_SMALLCOMIC +

+ +

                                                                                +Other:                                      TWPN_LARGECOMIC

+ +

-    This +selects the printing font.

+ +

 

+ +

CAP_PRINTERFONTFORMAT               +Custom: i1800

+ +

                                                                +Allowed: TWPFF_NORMAL, TWPFF_BLOCK

+ +

                                                                +Default: TWPFF_NORMAL

+ +

                                                                 +- Elects the printer font format to be used

+ +

 

+ +

CAP_PRINTERIMAGEADDRESSFORMAT

+ +

                                                                +Custom: 5000/7000/i800/i1800 Series

+ +

                                                                +Allowed:                  +TWPI_DISPLAYLEADINGZEROS, TWPI_SUPPRESSLEADINGZEROS, TWPI_COMPRESSLEADINGZEROS

+ +

                                                                +Default 5000/7000: TWPI_DISPLAYLEADINGZEROS

+ +

                                                                +Default i800/i1800: +TWPI_SUPPRESSLEADINGZEROS

+ +

-  +This selects the format of the image address, if it is selected for printing.

+ +

 

+ +

CAP_PRINTERIMAGEADDRESSLEVEL

+ +

                                                                +Custom: 5000/7000/i800/i1800 Series

+ +

Allowed 5000/7000: +TWPL_ALLLEVELS, TWPL_LEVEL0, TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3

+ +

                                                                +Allowed i800/i1800: +TWPL_ALLLEVELS, TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3

+ +

                                                                +Default: TWPL_ALLLEVELS

+ +

-  +This selects which level document the described printing will occur upon.

+ +

 

+ +

CAP_PRINTERINDEX                              +Standard: 3520/4500/5000/7000/i200/i600/i700/i800/i1400/i1800/i2000/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: 0 - 999999998

+ +

                                                                +Default i600/i700/i1800: 1

+ +

                                                                +Default Other : 0

+ +

-  +This value is shared with CAP_DOCUMENTCOUNT, it CAP_DOCUMENTCOUNTENABLED == +TRUE, then that

+ +

                                                                +   value will override this one.

+ +

 

+ +

CAP_PRINTERINDEXDIGITS                  +Custom: 3520/4500/5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: 1 - 9

+ +

                                                                +Default: 9

+ +

-    Sets the +number of digits of the counter to be printed.  Note that the data will be +truncated if the number of digits in the count exceeds this value.

+ +

 

+ +

CAP_PRINTERINDEXFORMAT

+ +

                                                                +Custom: 3520/4500/5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: +                 +TWPI_DISPLAYLEADINGZEROS, TWPI_SUPPRESSLEADINGZEROS, TWPI_COMPRESSLEADINGZEROS

+ +

                                                                +Default i800: TWPI_SUPPRESSLEADINGZEROS

+ +

                                                                +Default Other: TWPI_DISPLAYLEADINGZEROS

+ +

-  +This selects the format of the document count, if it is selected for printing.

+ +

 

+ +

CAP_PRINTERMODE                           Standard: +5000/7000/i2900/i3000/i4000/i5000 Series

+ +

                                                             Allowed: +TWPM_SINGLESTRING, TWPM_COMPOUNDSTRING

+ +

                                                             Default: +TWPM_SINGLESTRING

+ +

-  +TWPM_SINGLESTRING allows the full range of printer features to be expressed.

+ +

-  +TWPM_COMPOUNDSTRING follows the guidelines of the TWAIN 1.8 specification.

+ +

 

+ +

CAP_PRINTERPOSITION                       +Custom: 3520/4500/5000/7000/i200/i600/i700/i800//i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: Scanner +specific

+ +

                                                                +Default: Scanner specific

+ +

                                                                +-  This selects the position from the top of the page where printing is to +begin.

+ +

 

+ +

CAP_PRINTERSTRING                           +Standard: i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed:  Any +string (up to 40 characters)

+ +

                                                                +Default:    “111”

+ +

                                                                +-  This capability is the same as CAP_PRINTERWRITESEQUENCEMESSAGE1.

+ +

 

+ +

CAP_PRINTERSUFFIX                            +Standard: 5000/7000/i200/i600/i700/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed:  5000/7000:              +Any string

+ +

                                                                                +i600/i700/i1800/i5000:   Any +string (up to 20 characters)

+ +

                                                                                +i200/i1400/i2900/i3000/i4000:    Any string (up to +40 characters)

+ +

                                                                +Default:    5000/7000:              +(empty string)

+ +

                                                                                +i200/i600/i700/i1400:       “ABC”

+ +

                                                                                +i1800/i2900/i3000/i4000/i5000:            “111”

+ +

 

+ +

CAP_PRINTERTIME                               +Custom: i600/i700/i1800/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: HH:MM      +(HH - hour (0-23), MM - minutes (0-59), i.e. +00:00->23:59)

+ +

                                                                +Default: empty string

+ +

                                                                 +- Set to empty string to disable.

+ +

                                                                 +- This will set the scanner to a specific time prior to printing.

+ +

                                                                 +- The scanner will be returned to the original time afterwards.

+ +

 

+ +

CAP_PRINTERWRITESEQUENCE          +Custom: 5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: refer to kdscust.h

+ +

                                                                +Default: TWPW_NONE

+ +

                                                                +-  Determines what will be printed.

+ +

                                                                +-  Use CAP_PRINTERWRITESEQUENCEINDEX to move through each of the items.

+ +

                                                                +-  Use CAP_PRINTERIMAGEADDRESSLEVEL to specify the level being targeted +for printing.

+ +

 

+ +

CAP_PRINTERWRITESEQUENCEINDEX

+ +

                                                                +Custom: 5000/7000 Series

+ +

                                                                +Allowed: 1 - 7

+ +

                                                                +Default: 1

+ +

                                                                +-  Selects the current CAP_PRINTERWRITESEQUENCE item being set.

+ +

 

+ +

CAP_PRINTERWRITESEQUENCEMESSAGE

+ +

                                                                +Custom: 3520/4500/5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: TWTY_STR32

+ +

                                                                +Default: #n, where n is the message number

+ +

                                                                +-  5000/7000: There are nine of these, +CAP_PRINTERWRITESEQUENCEMESSAGE1 through 9.

+ +

                                                                +-  3520/4500: There is one of these, +CAP_PRINTERWRITESEQUENCEMESSAGE.

+ +

                                                                +-  i600/i700/i800/i1800/i5000: There are 6 of these, +CAP_PRINTERWRITESEQUENCEMESSAGE1 through 6.

+ +

                                                                +-  i200/i1400/i2900/i3000/i4000: There is only one of message, +CAP_PRINTERWRITESEQUENCEMESSAGE1.

+ +

                                                                +-  The CAP_PRINTERWRITESEQUENCE selects the message number and its position +in the write sequence.

+ +

 

+ +

CAP_PRINTERWRITESEQUENCEMESSAGEINDEX

+ +

                                                                +Custom: i200/i600/i700/i1400/i1800

+ +

                                                                +Allowed:  i200/i1400:    1

+ +

                                                                                +i600/i700/i1800:    1 - 6

+ +

                                                            +    Default: 1

+ +

                                                                +-  Selects the write sequence message.

+ +

                                                                +- This is a read-only capability.

+ +

 

+ +

CAP_PRINTERWRITESEQUENCESPACE

+ +

                                                                +Custom: 5000/7000 Series

+ +

                                                                +Allowed: 1 - 38

+ +

                                                                +Default: 1

+ +

                                                                +-  Selects the number of blanks to print at the location selected by +CAP_PRINTERWRITESEQUENCE.

+ +

 

+ +

CAP_PRINTERWRITESEQUENCESPACESTRING

+ +

                                                                +Custom: 5000/7000 Series

+ +

                                                                +Allowed: TWTY_STR255

+ +

                                                                +-  Selects the write sequence count of spaces.

+ +

 

+ +

CAP_PRINTERWRITESEQUENCESTRING

+ +

                                                                +Custom: 5000/7000/i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: TWTY_STR255

+ +

                                                                +-  Selects the write sequence.

+ +

 

+ +

CAP_PROFILES                                     +Custom: i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: TWPO_UNKNOWN, TWPO_DEFAULT, TWPO_FILE01 - 60

+ +

                                                                +Default: (determined from the scanner)

+ +

                                                                +- THIS IS DEPRECATED TWAIN 10.X+. DAT_PROFILES SHOULD BE USED INSTEAD.

+ +

-  +Allows the application to select the profile.  Applications should only +try to set the TWPO_FILE values.  See the DAT_PROFILES operation for a way +to map the display strings to the various CAP_PROFILES values.

+ +

 

+ +

CAP_REACQUIREALLOWED                 +Unsupported.

+ +

 

+ +

CAP_REWINDPAGE                               +Unsupported.

+ +

 

+ +

CAP_SERIALNUMBER                           +Stanard:  All Models +(except for 5000/7000/9000)

+ +

                                                                +Allowed: Up to 8 characters

+ +

                                                                +Default: (none)

+ +

                                                                +-  This is a read-only capability.

+ +

 

+ +

CAP_SIDESDIFFERENT                          Custom: +i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +When this is TRUE the user can set different values for the front and rear +camera. Setting this to FALSE will copy all the front settings to the rear for +the current camera.

+ +

This will automatically change to TRUE when the front and +rear no longer match. Note: a value of TRUE does NOT imply that the sides are +different (e.g. if everything matches and this is set to TRUE)

+ +

 

+ +

CAP_SIMULATING                                +Custom: i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +Simulate the scanner.

+ +

 

+ +

CAP_SUPPORTEDCAPS                       +Standard: All Models

+ +

                                                                +Allowed: All supported capabilities named in this document

+ +

                                                                +Default: (same as allowed)

+ +

-  +This is a read-only capability.

+ +

 

+ +

CAP_SUPPORTEDSIZES                      +Standard: All Models

+ +

                                                                +Allowed:  i30/i40/i55/i65/i900/i1100/i1200/i1300/i1400:    +ISO A4 - A7, B5 - B7, C5 - C7; JIS B5 - B8;

+ +

                                                                                                                                                    +Legal, Letter, Executive and Statement; TWSS_NONE

+ +

                                                                                +i100/i200/i600/i700/i800/i1800/i2000/i2900/i3000/i4000/i5000:     +ISO A3 - A7, B4 - B7, C4 - C7; JIS B4 - B8;

+ +

                                                                                                                                                                               +US Ledger, Legal, Letter, Executive and Statement;

+ +

                                                                                                                                                                               +TWSS_NONE

+ +

                                                                                +Other:                          +          ISO A3 - A10, B4 - B10, +C4 - C10; JIS B4 - B10; US Ledger, Legal,      

+ +

                                                                                                                                +Letter, Executive and Statement; TWSS_NONE

+ +

                                                                +Default: Letter for U.S., ISO A4 for Metric

+ +

-  If +ICAP_FRAMES or DAT_IMAGELAYOUT are set, then this capability will revert to +TWSS_NONE.

+ +

 

+ +

CAP_THUMBNAILSENABLED               +Unsupported.

+ +

 

+ +

CAP_TIMEBEFOREFIRSTCAPTURE      +Unsupported.

+ +

 

+ +

CAP_TIMEBETWEENCAPTURES          +Unsupported.

+ +

 

+ +

CAP_TIMEDATE                                    +Standard: All Models

+ +

                                                                +Allowed: TW_STR32 of the form YYYY/MM/DD HH:MM:SS.sss

+ +

                                                                +Default: (none)

+ +

-  +For reasons of efficiency the Source does not use the scanner clock to supply +this time for the 3000/4000 Series, but instead uses the Host computer's +clock.  This may be changed in future.

+ +

 

+ +

CAP_TOGGLEPATCH +                          +Custom: i280/i600/i700/i800/i1400/i1800/i3000/i4000/i5000

+ +

                                                                +Allowed: TWTP_DISABLED, TWTP_BOTHSIDE, TWTP_FRONTSIDE (except i600/i700), +TWTP_SAMESIDE, TWTP_DETECTONLY

+ +

                                                                +Default: TWTP_DISABLED

+ +

-  +Controls recognition of the color patch.

+ +

-  +For i1800 when in IA mode TWTP_SAMESIDE is unsupported, otherwise +TWTP_FRONTSIDE is unsupported

+ +

 

+ +

CAP_TRANSPORTAUTOSTART           +Custom: All Models (except for i30/i40/i55/i65/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: i900/i1100/i1200/i1300/i1400/i2000 TRUE (readonly)

+ +

                                                                               +Other FALSE, TRUE

+ +

                                                                +Default: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000 TRUE

+ +

                                                                             +Other FALSE

+ +

-  If +set to TRUE the scanner will automatically begin scanning.  If FALSE the +user must press the start button on the scanner console to begin scanning.

+ +

 

+ +

CAP_TRANSPORTTIMEOUT                 +Custom: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed i30/i40/i55/i65:                            +1 - 30 seconds

+ +

                                                                +Allowed 3000/4000/i100/i200:                  +3 - 30 seconds

+ +

                                                                +Allowed i600/i700/i1100/i1200/i1300/i1400/i1800:    +0 (disabled), 1 - 300 seconds

+ +

                                                                +Allowed i800:                                              0 (disabled), 5 - 300 seconds

+ +

                                                                +Allowed i900/i2000/i2900/i3000/i4000/i5000: 0 +(disabled), 1 - 120 seconds

+ +

                                                                +Default i30/i40/i55/i65/i1100/i1200/i1300: 1

+ +

                                                                +Default i2900/i3000/i4000/i5000:               5

+ +

                                                                +Default 3000/4000/i100/i200/i1400:           +8

+ +

                                                                +Default i600/i700/i1800: +                 +         15

+ +

                                                                +Default i800:                                             10

+ +

                                                                +Default i900/i2000:                                     0

+ +

-  +This controls the number of seconds the scanner transport will attempt to feed +paper before it times out and stops.  The 8xx modules will then apply the +timeout response.  The 3xxx/4xxx unconditionally end the session (see +CAP_FEEDERKEEPALIVE).

+ +

 

+ +

CAP_TRANSPORTTIMEOUTRESPONSE

+ +

                                                                +Custom: All Models (except for i30/i40/i55/i65/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed i600/i700/i800/i1800/i2900/i3000/i4000/i5000: +TWTR_STOPFEEDER, TWTR_ENDOFJOB

+ +

                                                                +Allowed i900/i1100/i1200/i1300/i1400/i2000: +TWTR_ENDOFJOB

+ +

                                                                +Default i600/i700/i800/i1800: TWTR_STOPFEEDER

+ +

                                                                +Default i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000: +TWTR_ENDOFJOB

+ +

                                                                +-  Determines the action taken when the scanner transport times out.

+ +

 

+ +

CAP_UICONTROLLABLE                      +Standard: All Models (Except for i2000/i4000/i5000)

+ +

                                                                +Allowed: TRUE

+ +

                                                                +Default: TRUE

+ +

- + This is a read-only capability.

+ +

 

+ +

CAP_ULTRASONICSENSITIVITY          +Custom: i100/i200/i600/i700/i800/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000 Series

+ +

                                                                +Allowed: TWUSS_DISABLED, TWUSS_LOW, TWUSS_MEDIUM, TWUSS_HIGH

+ +

                                                                +Default: TWUSS_DISABLED

+ +

                                                                +-  Controls the use and sensitivity of the ultrasonic multifeed +detection system.

+ +

  

+ +

CAP_ULTRASONICSENSORCENTER    Custom: +i600/i700/i1800/i4000/i5000 Series

+ +

                                                                +Allowed i600/i700/i1800/i4000: TWUO_DISABLED, +TWUO_ENABLED

+ +

                                                                +Allowed i5000: TWUO_DISABLED, TWUO_ENABLED, TWUO_IGNOREZONE

+ +

                                                                +Default: TWUO_ENABLED

+ +

                                                                +-  Controls  the center ultrasonic multifeed +detection sensor.

+ +

                                                               + -  If the current value is set to +TWUO_IGNOREZONE then the height of the area to be ignored is controlled by

+ +

                                                                +CAP_ULTRASONICSENSORZONEHEIGHT.

+ +

 

+ +

CAP_ULTRASONICSENSORLEFT         +Custom: i600/i700/i1800/i4000/i5000 Series

+ +

                                                                +Allowed i600/i700/i1800/i4000: TWUO_DISABLED, TWUO_ENABLED

+ +

                                                                +Allowed i5000: TWUO_DISABLED, TWUO_ENABLED, TWUO_IGNOREZONE

+ +

                                                                +Default i600/i700/i1800/i4000: TWUO_ENABLED

+ +

                                                                +Default i5000: +TWUO_DISABLED

+ +

                                                                +-  Controls  the left ultrasonic multifeed +detection sensor.

+ +

                                                                +-  If the current value is set to TWUO_IGNOREZONE then the height of the +area to be ignored is controlled by

+ +

                                                                +CAP_ULTRASONICSENSORZONEHEIGHT.

+ +

 

+ +

CAP_ULTRASONICSENSORLEFTCENTER

+ +

    +                                                            +Custom: i5000 Series

+ +

                                                                +Allowed TWUO_DISABLED, TWUO_ENABLED, TWUO_IGNOREZONE

+ +

                                                                +Default: TWUO_ENABLED

+ +

                                                                +-  Controls  the left center ultrasonic multifeed +detection sensor.

+ +

                                                                +-  If the current value is set to TWUO_IGNOREZONE +then the height of the area to be ignored is controlled by

+ +

                                                                +CAP_ULTRASONICSENSORZONEHEIGHT.

+ +

 

+ +

CAP_ULTRASONICSENSORRIGHT       +Custom: i600/i700/i1800/i4000/i5000 Series

+ +

                                                                +Allowed i600/i700/i1800/i4000: TWUO_DISABLED, +TWUO_ENABLED

+ +

                                                                +Allowed i5000: TWUO_DISABLED, TWUO_ENABLED, TWUO_IGNOREZONE

+ +

                                                                +Default i600/i700/i1800/i4000: TWUO_ENABLED

+ +

                                                                +Default i5000: +TWUO_DISABLED

+ +

                                                                +-  Controls  the right  ultrasonic multifeed +detection sensor.

+ +

                                                                +-  If the current value is set to +TWUO_IGNOREZONE then the height of the area to be ignored is controlled by

+ +

                                                                +CAP_ULTRASONICSENSORZONEHEIGHT.

+ +

 

+ +

CAP_ULTRASONICSENSORRIGHTCENTER

+ +

                                                                +Custom: i5000 Series

+ +

                                                               Allowed: TWUO_DISABLED, +TWUO_ENABLED, TWUO_IGNOREZONE

+ +

                                                                +Default: TWUO_ENABLED

+ +

                                                                +-  Controls  the right center  ultrasonic multifeed +detection sensor.

+ +

                                                                +-  If the current value is set to +TWUO_IGNOREZONE then the height of the area to be ignored is controlled by

+ +

                                                                +CAP_ULTRASONICSENSORZONEHEIGHT.

+ +

 

+ +

CAP_ULTRASONICSENSORZONEHEIGHT     

+ +

                                                                +Custom: i5000 +Series

+ +

                                                                +Allowed: Scanner specific

+ +

                                                                +Default: Scanner specific

+ +

                                                                +-  Height of zone for CAP_ULTRASONICSENSOR*s that are set to +TWUO_IGNOREZONE. There is one height that applies to all sensors set to

+ +

                                                                +TWUO_IGNOREZONE.

+ +

 

+ +

CAP_WINDOW                +                       +Custom: i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: TWWW_BASE

+ +

                                                                +Default: TWWW_BASE

+ +

-  +(TBD).

+ +

 

+ +

CAP_WINDOWCAMERA                        +Custom: i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: TWWC_BASE_BITONAL_FRONT, TWWC_BASE_BITONAL_REAR, TWWC_BASE_COLOR_FRONT +and TWWC_BASE_COLOR_REAR

+ +

                                                                +Default: TWWC_BASE_BITONAL_FRONT

+ +

-  +(TBD).

+ +

 

+ +

CAP_WINDOWPOSITION                       +Custom: All Models (except for i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: A TW_FRAME value with valid settings for Top and Left

+ +

                                                                +Default: 0 0

+ +

-  +This controls the location of the Source's GUI on the user's screen.  Only +the location can be selected, the Right and Bottom values are ignored.

+ +

 

+ +

CAP_XFERCOUNT                                 +Standard: All Models

+ +

                                                                +Allowed: 5000/7000/9000: -1

+ +

                                                                +Allowed: Other: -1, 1 to 37267

+ +

                                                                +Default: -1

+ +

-  +This capability indicates the number of images to scan, not the number of +sheets of paper, so in duplex mode a single sheet of paper generates two +images.

+ +

-  +When set to -1 the scanner runs in batch mode.

+ +

-  When set to 0 +it will reset to 1 since zero is invalid xfercount.

+ +

-  +All models (except for 5000/7000/9000):  For values greater than 0, +the scanner uses page on demand mode so that it can get exactly the number of +images requested.  Please note that in this mode the scanner may scans +each page separately, which could reduce its potential throughput.

+ +

-  +See CAP_AUTOSCAN.

+ +

 

+ +
+
+ +

5.       +ICAP_ Capabilites

+ +

 

+ +

 

+ +

ICAP_ADDBORDER                                +Custom: All Models (except for i30/i40/i55/i65/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  If +set to TRUE a 16-pixel border will be added on all sides of the image.

+ +

 

+ +

ICAP_AUTOBRIGHT                              +Unsupported.

+ +

 

+ +

ICAP_AUTOCOLORAMOUNT               +Custom: All Models (except for i30/i40/i55/i65/i200/i800/i900/i1100/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: 1 to 200

+ +

                                                                +Default: 1

+ +

                                                               - +This capability only available for ICAP_AUTOCOLORCONTENT set to Custom.

+ +

 

+ +

ICAP_AUTOCOLORCONTENT +             +Custom: All Models (except for i30/i40/i55/i65/i200/i800/i900/i1100/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: None, +Low, Medium, High and Custom

+ +

                                                                +Default: None

+ +

                                                                +- The documents require amount of color to be saved as color.

+ +

 

+ +

ICAP_AUTOCOLORTHRERSHOLD       +Custom: All Models (except for i30/i40/i55/i65/i200/i800/i900/i1100/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: 0 to 100

+ +

                                                                +Default: i2000/i4000/i5000: 50

+ +

                                                                            + Other: 20

+ +

                                                               - +This capability only available for ICAP_AUTOCOLORCONTENT set to Custom.

+ +

 

+ +

ICAP_AUTOMATICBORDERDETECTION

+ +

                                                                +Standard: All Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

                                                                +- Setting is machine dependent with the 3520 (not side selectable)

+ +

 

+ +

ICAP_AUTOMATICCOLORENABLED   Standard: +i2000/i5000

+ +

                                                                +Allowed: TRUE, FALSE

+ +

                                                                +Default: FALSE

+ +

-   Automatically +detects the pixel type of the image and returns either a color image or a +non-color image.

+ +

 

+ +

ICAP_AUTOMATICCOLORNONCOLORPIXELTYPE

+ +

                                                            +    +Standard: i2000/i5000

+ +

                                                                +Allowed: TWPT_BW

+ +

                                                                +Default: TWPT_BW

+ +

-   Specifies +the non-color pixel type to use when automatic color is enabled.

+ +

 

+ +

ICAP_AUTOMATICDESKEW                 +Standard: All +Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

                                                                +- Setting is machine dependent with the 3520 (not side selectable)

+ +

 

+ +

ICAP_AUTOMATICLENGTHDETECTION

+ +

                                                             +   +Standard: i2000/i5000

+ +

                                                                +Allowed: TRUE

+ +

                                                                +Default: TRUE

+ +

-   Controls +the automatic detection of the length of a document.

+ +

 

+ +

ICAP_AUTOMATICROTATE                Standard: i700/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

                                                                +- If Automatic orthogonal rotation is supported (see Orthogonal Rotation), as +well Auto-crop and Deskew (see Cropping),

+ +

                                                                +then the TWAIN feature Automatic Rotate is also +supported (ICAP_AUTOMATICROTATE).

+ +

 

+ +

ICAP_BACKGROUNDADJUSTAGGRESSIVENESS

+ +

                                                                +Custom: i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: -10 to 10

+ +

                                                                +Default: 0

+ +

- The +background color adjustment aggressiveness.

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_BACKGROUNDADJUSTAPPLYTO

+ +

                                                                +Custom: i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: TWBA_ALL,TWBA_NEUTRAL,TWBA_PREDOMINATE

+ +

                                                                +Default: TWBA_PREDOMINATE

+ +

- The +background color adjustment apply to.

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_BACKGROUNDADJUSTMODE

+ +

                                                                +Custom: i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: i1200/i1300/i1400:  TWBS_NONE,TWBS_AUTOMATIC,TWBS_CHANGETOWHITE

+ +

                                                                               +Other:                     TWBS_NONE,TWBS_AUTOMATICBASIC,TWBS_AUTOMATIC

+ +

                                                                +Default: TWCL_NONE

+ +

- The +background smoothing mode.

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_BARCODEDETECTIONENABLED

+ +

                                                                +Unsupported.

+ +

 

+ +

ICAP_BARCODEMAXRETRIES              +Unsupported.

+ +

 

+ +

ICAP_BARCODEMAXSEARCHPRIORITIES

+ +

                                                                +Unsupported.

+ +

 

+ +

ICAP_BARCODESEARCHMODE            +Unsupported.

+ +

 

+ +

ICAP_BARCODESEARCHPRIORITIES   Unsupported.

+ +

 

+ +

ICAP_BARCODETIMEOUT                    +Unsupported.

+ +

 

+ +

ICAP_BITDEPTH                                    +Standard: All Models

+ +

                                                                +Allowed: All allow 1, all allow 24 and 8 (except 3500/3510/3520/i610/i810/i830)

+ +

                                                                +Default: 24 if color is supported, otherwise 1 (3590 is 1, i610 +is 8)

+ +

-  1 +only for /Camera_Bitonal_Both, /Camera_Bitonal_Top, +/Camera_Bitonal_Bottom (ICAP_PIXELTYPE == TWPT_BW).

+ +

-  8 +only for /Camera_Color_Both, /Camera_Color_Top, +/Camera_Color_Bottom (ICAP_PIXELTYPE == TWPT_GRAY).

+ +

-  24 +only for /Camera_Color_Both, /Camera_Color_Top, +/Camera_Color_Bottom (ICAP_PIXELTYPE == TWPT_RGB).

+ +

-  Please +refer to the ICAP_PIXELTYPE section of faq.htm for more +information.

+ +

 

+ +

ICAP_BITDEPTHREDUCTION                +Standard: All Models

+ +

                                                                +Allowed: TWBR_THRESHOLD and TWBR_HALFTONES. TWBR_DIFFUSION (i600 only)

+ +

                                                                +Default: TWBR_HALFTONES

+ +

-  +Capability is only available for /Camera_Bitonal_Both, +/Camera_Bitonal_Top and /Camera_Bitonal_Bottom +(ICAP_PIXELTYPE == TWPT_BW).

+ +

 

+ +

ICAP_BITORDER                                    +Standard: All Models

+ +

                                                                +Allowed: TWBO_MSBFIRST

+ +

                                                                +Default: (same as allowed)

+ +

 

+ +

ICAP_BITORDERCODES                        +Standard: All Models

+ +

                                                                +Allowed: TWBO_MSBFIRST

+ +

                                                                +Default: (same as allowed)

+ +

 

+ +

ICAP_BRIGHTNESS                               +Standard: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: -1000 +to -1000 step 20

+ +

                                                                +Default: 0

+ +

- This capability is only available for /Camera_Color_Both, +/Camera_Color_Top and /Camera_Color_Bottom.

+ +

- This is ignored if +ICAP_COLORBRIGHTNESSMODE is set to TWCBR_AUTOMATIC

+ +

 

+ +

ICAP_CCITTKFACTOR                         +Standard: 3000/4000/5000/7000/9000

+ +

                                                                +Allowed: 0 to 255

+ +

                                                                +Default: 4

+ +

-  Capability +is only available if ICAP_COMPRESSION is set to TWCP_GROUP32D.

+ +

 

+ +

ICAP_COLORBALANCEAUTOMATICAGGRESSIVENESS        Custom: +i900/i2000/i2900/i3000

+ +

                                                                +Allowed: -2 to 2 step 1

+ +

                                                                +Default: 0

+ +

- Indicates +how aggressive the automatic white balance will be.

+ +

- This is only available when ICAP_COLORBALANCEMODE set to +TWCBM_AUTOMATICADVANCED.

+ +

 

+ +

ICAP_COLORBALANCEBLUE              +Custom: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: -1000 +to 1000 step 20

+ +

                                                                +Default: 0

+ +

- Allow +the user to adjust the color balance blue.

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_COLORBALANCEGREEN            +Custom: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: -1000 +to 1000 step 20

+ +

                                                                +Default: 0

+ +

- Allow +the user to adjust the color balance green.

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_COLORBALANCEMODE             +Custom: i900/i2000/i2900/i3000/i5000

+ +

                                                                +Allowed: i5000:        TWCBM_NONE, +TWCBM_MANUAL

+ +

                                                                               +Others:     TWCBM_NONE, +TWCBM_MANUAL, TWCBM_AUTOMATICBASIC, TWCBM_AUTOMATIC

+ +

                                                                +Default: i5000:           +TWCBM_NONE

+ +

                                                                             +Others:        TWCBM_AUTOMATICBASIC

+ +

- Allows +the user to select the method for adjusting the color balance of a color image

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_COLORBALANCERED                 +Custom: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: -1000 +to 1000 step 20

+ +

                                                                +Default: 0

+ +

- Allow +the user to adjust the color balance red.

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_COLORBRIGHTNESSMODE        Custom: +i900/i2000/i2900/i3000/i5000

+ +

                                                                +Allowed: i5000:        TWCBR_NONE, +TWCBR_MANUAL

+ +

                                                                               +Others:     TWCBR_NONE, +TWCBR_MANUAL, TWCBR_AUTOMATICBASIC

+ +

                                                                +Default: i5000:          +TWCBR_NONE

+ +

                                                                             +Others:       +TWCBR_AUTOMATICBASIC

+ +

- Allows +the user to select the method for adjusting the brightness and contrast of a +color or grayscale image

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_COLORSHARPEN                      +Custom: i900/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: 0 - 3

+ +

                                                                +Default: 1

+ +

-  +Apply sharpening to image - 0 indicates no sharpening. 1 is normal, 2 is more +sharpening, and a value of 3 applies a lot of sharpening.

+ +

- Only available for color camera.

+ +

 

+ +

ICAP_COLORSHARPENING                  +Custom: 3590/4500/i820/i840/i1800

+ +

                                                                +Allowed: TWCS_NONE, TWCS_3X3FIRFILTER

+ +

                                                                +Default: TWCS_3X3FIRFILTER

+ +

-  +Capability is only available for ICAP_PIXELTYPE == TWPT_RGB or TWPT_GRAY.

+ +

-  +Capability is only available if ICAP_COMPRESSION is TWCP_JPEG.

+ +

 

+ +

ICAP_COLORTABLE                             +Custom: All Models (except for 5000/7000/9000/i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: TWCT_UNKNOWN, TWCT_DEFAULT, TWCT_FILE01 - 60

+ +

                                                                +Default: (determined from the scanner)

+ +

-  +Allows the application to select the color table.  Applications should +only try to set the TWCT_FILE values.  See the DAT_COLORTABLE operation +for a way to map the display strings to the various ICAP_COLORTABLE values.

+ +

 

+ +

ICAP_COMPRESSION                           +Standard: All Models

+ +

                                                                +Allowed: 3000/4000/5000/7000/9000:    +TWCP_NONE, TWCP_GROUP31D, TWCP_GROUP32D, TWCP_GROUP4, TWCP_JPEG

+ +

                                                                               +Other:    +                                  +TWCP_NONE, TWCP_GROUP4, TWCP_JPEG

+ +

                                                                +Default: TWCP_NONE

+ +

-  TWCP_NONE, +TWCP_GROUP31D, TWCP_GROUP32D, TWCP_GROUP4 only for /Camera_Bitonal_Both, +/Camera_Bitonal_Top and /Camera_Bitonal_Bottom +(ICAP_PIXELTYPE == TWPT_BW).

+ +

-  +TWCP_NONE, TWCP_JPEG only for /Camera_Color_Top +(ICAP_PIXELTYPE == TWPT_RGB or TWPT_GRAY).

+ +

- Please refer to the +ICAP_COMPRESSION section of faq.htm +for more information.

+ +

These applications are +known to not support compression while scanning images (though they may support +it in other areas)...

+ +

[NoCompression]

+ +

N0=Adobe Adam Adobe Acrobat Scan v1.0

+ +

N1=Adobe Systems Inc. +Application Division Photoshop v1.0

+ +

N2=Adobe Systems Inc. +Application Division Photoshop v1.31

+ +

N3=Eastman Software, +Inc. Imaging for Windows Imaging v3.6

+ +

N4=Media Cybernetics, +L.P. Scanning Utilities Microsoft Imager v2.0

+ +

N5=Wang Laboratories, +Inc. OPEN/image v3.6

+ +

N6=Wang Laboratories, +Inc. OPEN/image Imaging v3.6

+ +

N7=Xerox PerfectScan API Scanner Diagnostic v1.0

+ +

N8=Adobe Adobe v1.0

+ +

These applications are +known to support compression while scanning images. Therefore the GUI will +remember the last user settings for them

+ +

[YesCompression]

+ +

N0=Kodak Digital +Science Scanner Validation Tool v.*

+ +

N1=Kodak Digital +Science TWAIN Test Tool v.*

+ +

 

+ +

ICAP_CONTRAST                                  +Standard: All Models

+ +

                                                                +Allowed: 5000/7000/9000:  -980 to 1000 in steps of +10  

+ +

                                                                               +Other:              +-1000 to +-1000 step 20

+ +

                                                                +Default: 5000/7000/9000: 240

+ +

                                                                             +Other:                 +0

+ +

- For +i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000, the +capability is available for all cameras

+ +

- For other scanner, the capability is only available for /Camera_Bitonal_Both, /Camera_Bitonal_Top +and /Camera_Bitonal_Bottom (ICAP_PIXELTYPE == +TWPT_BW)

+ +

- This is ignored if +ICAP_COLORBRIGHTNESSMODE is set to TWCBR_AUTOMATIC.

+ +

 

+ +

ICAP_CROPPINGMODE                         +Custom: All Models (except for 3000/4000/5000/7000/9000)

+ +

Allowed i200:            TWCR_AUTOMATICBORDERDETECTION, +TWCR_AGGRESSIVE, TWCR_TRANSPORT, TWCR_DOCUMENT,TWCR_CONTINUOUS

+ +

             i1400/i3000: +TWCR_AUTOMATICBORDERDETECTION, TWCR_AGGRESSIVE, TWCR_TRANSPORT, +TWCR_DOCUMENT,TWCR_CONTINUOUS, TWCR_PHOTO, TWCR_PHOTOINROI

+ +

             i4000/i5000: +TWCR_AUTOMATICBORDERDETECTION, TWCR_AGGRESSIVE, TWCR_TRANSPORT, TWCR_DOCUMENT, +TWCR_PHOTO,                         +TWCR_PHOTOINROI

+ +

             Other:         TWCR_AUTOMATICBORDERDETECTION, +TWCR_AGGRESSIVE, TWCR_TRANSPORT, TWCR_DOCUMENT

+ +

                                                                +Default i200:    TWCR_TRANSPORT. (i280- TWCR_AUTOMATICBORDERDETECTION)

+ +

                                                                            +Other: TWCR_AUTOMATICBORDERDETECTION

+ +

-  +Specifies the mechanism used to crop the image data.

+ +

 

+ +

ICAP_CUSTHALFTONE                         +Unsupported.

+ +

 

+ +

ICAP_DOCUMENTTYPE                        +Custom: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

Allowed: +TWDT_PHOTO, TWDT_TEXTWITHGRAPHICS, TWDT_TEXTWITHPHOTO, TWDT_TEXT

+ +

                                                                +Default: TWDT_TEXTWITHGRAPHIC

+ +

- Allows +user to select the type of document being scanned.

+ +

 

+ +

ICAP_ECDO                                            +Custom: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: TWCD_UNKNOWN, TWCD_NONE, TWCD_FILE01 - 60

+ +

                                                                +Default: None

+ +

-  +Allows user to select the ECDO color for bitonal/gray +camera.

+ +

 

+ +

ICAP_ECDOAGGRESSIVENESS            +Custom: i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: -10 +to 10

+ +

                                                                +Default: 0

+ +

                                                                +- Change the amount of multi-color dropout applied to a bitonal image..

+ +

 

+ +

ICAP_ECDOTREATASCOLOR              +Custom: i1400

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +Allows you to indicate that a color other than black or dark blue ink was used +for the data entered on the form.

+ +

This is +not available when ECDO is set to (none). This feature is not available for all +models.

+ +

 

+ +

ICAP_EXPOSURETIME                          +Unsupported.

+ +

 

+ +

ICAP_EXTIMAGEINFO                           +Standard: All Models

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

                                                                + 

+ +

ICAP_FILTER                                         +Unsupported.

+ +

 

+ +

ICAP_FILTERBACKGROUND                 +Custom: All Models (except for 900/3000/5000/7000/9000/i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: 0 - 255

+ +

                                                                +Default: 245

+ +

                                                                +-  Capability is only available for TWPT_BW or +(on some systems) TWPT_GRAY.

+ +

-  +Selects the grayscale value used to replace the filtered color.

+ +

 

+ +

ICAP_FILTERENUM                               +Custom: All Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: TWFT_NONE, TWFT_RED, TWFT_GREEN, TWFT_BLUE

+ +

                                                                +Default: TWFT_NONE

+ +

                                                                +-  Capability is only available for TWPT_BW or +(on some systems) TWPT_GRAY.

+ +

-  +Selects the color that will be filtered.

+ +

 

+ +

ICAP_FILTERPROCESSING                   +Custom: i600 Series

+ +

                                                                +Allowed: TWFP_NORMAL, TWFP_LOWRES

+ +

                                                                +Default: TWFP_NORMAL

+ +

-  If +color dropout at low resolutions results in unwanted artifacts, try changing +this capability to TWFP_LOWRES

+ +

 

+ +

ICAP_FILTERTHRESHOLD                    +Custom: All Models (except for 900/3000/5000/7000/9000/i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: 0 - 255

+ +

                                                                +Default: 175

+ +

                                                                +-  Capability is only available for TWPT_BW or +(on some systems) TWPT_GRAY.

+ +

-  +Specified the threshold past which color filtering will be applied.

+ +

 

+ +

ICAP_FLASHUSED                                 +Unsupported.

+ +

 

+ +

ICAP_FLASHUSED2                               +Unsupported.

+ +

 

+ +

ICAP_FLIPBACKGROUNDCOLOR        +Custom: 5000/7000

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  If +TRUE then the background color on the left and right of the image will be +reversed from black to white (or white to black).

+ +

 

+ +

ICAP_FLIPROTATION                           +Unsupported.

+ +

 

+ +

ICAP_FORCECOMPRESSION                +Custom: 3000/4000/5000/7000/9000/i600/i700/i800/i1800

+ +

                                                                +Allowed: TWCP_NONE, TWCP_GROUP4, TWCP_JPEG

+ +

                                                                +Default: TWCP_NONE

+ +

-  +Force Compression is ignored if the value of ICAP_COMPRESSION for the same +camera is any value but TWCP_NONE.

+ +

-  +TWCP_NONE, TWCP_GROUP4 only for /Camera_Bitonal_Both, +/Camera_Bitonal_Top and /Camera_Bitonal_Bottom +(ICAP_PIXELTYPE == TWPT_BW).

+ +

-  +TWCP_NONE, TWCP_JPEG only for /Camera_Color_Both, /Camera_Color_Top and /Camera_Color_Bottom +(ICAP_PIXELTYPE == TWPT_RGB or TWPT_GRAY).

+ +

 

+ +

ICAP_FOREGROUNDBOLDNESSAGGRESSIVENESS

+ +

                                                                +Custom: i2900/i3000

+ +

                                                                +Allowed: -10 to 10

+ +

                                                                +Default: 0

+ +

- The +foreground boldness aggressiveness.

+ +

- Only available for color/gray cameras.

+ +

- Only has +meaning if ICAP_FOREGROUNDBOLDNESSMODE

+ +

  is TWFB_AUTOMATIC.

+ +

 

+ +

ICAP_FOREGROUNDBOLDNESSMODE

+ +

                                                                +Custom: i2900/i3000

+ +

                                                                +Allowed: TWFB_NONE,TWFB_AUTOMATICBASIC,TWFB_AUTOMATIC

+ +

                                                                +Default: TWFB_NONE

+ +

- The +foreground boldness mode.

+ +

- Only available for color/gray cameras.

+ +

 

+ +

ICAP_FRAMELENGTHCONTROL          +Custom: 5000/7000 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

-  +Set to FALSE if scanning documents that have ragged bottom edges that are not +otherwise scanned properly.

+ +

 

+ +

ICAP_FRAMES                                       +Standard: All Models

+ +

                                                                +Allowed: 1 frame per camera within the boundaries set by the min and max width +and length capabilities

+ +

                                                                +Default: the values associated with ICAP_SUPPORTEDSIZES TWSS_ISOA4.

+ +

                                                              +  - Please refer to the Width and Length Alignment section of faq.htm for more information.

+ +

 

+ +

ICAP_FRAMESANGLE                           Custom: +i2000/i2900/i3000/i4000/i5000
+Allowed: 1 frame per camera within the boundaries set by the min and max width +and length capabilities
+Default: the values associated with ICAP_SUPPORTEDSIZES TWSS_ISOA4.
+- This capability is the same as ICAP_FRAMES except it includes angle.

+ +

 

+ +

ICAP_GAMMA                                       +Unsupported.

+ +

 

+ +

ICAP_GAMMAENABLED +                      +Custom: i600/i700/i800/i1800/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

-  A +value of TRUE causes the scanner to apply its gamma table to the image.  +This only has meaning for the grayscale output.

+ +

 

+ +

ICAP_GRAYSCALE                               +Custom: All Models (except for 3000/4000/5000/7000/9000)

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default:  FALSE

+ +

-    Modifies +the output of the associated color camera to be grayscale content only.

+ +

-    Only for /Camera_Color_Both, /Camera_Color_Top +and /Camera_Color_Bottom

+ +

-    For i610 +this is read only and TRUE.

+ +

-    Please see +the ICAP_PIXELTYPE section of faq.htm.

+ +

 

+ +

ICAP_HALFTONES                                +Standard: All Models

+ +

                                                                +Allowed:  +“Auto +ATP”                              +iThresholding (All +models except for 3000/4000/5000/7000/9000)

+ +

      +                                                                          +“Adaptive Thresholding”         +ATP

+ +

                +        +                                                        +“Fixed Thresholding

+ +

                +        +                                                        +“64-Level Bayer Dither”

+ +

        +                                                                        +“64-Level 45-Degree Cluster Dot”

+ +

        +                                                                        +“64-Level Disperse Dot”

+ +

        +                                                                        +“Error +Diffusion”                      +(i800 only)

+ +

        +                                                                        +“ChromaTHR(TM)”                   +(3590/4500 only)

+ +

        +                                                                        +“Diffusion: 3  +Screen”             +(i800 only)

+ +

        +                                                                        +“Diffusion: 16 Screen”            (i800 +only)

+ +

        +                                                                        +“Diffusion: 32 +Screen”            (i800 +only)

+ +

        +                                                                        +“Diffusion: 64 Screen”            (i800 +only)

+ +

        +                                                                        +“Diffusion: 4  Bayer”    +           (i800 +only)

+ +

        +                                                                        +“Diffusion: 16 Bayer”    +          (i800 only)

+ +

        +                                                                        +“Diffusion: 64 Bayer”   +           (i800 +only)

+ +

        +                                                                        +“3-Level Screen”

+ +

        +                                                                        +“16-Level Screen”

+ +

        +                                                                        +“32-Level Screen”

+ +

        +                                                                        +“64-Level Screen”

+ +

                +        +                                                        +“4-Level Bayer Dither”

+ +

                +        +                                                        +“16-Level Bayer Dither”

+ +

                                                                               + i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2900/i3000/i4000/i5000:   

+ +

                                                                                                                  +“Auto +ATP”                              +iThresholding

+ +

      +                                                                                                            +“Adaptive Thresholding”         +ATP

+ +

                +        +                                                                                          +“Fixed Thresholding

+ +

                                                                +Default:   3000/4000/5000/7000/9000:   "Adaptive Thresholding"

+ +

                                                                                + Other:                                  +“Auto ATP”

+ +

-  +Halftones are not easily represented within TWAIN since the number of +algorithms is too large and varied to accommodate any simple system of +classification.  To properly represent halftones an application must +present the array of TW_STR32s to the user as-is, with no attempt at interpreting +the data.

+ +

-  +Capability is only available for /Camera_Bitonal_Both, +/Camera_Bitonal_Top and /Camera_Bitonal_Bottom +(ICAP_PIXELTYPE == TWPT_BW).

+ +

 

+ +

ICAP_HALFTONESQUALITY                 +Custom: 3590/4500 Series

+ +

                                                                +Allowed (no THR2(tm) card): TWHQ_SOFTWAREFAST, TWHQ_SOFTWAREBEST

+ +

                                                                +Allowed (THR2(tm) card): TWHQ_HARDWAREBEST

+ +

                                                                +Default (no THR2(tm) card): TWHQ_SOFTWAREFAST

+ +

                                                                +Default (THR2(tm) card): TWHQ_HARDWAREBEST

+ +

-  +Determiners the ChromaTHR(tm) algorithm to be used to +binarize the color data from the scanner.

+ +

 

+ +

ICAP_HIGHLIGHT                                  +Unsupported.

+ +

 

+ +

ICAP_HOLEFILLENABLED                    +Custom: i1200/i1300/i2000/i2900/i3000

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

                                                                +- Hole Fill enabled/disabled. If TRUE, then remove “punch holes” in the original document from the +resultant image.

+ +

 

+ +

ICAP_IMAGEDATASET                         +Unsupported.

+ +

  

+ +

ICAP_IMAGEEDGEBOTTOM                 +Custom: i30/i40/i55/i65/i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000

+ +

                                                                +Allowed: 0 to ICAP_PHYSICALHEIGHT

+ +

                                                                +Default: 0

+ +

-  +Amount of fill for the bottom edge of the image.

+ +

 

+ +

ICAP_IMAGEEDGEFILL                         +Custom: i30/i40/i55/i65/i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000

+ +

                                                                +Allowed: TWIE_NONE, +TWIE_AUTOMATIC, TWIE_AUTOMATICWITHTEAR, TWIE_WHITE, TWIE_BLACK

+ +

                                                                +Default: TWIE_AUTOMATIC if the scanner is supported. Otherwise TWIE_NONE is the +default

+ +

-  +Fill in each edge of the image with the selected color.

+ +

- The TWIE_AUTOMATIC +and TWIE_AUTOMATICWITHTEAR are not available for all scanners.

+ +

 

+ +

ICAP_IMAGEEDGEFILLALLSIDES        +Custom: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000

+ +

                                                                +Allowed: TRUE/FALSE

+ +

                                                                +Default: TRUE

+ +

Amount of fill for the +all size the same as top edge of the image.

+ +

 

+ +

ICAP_IMAGEEDGELEFT                        +Custom: i30/i40/i55/i65/i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000

+ +

                                                                +Allowed: 0 to ICAP_PHYSICALWIDTH

+ +

                                                                +Default: 0

+ +

-  +Amount of fill for the left edge of the image.

+ +

 

+ +

ICAP_IMAGEEDGERIGHT                      +Custom: i30/i40/i55/i65/i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000

+ +

                                                                +Allowed: 0 to ICAP_PHYSICALWIDTH

+ +

                                                                +Default: 0

+ +

-  +Amount of fill for the right edge of the image.

+ +

 

+ +

ICAP_IMAGEEDGETOP          +               +Custom: i30/i40/i55/i65/i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000

+ +

                                                                +Allowed: 0 to ICAP_PHYSICALHEIGHT

+ +

                                                                +Default: 0

+ +

-  +Amount of fill for the top edge of the image.

+ +

 

+ +

ICAP_IMAGEFILEFORMAT                   +Standard: All Models

+ +

                                                                +Allowed: TWFF_BMP, TWFF_TIFF, TWFF_JFIF

+ +

                                                                +Default: TWFF_BMP

+ +

-  +TWFF_BMP, TWFF_TIFF only for /Camera_Bitonal_Both, /Camera_Bitonal_Top and /Camera_Bitonal_Bottom +(ICAP_PIXELTYPE == TWPT_BW).  If compression is used then only TWFF_TIFF +is allowed.

+ +

-  +TWFF_BMP, TWFF_TIFF, TWFF_JFIF only for /Camera_Color_Both, +/Camera_Color_Top and /Camera_Color_Bottom +(ICAP_PIXELTYPE == TWPT_RGB or TWPT_GRAY).  If compression is used then +only TWFF_TIFF and TWFF_JFIF are allowed.

+ +

-  +TWFF_TIFF uses the following tags: NewSubFileType, SubFileType, ImageWidth, ImageLength, BitsPerSample, +Compression, PhotometricInterpretation, FillOrder, StripOffsets, SamplesPerPixel, RowsPerStrip, StripByteCounts, XResolution, YResolution, T4Options, T6Options, ResolutionUnits.

+ +

-  +Please note, TWFF_TIFF with an ICAP_COMPRESSION of TWCP_JPEG results in a JPEG +TIFF file, which is still currently not a well defined or supported format (the +Source is currently following the TIFF 7 guidelines).

+ +

 

+ +

ICAP_IMAGEFILTER                              +Standard: All Models (except for 3000/4000)

+ +

                                                                +Allowed: TWIF_NONE, TWIF_LOWPASS

+ +

                                                                +Default: TWIF_NONE

+ +

                                                                +-  Capability is only available for /Camera_Bitonal_Both, /Camera_Bitonal_Top +and /Camera_Bitonal_Bottom (ICAP_PIXELTYPE == +TWPT_BW).

+ +

 

+ +

ICAP_IMAGEMERGE                              Standard: +i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000

+ +

                                                                +Allowed: TWIM_NONE, TWIM_FRONTONTOP, TWIM_FRONTONBOTTOM, TWIM_FRONTONLEFT, +TWIM_FRONTONRIGHT

+ +

                                                                +Default: TWIM_NONE

+ +

                                                                +-  Merges the front and back images into a single image that is returned +to the application.

+ +

 

+ +

ICAP_IMAGEMERGEHEIGHTTHRESHOLD    

+ +

                                                                +Unsupported.

+ +

  

+ +

ICAP_JPEGPIXELTYPE                         +Standard: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: TWPT_YUV

+ +

                                                                +Default: TWPT_YUV

+ +

-    Capability +is only available for ICAP_PIXELTYPE == TWPT_RGB or TWPT_GRAY and +ICAP_COMPRESSION == TWCP_JPEG.

+ +

 

+ +

ICAP_JPEGQUALITY                             +Standard: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: 0 to 100 in steps of 5

+ +

                                                                +Default: 50

+ +

-  +This is TWAIN 1.9 capability.

+ +

-  +Generally speaking, selecting higher values will result in better quality at the +cost of larger compressed JPEG files.

+ +

 

+ +

ICAP_LAMPSAVER                               +Custom: 3000/4000/i800 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: TRUE

+ +

-  +This is a custom capability.

+ +

-  +Turning this capability on will allow the scanner to turn off the lamps after +ten minutes of inactivity, which extends lamp life and reduces energy +consumption.

+ +

 

+ +

ICAP_LAMPSTATE                               +Unsupported.

+ +

 

+ +

ICAP_LAMPTIMEOUT                           +Custom: 3000/4000/i800 Series

+ +

                                                                +Allowed 3000/4000: 0 (disabled), 10

+ +

                                                                +Allowed i800: 0 (disabled) - 30

+ +

                                                                +Default 3000/4000: 10

+ +

                                                                +Default i800: 20

+ +

-  +This is a custom capability.

+ +

-  +Turning this capability on will allow the scanner to turn off the lamps after +ten minutes of inactivity, which extends lamp life and reduces energy +consumption.

+ +

 

+ +

ICAP_LIGHTPATH                                 +Unsupported.

+ +

 

+ +

ICAP_LIGHTSOURCE                            +Unsupported.

+ +

 

+ +

ICAP_MAXFRAMES                              +Standard: All Models (Except for i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: 1

+ +

                                                                +Default: 1

+ +

-  +This is a read-only capability.

+ +

 

+ +

ICAP_MEDIATYPE                                 +Standard: i900/i1100/i1200/i1300/i1400/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: TWMT_CARDSTOCK, TWMT_GLOSSYPAPER, TWMT_MAGAZINE, +TWMT_PLAINPAPER, TWMT_THINPAPER

+ +

                                                                +Default: TWMT_PLAINPAPER

+ +

- Allows +user to select type of media being scanned. The front and rear camera setting +must be the same.

+ +

 

+ +

ICAP_MINIMUMHEIGHT                        +Standard: All Models

+ +

                                                                +Allowed: 3000/4000/5000/7000/9000/i800:          +2.5"

+ +

                                                                               +Other:                                                    +1”                                              +

+ +

                                                                +Default: (same as allowed)

+ +

-  +This is a read-only capability.

+ +

 

+ +

ICAP_MINIMUMWIDTH                         +Standard: All Models

+ +

                                                               Allowed: +3000/4000/5000/7000/9000/i800:          +2.5"

+ +

                                                                              +Other:                                                    +1” 

+ +

                                                                +Default: (same as allowed)

+ +

-  +This is a read-only capability.

+ +

 

+ +

ICAP_NOISEFILTER                               +Standard: All Models

+ +

                                                                +Allowed: TWNF_NONE, TWNF_LONEPIXEL, TWNF_MAJORITYRULE

+ +

                                                                +Default: i2000/i2900/i3000/i4000/i5000: TWNF_LONEPIXEL

+ +

                                                                             +Other: TWNF_NONE

+ +

                                                                +   

+ +

                                                                +-  Capability is only available for /Camera_Bitonal_Both, /Camera_Bitonal_Top +and /Camera_Bitonal_Bottom (ICAP_PIXELTYPE == +TWPT_BW).

+ +

                                                                +-  TWNF_MAJORITYRULE is not available on the 9xxx Series.

+ +

 

+ +

ICAP_ORIENTATION                              +Standard: All Models

+ +

                                                                +Allowed: TWOR_PORTRAIT, TWOR_LANDSCAPE

+ +

                                                                +Default: TWOR_PORTRAIT

+ +

-  +Please note, that as per the specification, ICAP_ORIENTATION does not change +the values of ICAP_FRAMES or DAT_IMAGELAYOUT.  What it does is affect the +interpretation of these values at the time they are downloaded to the +device.  TWOR_PORTRAIT leaves them unmodified.  TWOR_LANDSCAPE flips +the x and y offsets and the width and height.  If ICAP_SUPPORTEDSIZES is +not equal to TWSS_NONE, then the x-offset will be recalculated to center the +landscaped image.

+ +

 

+ +

ICAP_ORTHOGONALROTATE               Custom: +i2000/i2900/i3000/i5000

+ +

Allowed: +TWOROT_NONE, TWOROT_AUTOMATIC, TWOROT_90, TWOROT_180, TWOROT_270,

+ +

                +TWOROT_AUTOMATIC_90, TWOROT_AUTOMATIC_180, +TWOROT_AUTOMATIC_270

+ +

                                                                +Default: TWOROT_NONE

+ +

- Orthogonal +rotation.

+ +

 

+ +

ICAP_OVERSCAN                                  +Standard: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: TWOV_NONE, TWOV_TOPBOTTOM, TWOV_LEFTRIGHT, TWOV_ALL

+ +

                                                                +Default: TWOV_NONE

+ +

 

+ +

ICAP_OVERSCANX                               +Custom: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: see below

+ +

                                                                +Default: 0.5" or 0.375"

+ +

-  +This capability controls the amount of overscan to +add on the left and right sides of the frame.

+ +

-  +3500  supports 0 to 0.5"

+ +

-  +All others support 0 to 0.375"

+ +

 

+ +

ICAP_OVERSCANY                               +Custom: All Models (except for 5000/7000/9000)

+ +

                                                                +Allowed: see below

+ +

                                                                +Default: 0.5" or 0.375"

+ +

-  +This capability controls the amount of overscan to +add on the top and bottom sides of the frame.

+ +

-  +3500 supports 0 to 0.5"

+ +

-  +All others support 0 to 0.375"

+ +

 

+ +

ICAP_PATCHCODEDETECTIONENABLED

+ +

                                                                +Standard: i800/i1800 Series

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

                                                                +- If TRUE then the requested patch codes will be detected by the scanner.

+ +

 

+ +

ICAP_PATCHCODEMAXRETRIES         +Standard: i800/i1800 Series

+ +

                                                                +Allowed: 1

+ +

                                                                +Default: 1

+ +

                                                                +- Maximum retries allowed.

+ +

                                                                +- This is a read-only capability.

+ +

 

+ +

ICAP_PATCHCODEMAXSEARCHPRIORITIES

+ +

                                                                +Standard: i800/i1800 Series

+ +

                                                                +Allowed: 5

+ +

                                                                +Default: 5

+ +

                                                                +- Number kinds of patch codes detected.

+ +

                                                               +- This is a read-only capability.

+ +

 

+ +

ICAP_PATCHCODESEARCHMODE       +Standard: i800/i1800 Series

+ +

                                                                +Allowed: TWBD_VERT

+ +

                                                                +Default: TWBD_VERT

+ +

                                                                +- Orientation of the patch codes.

+ +

                                                                +- This is a read-only capability.

+ +

 

+ +

ICAP_PATCHCODESEARCHPRIORITIES

+ +

                                                                +Standard: i800/i1800 Series

+ +

                                                                +Allowed: TWPCH_PATCH1, TWPCH_PATCH2,  TWPCH_PATCH3, TWPCH_PATCH4,

+ +

                                                                +  TWPCH_PATCH6, TWPCH_PATCHT2, TWPCH_PATCHT3

+ +

                                                                +Default: TWPCH_PATCH2

+ +

                                                                +- Patch codes we are searching for.

+ +

 

+ +

ICAP_PATCHCODETIMEOUT               +Standard: i800/i1800 Series

+ +

                                                                +Allowed: 1

+ +

                                                                +Default: 1

+ +

                                                                +- Amount of time till attempt fails.

+ +

                                                                +- This is a read-only capability.

+ +

 

+ +

ICAP_PHYSICALHEIGHT                       +Standard: All Models

+ +

                                                                +Allowed   3000/4000: 26"

+ +

                                                                                +5000/7000/9000/i800: 30"

+ +

                                                                                +i30/i40: 14.27” or 34''

+ +

                                                                +                +i100: 17" w/ 64MB or 128MB, +32" w/ more

+ +

                                                                +                +i200: 17" w/ 64MB, 26” w/ 128MB, 32" w/ more or 34'' w/ Long +Document

+ +

                                                                +                +i55/i65/i600/i700/i1100/i1200/i1300/i1400/i1800: 34”

+ +

                                                                                +Other: Scanner specific

+ +

                                                                +Default: (same as allowed)

+ +

-  +This is a read-only capability.

+ +

-  +The driver captures some extra data to reduce clipping, see the product +specification for more information on the scanning dimensions.

+ +

 

+ +

ICAP_PHYSICALHEIGHTADJUST         Custom: +i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: Scanner specific

+ +

                                                                +Default: Scanner specific

+ +

Adjusts the value of +ICAP_PHYSICALHEIGHT. Applications must set this value to have access to the +full scan length of the ADF.

+ +

 

+ +

ICAP_PHYSICALWIDTH                        +Standard: All Models

+ +

                                                                +Allowed  i30/i40: 8.767”

+ +

                                                                               + i55/i65: 8.64''

+ +

                                                                                +i1200/i1300: 8.75''

+ +

                                                                                +i1100: 8.76''

+ +

                                                                                +Other: 12"

+ +

                                                                +Default: (same as allowed)

+ +

-  +This is a read-only capability.

+ +

-  +The driver captures some extra data to reduce clipping, see the product +specification for more information on the scanning dimensions.

+ +

 

+ +

ICAP_PIXELFLAVOR                             +Standard: All Models

+ +

                                                                +Allowed: TWPF_CHOCOLATE, TWPF_VANILLA

+ +

                                                                +Default: TWPF_CHOCOLATE

+ +

-  +This capability is supported for ICAP_PIXELTYPE == TWPT_RGB or TWPT_GRAY since +it is a required capability in the TWAIN specification, but in the case of the +color camera, the value is ignored.

+ +

 

+ +

ICAP_PIXELFLAVORCODES                 +Standard: All Models

+ +

                                                                +Allowed: TWPF_CHOCOLATE, TWPF_VANILLA

+ +

                                                                +Default: TWPF_CHOCOLATE

+ +

-  +Specifies whether the compressed codes’ pixel “sense” will be inverted from the +Current value of ICAP_PIXELFLAVOR prior to transfer

+ +

-    Capability +is only available for ICAP_PIXELTYPE == TWPT_BW and ICAP_COMPRESSION ==TWCP_GROUP4.

+ +

 

+ +

ICAP_PIXELTYPE                                  +Standard: All Models

+ +

                                                                +Allowed: TWPT_BW, TWPT_RGB, TWPT_GRAY

+ +

                                                                +Default: TWPT_BW prior to 4.x, after 4.x TWPT_RGB for color cameras, TWPT_BW +for bitonal cameras.

+ +

-  +TWPT_BW only for /Camera_Bitonal_Both, /Camera_Bitonal_Top and /Camera_Bitonal_Bottom +(ICAP_PIXELTYPE == TWPT_BW).

+ +

-  +TWPT_RGB only for /Camera_Color_Both, /Camera_Color_Top and /Camera_Color_Bottom +(ICAP_PIXELTYPE == TWPT_RGB or TWPT_GRAY).

+ +

-  +Prior to 4.x, changing ICAP_PIXELTYPE is the same as using DAT_FILESYSTEM / +MSG_CHANGEDIRECTORY to select between the /Camera_Bitonal_Both +and /Camera_Color_Both cameras.

+ +

-    TWPT_RGB +is not available for i610.  Default for this model is TWPT_GRAY.

+ +

-  +Please see the ICAP_PIXELTYPE section of faq.htm.

+ +

 

+ +

ICAP_PLANARCHUNKY                        +Standard: All Models

+ +

                                                                +Allowed: TWPC_PLANAR, TWPC_CHUNKY

+ +

                                                                +Default: TWPC_CHUNKY

+ +

-  +This is kind of a weird capability for a pixel type of TWPT_BW to have to worry +about, but this is listed as a mandatory capability, so here it is.

+ +

-  +TWPC_PLANAR or TW_PC_CHUNKY for /Camera_Bitonal_Both, +/Camera_Bitonal_Top and /Camera_Bitonal_Bottom +(ICAP_PIXELTYPE == TWPT_BW).

+ +

-  +TW_PC_CHUNKY only for /Camera_Color_Both, /Camera_Color_Top and /Camera_Color_Bottom +(ICAP_PIXELTYPE == TWPT_RGB and ICAP_PIXELTYPE == TWPT_GRAY).

+ +

 

+ +

ICAP_ROTATION                                   +Standard: All Models (except for i30/i40/i55/i65/3000/4000/5000/7000/9000)

+ +

                                                                +Allowed:  0, 90, 180, 270, 360 (except i600)

+ +

                                                                +Default:    0

+ +

 

+ +

ICAP_SHADOW                                      +Unsupported.

+ +

 

+ +

ICAP_SKEWANGLE                               +Custom: i900/i1100/i1200/i2900/i3000/i1300/i1400/i2000/i4000/i5000

+ +

                                                                +Allowed: -360000 +- 360000

+ +

                                                                +Default: 0

+ +

                                                                +- Selects the deskew angle for fixed cropping.

+ +

 

+ +

ICAP_STREAKREMOVALAGGRESSIVENESS

+ +

                                                            +    Custom: i1200/i1300/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: -2 +to 2

+ +

                                                                +Default: 0

+ +

                                                                +- Streak removal aggressiveness level. -2 is least aggressive while 2 is +most aggressive.

+ +

                                                                +- The aggressiveness level is meaningless if streak +removal ‘enabled’ is FALSE.

+ +

 

+ +

ICAP_STREAKREMOVALENABLED     Custom: i1200/i1300/i2000/i2900/i3000/i4000/i5000

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: i1200/i1300: FALSE

+ +

                                                                             +Other: TRUE

+ +

                                                                +- Streak Removal enabled/disabled. If TRUE, then the streak removal +‘aggressiveness level’ has meaning.

+ +

 

+ +

ICAP_SUPPORTEDBARCODETYPES

+ +

                                                                +Unsupported.

+ +

 

+ +

ICAP_SUPPORTEDEXTIMAGEINFO      +Standard: i2000/i2900/i3000/i5000

+ +

                                                                +Allowed: All supported extended image info

+ +

                                                                +Default: (same as allowed)

+ +

                                                                +- Lists all of the information that the Source is capable of returning from a +call to DAT_EXTIMAGEINFO

+ +

                                                                +- This is a read-only capability.

+ +

 

+ +

ICAP_SUPPORTEDPATCHCODETYPES

+ +

                                                                +Standard: i800/i1800 Series

+ +

                                                                +Allowed: TWPCH_PATCH1, TWPCH_PATCH2,  TWPCH_PATCH3, TWPCH_PATCH4,

+ +

                                                                +  TWPCH_PATCH6, TWPCH_PATCHT2, TWPCH_PATCHT3

+ +

                                                                +- This is a read only capability.

+ +

 

+ +

ICAP_THRESHOLD                                +Standard: All Models

+ +

                                                                +Allowed: 0 to 255

+ +

                                                                +Default: 90

+ +

                                                                +-  Capability is only available for /Camera_Bitonal_Both, /Camera_Bitonal_Top +and /Camera_Bitonal_Bottom (ICAP_PIXELTYPE == +TWPT_BW).

+ +

 

+ +

ICAP_TILES                                           +Unsupported.

+ +

 

+ +

ICAP_TIMEFILL                                     +Unsupported.

+ +

 

+ +

ICAP_UNDEFINEDIMAGESIZE               +Standard: All Models (Except for i2000/i2900/i3000/i4000/i5000)

+ +

                                                                +Allowed: FALSE, TRUE

+ +

                                                                +Default: FALSE

+ +

-  +There is no performance benefit from setting this value to TRUE.

+ +

 

+ +

ICAP_UNITS                                           +Standard: All Models

+ +

                                                                +Allowed: TWUN_INCHES, TWUN_CENTIMETERS, TWUN_PICAS, TWUN_POINTS, TWUN_TWIPS, +TWUN_PIXELS

+ +

-  It +is advised that ICAP_UNITS be set to TWUN_PIXELS any time the Application +desires to know the exact dimensions of an image.

+ +

-  +Selecting TWUN_PIXELS will cause ICAP_XRESOLUTION, ICAP_YRESOLUTION, +ICAP_XNATIVERESOLUTION and ICAP_YNATIVERESOLUTION to report their values as +percentages up from the smallest resolution supported by the current camera.  +For instance, if the current camera supported 200 and 300 DPI, it will report +1.0 and 1.5 when in TWUN_PIXELS.

+ +

 

+ +

ICAP_XFERMECH                                  +Standard: All Models

+ +

                                                                +Allowed: TWSX_NATIVE, TWSX_FILE, TWSX_MEMORY

+ +

                                                                +Default: TWSX_NATIVE

+ +

-  +The Source is designed so that TWSX_MEMORY is the most efficient transfer +available.  All performance benchmarks apply to this transfer mechanism, +and may be less with the other options.

+ +

-  +TWSX_NATIVE transfers are less efficient than TWSX_MEMORY transfers because +they require the Source to flip the image around the x-axis to meet the +requirements of BITMAPs.

+ +

-  +TWSX_NATIVE transfers are less efficient with color images than TWSX_MEMORY +transfers because they require the Source to convert each color pixel from RGB +to BGR.

+ +

-  +Native transfers cannot be used with CCITT compressions.

+ +

-  +Compression is supported for image transfers of TWSX_FILE with an image file +format of TWFF_TIFF.

+ +

-  On +JPEG compression is supported for image transfers of TWSX_FILE with an image +file format of TWFF_TIFF (see faq.htm for more info) and TWFF_JFIF.

+ +

-  +The Source incorrectly allows CCITT compression with an image transfer of +TWSX_FILE and an image file format of TWFF_BMP.

+ +

 

+ +

ICAP_XNATIVERESOLUTION                +Standard: All Models

+ +

                                                                +Allowed: (scanner specific)

+ +

                                                                +Default: (scanner specific)

+ +

- + This is a read-only capability.

+ +

i100/i200/i600/i700/i800/i1800 support +300 only.

+ +

3500/3510/3520 +support 200 and 300, with the current value reflecting the setting of +ICAP_XRESOLUTION.

+ +

3590/4500 +supports 200 and 300 for bitonal, and 100 and 150 for +color, with the current value reflecting the setting of ICAP_XRESOLUTION.

+ +

Other +support 600 only.

+ +

 

+ +

ICAP_XRESOLUTION                             +Standard: All Models

+ +

                                                                +Allowed: (scanner specific)

+ +

                                                                +Default: 200

+ +

-  +ICAP_XRESOLUTION always matches the current ICAP_YRESOLUTION value.  +Changing one changes the other.

+ +

3500/3510/3520 +support 200 and 300, with the current value reflecting the setting of +ICAP_XRESOLUTION.

+ +

3590 +supports 200 and 300 for bitonal, and 100 and 150 +for color, with the current value reflecting the setting of ICAP_XRESOLUTION.

+ +

-  On +the 3590/4500 the resolutions for the bitonal +and color cameras are linked because of the transport speed.  This means +that a bitonal resolution of 200 requires a color +resolution of 100, and a bitonal resolution of 300 +requires a color resolution of 150.  The Source enforces this behavior, +changing the bitonal and color resolutions as +appropriate to keep these values in sync.

+ +

- 900/500 +support 70 - 400 in steps of 10.

+ +

- 990 supports +70 - 200 in steps of 10.

+ +

- All +other 5000/7000/9000 Series support 70 - 300 in steps of 10.

+ +

- i30/i40/i55/i65/i100/i200 support: 75, 100, 150, +200, 240, 300, 400, 600.

+ +

- i600/i700/i1800 support +for color: 100, 150, 200, 240, 300.  And for bitonal: +200, 240, 300, 400.

+ +

- i800 support +for color: 100, 150, 200, 300.  And for bitonal: +200, 240, 300, 400.

+ +

- i1100/i1200/i1300/i1400 +support: 75, 100, 150, 200, 240, 300, 400, 600,1200.

+ +

- i4000/i5000 +support: 100, 150, 200, 240, 300, 400, 600.

+ +

- i2000 +support: 75, 100, 150, 200, 240, 250, 300, 400, 600, 1200.

+ +

- i900 support: +100, 150, 200, 240, 250, 300, 400, 600, 1200.

+ +

- i2900 +support: 100, 150, 200, 240, 250, 300, 400, 600, 1200.

+ +

- i3000 +support: 100, 150, 200, 240, 250, 300, 400, 600, 1200.

+ +

 

+ +

ICAP_XSCALING                                   +Unsupported.

+ +

 

+ +

ICAP_YNATIVERESOLUTION                +Standard: All Models

+ +

                                                                +Allowed: (scanner specific)

+ +

                                                                +Default: (scanner specific)

+ +

-  +This is a read-only capability.

+ +

i100/i200/i600/i700/i800/i1800 support +300 only.

+ +

3500/3510/3520 +support 200 and 300, with the current value reflecting the setting of +ICAP_YRESOLUTION.

+ +

3590/4500 +supports 200 and 300 for bitonal, and 100 and 150 for +color, with the current value reflecting the setting of ICAP_YRESOLUTION.

+ +

Other +support 600 only.

+ +

 

+ +

ICAP_YRESOLUTION                             +Standard: All Models

+ +

                                                                +Allowed: (scanner specific)

+ +

                                                                +Default: 200

+ +

- + ICAP_XRESOLUTION always matches the current ICAP_YRESOLUTION value.  +Changing one changes the other.

+ +

3500/3510/3520 +support 200 and 300, with the current value reflecting the setting of +ICAP_XRESOLUTION.

+ +

3590 +supports 200 and 300 for bitonal, and 100 and 150 +for color, with the current value reflecting the setting of ICAP_XRESOLUTION.

+ +

-  On +the 3590/4500 the resolutions for the bitonal +and color cameras are linked because of the transport speed.  This means +that a bitonal resolution of 200 requires a color +resolution of 100, and a bitonal resolution of 300 +requires a color resolution of 150.  The Source enforces this behavior, +changing the bitonal and color resolutions as +appropriate to keep these values in sync.

+ +

- 900/500 +support 70 - 400 in steps of 10.

+ +

- 990 supports +70 - 200 in steps of 10.

+ +

- All +other 5000/7000/9000 Series support 70 - 300 in steps of 10.

+ +

- i30/i40/i55/i65/i100/i200 support: 75, 100, 150, +200, 240, 300, 400, 600.

+ +

- i600/i700/i1800 support +for color: 100, 150, 200, 240, 300.  And for bitonal: +200, 240, 300, 400.

+ +

- i800 support +for color: 100, 150, 200, 300.  And for bitonal: +200, 240, 300, 400.

+ +

- i1100/i1200/i1300/i1400 +support: 75, 100, 150, 200, 240, 300, 400, 600,1200.

+ +

- i4000/i5000 +support: 100, 150, 200, 240, 300, 400, 600.

+ +

- i2000 +support: 75, 100, 150, 200, 240, 250, 300, 400, 600, 1200.

+ +

- i900 support: +100, 150, 200, 240, 250, 300, 400, 600, 1200.

+ +

- i2900 +support: 100, 150, 200, 240, 250, 300, 400, 600, 1200.

+ +

- i3000 +support: 100, 150, 200, 240, 250, 300, 400, 600, 1200.

+ +

 

+ +

ICAP_YSCALING                                   +Unsupported.

+ +

 

+ +

ICAP_ZOOMFACTOR                            +Unsupported.

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/TWAIN_ProgrammaticPrinting.htm b/Spec/Kodak/TWAIN_ProgrammaticPrinting.htm new file mode 100644 index 0000000..8fd6833 --- /dev/null +++ b/Spec/Kodak/TWAIN_ProgrammaticPrinting.htm @@ -0,0 +1,2817 @@ + + + + + + + + +Abstract + + + + + + + + + +
+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

KDS +TWAIN Source

+ +

 

+ +

 

+ +

 

+ +

Programmatic +Printing

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

June 22, 2012

+ +

 

+ +

Revision 1.13

+ +

 

+ +

 

+ +

Contents

+ +

 

+ +

Abstract............................................................................................................................................................................. +3

+ +

 

+ +

Audience.......................................................................................................................................................................... +3

+ +

 

+ +

Programmatic Discovery of Printing +Functionality.................................................................................................... +3

+ +

 

+ +

Printer Capabilities +........................................................................................................................................................ +3

+ +

 

+ +

Sample for i2900/i3000/i4000/i5000 scanners without image +address ........................................................... 10

+ +

 

+ +

Sample for i800/i1800 scanners with image address +.......................................................................................... +12

+ +

 

+ +

Sample for i200/i600/i700/i1400 scanners +.............................................................................................................. +13

+ +

 

+ +

 

+ +

Abstract

+ +

 

+ +

The +following scanners are supported for printer:  i200/i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000.  +The level and kind of support differs between the various scanners.  This +document details the methods of programmatic control for document printing and +gives some examples of use.

+ +

 

+ +

 

+ +

Audience

+ +

 

+ +

It +is assumed that the reader has a basic knowledge of the Kodak line of Document Scanners +and of the TWAIN Specification (version 1.8 or higher).  This document is +intended for use by TWAIN integrators. 

+ +

 

+ +

 

+ +

Programmatic Discovery of Printing Functionality

+ +

 

+ +

The +CAP_PRINTERENABLED capability is used to determine if a printer is +available.  A DG_CONTROL / DAT_CAPABILITY / MSG_GET operation will return +a failure if printing is not supported.

+ +

 

+ +

There +is no way for TWAIN to know programmatically if a scanner has a printer +installed.  It’s up to the application to know what was done with the Mode +Setup Software, and present that information to the operator.

+ +

 

+ +

The +i600/i700/i800/i1800/i4000/i5000 scanners only support printing +on the front side of a document. Printing is performed before the image is +scanned.

+ +

 

+ +

The +i200/i1400/i2900/i3000 scanners only support printing on the rear side +of a document. Printing is performed after image is scanned.

+ +

 

+ +

Not +all the printer capabilities are supported for every scanner, therefore the +scanner models are specified in every printer capability. The allowed values +and default are specified for each scanner specific.

+ +

 

+ +

 

+ +

Printer +Capabilities

+ +

 

+ +

                +CAP_PRINTERDATE

+ +

                    +Scanners:            i600/i700/i1800/i2900/i3000/i4000/i5000

+ +

                +    +Container:            +TWON_ONEVALUE

+ +

                +    +Type:                   +TWTY_STR255

+ +

                +    +Values:                +YYYY/MM/DD      (YYYY - year, MM - month, DD - day)

+ +

                +    +Default:                +empty string

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +This will set the scanner to a specific date prior to printing. The scanner +will be returned to the original date afterwards.

+ +

                                                +Set to empty string to disable.

+ +

 

+ +

                +CAP_PRINTERDATEDELIMITER

+ +

                    +Scanners:            +All

+ +

                +    +Container:            +TWON_ENUMERATION

+ +

                +    +Type:                   +TWTY_UINT16

+ +

                +    +Values:                +TWPD_NONE, TWPD_FORWARDSLASH, TWPD_HYPHEN, TWPD_PERIOD, TWPD_BLANK

+ +

                +    +Default:                +i800:         +TWPD_FORWARDSLASH

+ +

                                                +Others:    TWPD_NONE

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +Selects the delimiter used in the date.

+ +

 

+ +

                +CAP_PRINTERDATEFORMAT

+ +

                    +Scanners:            i600/i700/i800/i1400/i1800/i2900/i3000/i4000/i5000

+ +

                +    Container:            +TWON_ENUMERATION

+ +

                +    +Type:                   +TWTY_UINT16

+ +

                +    +Values:                +i600/i800/i1400:    +TWPE_MMDDYYYY, TWPE_DDMMYYYY, TWPE_YYYYMMDD,

+ +

                                                +Others:                 +TWPE_MMDDYYYY, TWPE_DDMMYYYY, TWPE_YYYYMMDD, TWPE_DDD, TWPE_YYYYDDD

+ +

                +    +Default:                +i800:    +    TWPE_MMDDYYYY

+ +

                                                +Others:   TWPE_YYYYMMDD

+ +

                +    Standard:             +No, custom capability

+ +

                +    +Use:                     +Selects the format of the date.

+ +

 

+ +

                +CAP_PRINTERENABLED

+ +

                +    +Scanners:            All

+ +

                    +Container:            +TWON_VALUE

+ +

                +    +Type:                   +TWTY_BOOL

+ +

                +    +Values:                +TRUE/FALSE

+ +

                +    +Default:                +FALSE

+ +

                +    +Standard:            Yes

+ +

                +    +Use:                     +Turns printing on and off.

+ +

 

+ +

CAP_PRINTERFONT

+ +

                +    +Scanners:            All

+ +

                    +Container:            +TWON_ENUMERATION

+ +

                +    +Type:                   +TWTY_UINT16

+ +

                +    +Values:                +i200/i1400:                     +TWPN_LARGECOMIC, TWPN_LARGECINE, TWPN_SMALLCOMIC, TWPN_SMALLCINE

+ +

                                                +i600/i700/i800/i1800:     TWPN_LARGECOMIC, TWPN_LARGECINE, +TWPN_LARGECOMIC180, TWPN_LARGECINE180, 

+ +

                                                                                       +TWPN_SMALLCOMIC, TWPN_SMALLCINE, TWPN_SMALLCOMIC180, +TWPN_SMALLCINE180

+ +

                                                +i2900/i3000/i5000:         +TWPN_LARGECOMIC, TWPN_LARGECINE, TWPN_LARGECOMIC180, TWPN_LARGECINE180,

+ +

                                                                                       +TWPN_SMALLCOMIC, TWPN_SMALLCINE, TWPN_SMALLCOMIC180, +TWPN_SMALLCINE180,

+ +

                                                                                       +TWPN_BOLDLARGECOMIC, TWPN_BOLDLARGECINE, +TWPN_BOLDLARGECOMIC180, TWPN_BOLDLARGECINE180

+ +

                                                +i4000:                             +TWPN_LARGECOMIC, TWPN_LARGECINE, TWPN_LARGECOMIC180, TWPN_LARGECINE180,

+ +

                                                                                       +TWPN_SMALLCOMIC, TWPN_SMALLCINE, TWPN_SMALLCOMIC180, +TWPN_SMALLCINE180,

+ +

                                                                                       +TWPN_BOLDLARGECOMIC, TWPN_BOLDLARGECINE

+ +

                +    +Default:                +i800/i4000/i5000:    TWPN_SMALLCOMIC

+ +

                                                +Others:                  +TWPN_LARGECOMIC

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +Selects the print font.

+ +

 

+ +

                +CAP_PRINTERFRONTFORMAT

+ +

                +    +Scanners:            i1800

+ +

                    +Container:            +TWON_ENUMERATION

+ +

                +    Type:                   +TWTY_UINT16

+ +

                +    +Values:                +TWPFF_NORMAL, TWPFF_BLOCK

+ +

                +    +Default:                +TWPFF_NORMAL

+ +

                +    +Standard:            + No, custom capability

+ +

                +    +Use:                     +Elects the printer font format to be used.

+ +

 

+ +

               +CAP_PRINTERIMAGEADDRESSFORMAT

+ +

                +    +Scanners:            i800/i1800

+ +

                    +Container:            +TWON_ENUMERATION

+ +

                +    +Type:                   +TWTY_UINT16

+ +

                +    +Values:                +TWPI_DISPLAYLEADINGZEROS, TWPI_SUPPRESSLEADINGZEROS, +TWPI_COMPRESSLEADINGZEROS

+ +

                +    +Default:                +TWPI_SUPPRESSLEADINGZEROS

+ +

                +    +Standard:            + No, custom capability

+ +

                +    +Use:                     +This selects the format of the image address, if it +is selected for printing.

+ +

 

+ +

                +CAP_PRINTERIMAGEADDRESSLEVEL

+ +

                +    +Scanners:            i800/i1800

+ +

                    +Container:            +TWON_ENUMERATION

+ +

                +    +Type:                   +TWTY_UINT16

+ +

                +    +Values:                +TWPL_ALLLEVELS, TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3

+ +

                +    +Default:                +TWPL_ALLLEVELS

+ +

                +    +Standard:            + No, custom capability

+ +

                +    +Use:                     +This selects which level document the described +printing will occur upon.

+ +

 

+ +

                +CAP_PRINTERINDEX

+ +

                    +Scanners:            +All

+ +

                +    +Container:            +TWON_RANGE

+ +

                +    +Type:                   +TWTY_UINT32

+ +

                +    +Values:                +0xFFFFFFFF, 0 - 999999999

+ +

                +    +Default:                +i600/i700/i1800:   1

+ +

                                                +Others: +               +0

+ +

                +    +Standard:            Yes +(TWAIN 1.8)

+ +

                +    +Use:                     +Sets the print counter.

+ +

                +    +Notes:                  +0xFFFFFFFF preserves the current value in the scanner

+ +

 

+ +

CAP_PRINTERINDEXDIGITS

+ +

                +    +Scanners:            All

+ +

                    +Container:            +TWON_RANGE

+ +

    +Type:                   +TWTY_UINT16

+ +

                +    +Values:                +1 - 9

+ +

                +    +Default:                +0

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +Sets the number of digits of the counter to be +printed.  Note that the data will be truncated if the number of digits in +the count exceeds this value.

+ +

 

+ +

                +CAP_PRINTERINDEXFORMAT

+ +

                +    +Scanners:            All

+ +

                    +Container:            +TWON_ENUMERATION

+ +

    +Type:                   +TWTY_UINT16

+ +

                +    Values:                +TWPI_DISPLAYLEADINGZEROS, TWPI_SUPPRESSLEADINGZEROS, +TWPI_COMPRESSLEADINGZEROS

+ +

                +    +Default:                +i800:         +TWPI_SUPPRESSLEADINGZEROS

+ +

                                                +Others:    TWPI_DISPLAYLEADINGZEROS

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +Selects the format used to print the counter.

+ +

 

+ +

               +CAP_PRINTERMODE

+ +

                +    +Scanners:            i4000/i5000

+ +

                    +Container:            +TWON_ENUMERATION

+ +

    +Type:                   +TWTY_UINT16

+ +

                +    +Values:                +TWPM_SINGLESTRING, TWPM_COMPOUNDSTRING

+ +

                +    +Default:                +TWPM_SINGLESTRING

+ +

                +    Standard:             +Yes (TWAIN 1.8)

+ +

                +    +Use:                     +TWPM_SINGLESTRING allows the full range of printer +features to be expressed.

+ +

                                                +TWPM_COMPOUNDSTRING follows the guidelines of the +TWAIN 1.8 specification.

+ +

 

+ +

CAP_PRINTERPOSITION

+ +

                +    +Scanners:            All

+ +

                    +Container:            +TWON_RANGE

+ +

    +Type:                   +TWTY_FIX32

+ +

                +    +Values:                +Scanner specific

+ +

                +    +Default:                +Scanner specific

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +This selects the position from the top of the page +where printing is to begin.

+ +

 

+ +

                +CAP_PRINTERSTRING

+ +

                +    +Scanners:            i2900/i3000/i4000/i5000

+ +

                    +Container:            +TWON_ONEVALUE

+ +

    +Type:                   +TWTY_STR255

+ +

                +    +Values:                +Any string (up to 40 characters)

+ +

                    +Default:                +“111”

+ +

                +    +Standard:            Yes +(TWAIN 1.8)

+ +

                +    +Use:                     +This capability is the same as +CAP_PRINTERWRITESEQUENCEMESSAGE1.

+ +

 

+ +

                +CAP_PRINTERSUFFIX

+ +

                    +Scanners:            All

+ +

                    +Container:            +TWON_ONEVALUE

+ +

    +Type:                   +TWTY_STR255

+ +

                +    +Values:                +i600/i700/i1800/i5000:  Any string (up to 20 characters)

+ +

                                                +Others:                         +Any string (up to 40 characters)

+ +

                +    +Default:                +i200/i600/i700/i1400:   “ABC”

+ +

                                                +Others:                        +“111”

+ +

                +    Standard:             +Yes (TWAIN 1.8)

+ +

                +    +Use:                     +Specifies a text string to be printed.

+ +

 

+ +

                +CAP_PRINTERTIME

+ +

                    +Scanners:            i600/i700/i1800/i2900/i3000/i4000/i5000

+ +

                    +Container:            +TWON_ONEVALUE

+ +

    +Type:                   +TWTY_STR255

+ +

                +    +Values:                +HH:MM      (HH - hour +(0-23), MM - minutes (0-59), i.e. 00:00->23:59)

+ +

                +    +Default:                +empty string

+ +

                +    Standard:             +No, custom capability

+ +

                +    +Use:                     +This will set the scanner to a specific time prior to +printing. The scanner will be returned to the original time afterwards.

+ +

                                                + Set to empty string to disable.

+ +

 

+ +

                +CAP_PRINTERWRITESEQUENCE

+ +

                +    +Scanners:            All

+ +

                    +Container:            +TWON_ENUMERATION

+ +

    +Type:                   +TWTY_UINT16

+ +

                +    Values:                +i600/i700/i800/i1800/i5000: TWPW_DATE, TWPW_TIME, TWPW_INDEX, TWPW_MESSAGE1 to +6, TWPW_SPACE

+ +

                                                +Others:                                +TWPW_DATE, TWPW_TIME, TWPW_INDEX, TWPW_MESSAGE1, TWPW_SPACE

+ +

                +    +Default:                +TWPW_INDEX

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +Determines what will be printed.

+ +

 

+ +

CAP_PRINTERWRITESEQUENCEMESSAGE1-6

+ +

                +    Scanners:            +All

+ +

                    +Container:            +TWON_ONEVALUE

+ +

    +Type:                   +TWTY_STR255

+ +

                +    +Values:                +i600/i700/i1800/i5000:  Any string (up to 20 characters), +CAP_PRINTERWRITESEQUENCEMESSAGE1 through 6

+ +

                                                +Others:                         +Any string (up to 40 characters), CAP_PRINTERWRITESEQUENCEMESSAGE1

+ +

                +    +Default:                +i200/i600/i700/i1400:   “ABC”

+ +

                                                 +Others:                       +“111”

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +Specifies a text string to be printed. 

+ +

                +    +Notes:                  +This one text string can be used anywhere in the print sequence, and more than +once.

+ +

                                                +Same as CAP_PRINTERSUFFIX (CAP_PRINTERSUFFIX is +CAP_PRINTERWRITESEQUENCEMESSAGE1)

+ +

 

+ +

CAP_ +PRINTERWRITESEQUENCEMESSAGEINDEX

+ +

                +    +Scanners:            i200/i600/i700/i1400/i1800

+ +

                    +Container:            +TWON_RANGE

+ +

    +Type:                   +TWTY_UINT16

+ +

                +    +Values:                i200/i1400:   1

+ +

                                               + Others:        +1 - 6

+ +

                +    +Default:                +1

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                    + Sets the current write sequence message.

+ +

                +    +Notes:                 + Setting this value to 1 selects CAP_PRINTERSUFFIX.

+ +

 

+ +

                +CAP_PRINTERWRITESEQUENCESTRING

+ +

                +    +Scanners:            All

+ +

                    +Container:            +TWON_ONEVALUE

+ +

    +Type:                   +TWTY_STR255

+ +

                +    +Values:                +(see the control characters below)

+ +

                                                +i200/i600/i700: +Max 20 control characters

+ +

                                                +i800/i1800:       Max 80 control +characters

+ +

                                                +Others:           Max +40 control characters

+ +

                +    +Default:                +"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"

+ +

                +    +Standard:             +No, custom capability

+ +

                +    +Use:                     +Controls what will be printed.

+ +

 

+ +

 

+ +

The Write Sequence capability +(CAP_PRINTERWRITESEQUENCESTRING) is used to control what is printed by +the scanner, and must adhere to the following rules.

+ +

 

+ +

·          Value must always be +valid, even if disabled

+ +

·          Embedded ‘Z’s are not +allowed

+ +

 

+ +

The +following list covers the available control characters:

+ +

 

+ +

For +i800/i1800/i2900/i3000/i4000/i5000 scanners:

+ +

·          +Z      +- end of write sequence +                               +(This is optional and may fill out the string)

+ +

·          +A     +- IA field +A                                                      +(based on CAP_PRINTERIMAGEADDRESSFORMAT)

+ +

·          +B      +- IA field +B                                                      +(based on CAP_PRINTERIMAGEADDRESSFORMAT)

+ +

·          +C      +- IA field +C                                                      +(based on CAP_PRINTERIMAGEADDRESSFORMAT)

+ +

·          +D      +- IA field +D                                                      +(based on CAP_PRINTERIMAGEADDRESSFORMAT)

+ +

·          +Y     +- +Date                                                             +(based on CAP_PRINTERDATEFORMAT and CAP_PRINTERDATEDELIMITER)

+ +

·          +T      +- +Time HH:MM                                                 +(CAP_PRINTERTIME)

+ +

·          +S      +- Printer +Index                                                +(CAP_PRINTERINDEX based on CAP_PRINTERINDEXDIGITS and CAP_PRINTERINDEXFORMAT)

+ +

·          +1      +- Message #1  +               +(level +1,2,3)             +(CAP_PRINTERWRITESEQUENCEMESSAGE1)

+ +

·          +2      +- Message #2  +               +(level +1,2,3)             +(CAP_PRINTERWRITESEQUENCEMESSAGE2)

+ +

·          +3      +- Message #3  +               +(level +1,2,3)             +(CAP_PRINTERWRITESEQUENCEMESSAGE3)

+ +

·          +4      +- Message +#4                 (level +1,2,3)             +(CAP_PRINTERWRITESEQUENCEMESSAGE4)

+ +

·          +5      +- Message +#5                 (level +1,2,3)             +(CAP_PRINTERWRITESEQUENCEMESSAGE5)

+ +

·          +6      +- Message #6  +               +(level +1,2,3)             +(CAP_PRINTERWRITESEQUENCEMESSAGE6)

+ +

·          +1      +- Message +#7                 (all +levels)                +(CAP_PRINTERWRITESEQUENCEMESSAGE7)

+ +

·          +2      +- Message #8  +               +(all +levels)                +(CAP_PRINTERWRITESEQUENCEMESSAGE8)

+ +

·          +3      +- Message +#9                 (all +levels)                +(CAP_PRINTERWRITESEQUENCEMESSAGE9)

+ +

·          +4      +- Message +#10               (all +levels)                +(CAP_PRINTERWRITESEQUENCEMESSAGE10)

+ +

·          +5      +- Message +#11               (all +levels)                +(CAP_PRINTERWRITESEQUENCEMESSAGE11)

+ +

·          +6      +- Message +#12               (all +levels)                +(CAP_PRINTERWRITESEQUENCEMESSAGE12)

+ +

·          +“ +“    - Blank +space                                                  +(1 character)

+ +

 

+ +

For +i200/i600/i700/i1400 scanners:

+ +

·          +Z      +- End of write sequence (This is optional and may fill out the string)

+ +

·          +C     - +Printer +index                  +(CAP_PRINTERINDEX based on CAP_PRINTERINDEXDIGITS and CAP_PRINTERINDEXFORMAT)

+ +

·          +D     - +Date MMDDYYYY         (based on +CAP_PRINTERDATEDELIMITER)

+ +

·          +E     +- Date DDMMYYYY         (based on +CAP_PRINTERDATEDELIMITER)

+ +

·          +F     +- Date YYYYMMDD         (based on +CAP_PRINTERDATEDELIMITER)

+ +

·          +J     +- Date YYYYDD        +       (based on CAP_PRINTERDATEDELIMITER)

+ +

·          +H     +- Date DDD        +              +(based on CAP_PRINTERDATEDELIMITER)

+ +

·          +T     - +Time +HH:MM                   +(CAP_PRINTERTIME)

+ +

·          +B     +- Blank +space                  +(1 character)

+ +

·          +S     - +Message #1    +              +(CAP_PRINTERWRITESEQUENCEMESSAGE1 or CAP_ PRINTERSUFFIX)

+ +

·          +2     - +Message +#2                  +(CAP_PRINTERWRITESEQUENCEMESSAGE2)

+ +

·          +3     - +Message +#3                  +(CAP_PRINTERWRITESEQUENCEMESSAGE3)

+ +

·          +4     - +Message +#4                  +(CAP_PRINTERWRITESEQUENCEMESSAGE4)

+ +

·          +5     - +Message +#5                  +(CAP_PRINTERWRITESEQUENCEMESSAGE5)

+ +

·          +6     - +Message +#6                  +(CAP_PRINTERWRITESEQUENCEMESSAGE6)

+ +

 

+ +

 

+ +

Sample +for i5000 scanners without image address

+ +

 

+ +

    +CAP_PRINTERENABLED:                                                     +TRUE

+ +

    +CAP_PRINTERDATEFORMAT:                                             +TWPE_MMDDYYYY

+ +

    +CAP_PRINTERDATEDELIMITER:                                           +TWPD_FORWARDSLASH

+ +

    +CAP_PRINTERFONT:                                                           +TWPN_SMALLCOMIC

+ +

    +CAP_PRINTERINDEX:                                                          +20

+ +

    +CAP_PRINTERINDEXDIGITS:                                                +5

+ +

    +CAP_PRINTERINDEXFORMAT:                                            +TWPI_DISPLAYLEADINGZEROS

+ +

    +CAP_PRINTERPOSITION:                                                     +2.5 inches

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE1:                     +“Message1”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE2:                     +“Message2”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE3:                     +“Message3”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE4:                     +“Message4”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE5:                     +“Message5”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE6:                     +“Message6”

+ +

    +CAP_PRINTERWRITESEQUENCESTRING:                            +“Y T 1 2 3 4 5 6 SZZZZZZZZZZZZZZZZZZZZZZZ”

+ +

 

+ +

    +Result:                                                                                 +Top +Printer                               +

+ +

                                                                                                +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ +

                                                                                                +“12/06/2010 10:25 Message1 Message2 Message3 Message4 Message5 Message6  +00020”

+ +

                                                                                                +“12/06/2010 10:25 Message1 Message2 Message3 Message4 Message5 Message6  +00021”

+ +

                                                                                                +“12/06/2010 10:25 Message1 Message2 Message3 Message4 Message5 Message6  +00022”

+ +

                                                                                                

+ +

 

+ +

 Sample +for i2900/i3000/i4000 scanners without image address

+ +

 

+ +

    +CAP_PRINTERENABLED:                                                     +TRUE

+ +

    +CAP_PRINTERDATEFORMAT:                                             +TWPE_MMDDYYYY

+ +

    +CAP_PRINTERDATEDELIMITER:                                           +TWPD_FORWARDSLASH

+ +

    +CAP_PRINTERFONT:                                                           +TWPN_SMALLCOMIC

+ +

    +CAP_PRINTERINDEX:                                                          +20

+ +

    +CAP_PRINTERINDEXDIGITS:                                                +5

+ +

    +CAP_PRINTERINDEXFORMAT:                                            +TWPI_DISPLAYLEADINGZEROS

+ +

    +CAP_PRINTERPOSITION:                                                     +2.5 inches

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE1:                     +“Message1”

+ +

    +CAP_PRINTERWRITESEQUENCESTRING:                            +“Y T S 1ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ”

+ +

 

+ +

    +Result:                                                                                 +Top +Printer                               +

+ +

                                                                                                +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ +

                                                                                                +“06/22/2012 10:25 00020 Message1”

+ +

                                                                                                +“06/22/2012 10:25 00021 Message1”

+ +

                                                                                                +“06/22/2012 10:25 00022 Message1”

+ +

                                                                                                

+ +

 

+ +

Sample +for i800/i1800 scanners with image address

+ +

 

+ +

    CAP_PRINTERENABLED:                                                     +TRUE

+ +

    +CAP_PRINTERDATEDELIMITER:                                           +TWPD_HYPHEN

+ +

  +  CAP_PRINTERDATEFORMAT:                                             +TWPE_YYYYMMDD

+ +

    CAP_PRINTERFONT:                                                           +TWPN_SMALLCOMIC

+ +

    +CAP_PRINTERIMAGEADDRESSFORMAT:                           +TWPI_SUPPRESSLEADINGZEROS

+ +

    +CAP_PRINTERIMAGEADDRESSLEVEL:                               +TWPL_LEVEL1

+ +

    +CAP_PRINTERINDEXDIGITS:                                                +9

+ +

  +  CAP_PRINTERINDEXFORMAT:                                            +TWPI_DISPLAYLEADINGZEROS

+ +

    +CAP_PRINTERPOSITION:                                                     +0.5 inches

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE1:                     +“Level-1”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE2:                     +“Level-2”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE3:                     +“Level-3”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE4:                     +“.”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE5:                     +“”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE6:                     +“”

+ +

    +CAP_PRINTERWRITESEQUENCESTRING:                            +“1BYZZZZZZZZZZZZZZZZZ

+ +

 2BSZZZZZZZZZZZZZZZZZ

+ +

 3BA4B4C4DZZZZZZZZZZZ

+ +

 ZZZZZZZZZZZZZZZZZZZZ

+ +

 ZZZZZZZZZZZZZZZZZZZZ”

+ +

 

+ +

    +Result:                                                                                 +Level       Top +Printer                               +

+ +

                                                                                                +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ +

Level-0    +“Level-2  000000009”

+ +

                                                                                                +Level-1    “Level-1  2002-02-25”

+ +

                                                                                                +Level-1    “Level-1  2002-02-25” +                            +

+ +

                                                                                                +Level-3    “Level-3  FIXED.2.1.1” +           

+ +

                                                                                                +Level-0    “Level-2  000000013” +           

+ +

                                                                                                +Level-1    “Level-1  2002-02-25” +                            +

+ +

                                                                                                +Level-1    “Level-1  2002-02-25” +                            +

+ +

                                                                                                +Level-3    “Level-3  FIXED.3.1.1”

+ +

                                                                                                +Level-0    “Level-2  +000000017”         

+ +

 

+ +

 

+ +

Sample +for i200/i600/i700/i1400 scanners

+ +

 

+ +

    +CAP_PRINTERENABLED:                                     +TRUE

+ +

    +CAP_PRINTERFONT:                                           +TWPN_LARGECOMIC

+ +

    +CAP_PRINTERWRITESEQUENCESTRING: +           +“SBDBTBCZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ”

+ +

    +CAP_PRINTERWRITESEQUENCEINDEX:              +7

+ +

    +CAP_PRINTERSUFFIX:                                         +“Test”

+ +

    CAP_PRINTERDATEDELIMITER:                           +TWPD_FORWARDSLASH

+ +

    CAP_PRINTERINDEX:                                           +10

+ +

    +CAP_PRINTERINDEXDIGITS:                                +4

+ +

    +CAP_PRINTERINDEXFORMAT:                            +TWPI_DISPLAYLEADINGZEROS

+ +

    CAP_PRINTERPOSITION:                                     +1 inch

+ +

 

+ +

    +Result:                 +                                                +Top +Printer                               +

+ +

                                                                                +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ +

                                                                +“Test 03/19/2001 11:30 0010”

+ +

                                                                                +“Test 03/19/2001 11:30 0011”

+ +

                                                                                +“Test 03/19/2001 11:30 0012”

+ +

 

+ +

 

+ +

    +CAP_PRINTERENABLED:                                     +TRUE

+ +

    +CAP_PRINTERFONT:                                           +TWPN_LARGECOMIC

+ +

    +CAP_PRINTERWRITESEQUENCESTRING: +           +“FBSBCB1ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ”

+ +

    CAP_PRINTERWRITESEQUENCEMESSAGE1:     +“Scanner-05”

+ +

    +CAP_PRINTERWRITESEQUENCEMESSAGE2:     “Testing”

+ +

    CAP_PRINTERDATEDELIMITER:                           +TWPD_NONE

+ +

    CAP_PRINTERINDEX:                                           +9

+ +

    +CAP_PRINTERINDEXDIGITS:                                +8

+ +

    +CAP_PRINTERINDEXFORMAT:                            +TWPI_SUPPRESSLEADINGZEROS

+ +

    CAP_PRINTERPOSITION:                                     +1 inch

+ +

 

+ +

    +Result:                                                                 +Top +Printer                               +

+ +

                                                                                +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ +

                                                                                +“20010319 Scanner-05 9 Testing”

+ +

                                                                                +“20010319 Scanner-05 10 Testing”

+ +

                                                                                +“20010319 Scanner-05 11 Testing”

+ +

 

+ +

   +

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/TWAIN_ScannerIdentification.htm b/Spec/Kodak/TWAIN_ScannerIdentification.htm new file mode 100644 index 0000000..f183272 --- /dev/null +++ b/Spec/Kodak/TWAIN_ScannerIdentification.htm @@ -0,0 +1,218 @@ + + + + + +Correct TWAIN Usage + + + + + + + +
 
 
Correct TWAIN Usage
 
We recommend against applications identifying scanner models.  TWAIN is designed to expose functionality through capability negotiation.  Writing applications that use functionality based on a model number makes it harder to maintain the code as new models come out that mix that functionality.  For example:
 
               Model 100 has features A, B, C
               Model 200 has features A, X, Y
 
               Code is written as follows:
               Always use A
               If (100) use B, C
               If (200) use X, Y
 
               A new model 300 has features D, C, X
               If (100 200) use A
               If (100) use B, C
               If (200) use X, Y
               If (300) use C, X
 
There are other ways to code this, but they all get unwieldy over time.  The preferred method is:
 
               If A is supported use A
               If B is supported use B
               If C is supported use C
               If X is supported use X
               If Y is supported use Y
 
In TWAIN a capability is tested for support using DG_CONTROL / DAT_CAPABILITY / MSG_QUERYSUPPORT.
 
 
 
 
Alternative TWAIN Usage
 
Every effort is made to make sure that the standard TWAIN capabilities are presented in a consistent fashion across all scanner models.  Unfortunately, this same requirement is harder to enforce for the custom driver features.  In situations like this it may be easier to identify a group of functions by associating them with a model number.
 
Before performing any custom operation an application must unambiguously identify the driver.  For all KDS drivers this is done by examining the TW_IDENTITY returned by the DG_CONTROL / DAT_PARENT / MSG_OPENDS, and looking for the following:
 
               Manufacturer            "Eastman Kodak Company"
               Version.Info              "KDS v#.#.# YYYY/MM/DD"
 
This information does not apply to the 1500/2500 or the i50/i60/i80.  These scanner models use different drivers, so one or both of the above fields will be different.
 
KDS Version 5/6.x drivers and higher report a specific scanner model through DG_CONTROL / DAT_DEVICEINFO/ MSG_GET when it is called in State 4 or higher.  The model information is returned in the TW_DEVICEINFO.dwModelNumber or TW_DEVICEINFO.szModelName field.  This is a custom feature of our driver.
 
KDS Version 4.x drivers and higher report a specific scanner model through DG_CONTROL / DAT_IDENTITY / MSG_GET when it is called in State 4 or higher.  The model information is returned in the TW_IDENTITY.ProductName field.  This is a custom feature of our driver.  
 
KDS Version 3.x, 2.x and 1.x drivers do not support this feature, so it is necessary to use another method to identify the scanner model.  The technique involves the systematic examination of standard and custom capabilities.  The pseudo-code for this is provided below.
 
Note that it is not possible in all situations to uniquely identify all models in this way.  However, from the viewpoint of the driver all of the models grouped in a section support exactly the same operations and capabilities, so for the purpose of testing for functionality, this technique is sufficient.
 
 
 
if CAP_MODE supported:  5xx/9xx/5xxx/7xxx/9xxx
    if ICAP_FRAMELENGTHCONTROL supported
               if CAP_PRINTERENABLED supported
                               if ICAP_XRESOLUTION includes 400 dpi
                                              500/7560
                               else
                                              500A/5520/7520
                               endif
               else
                               if ICAP_XRESOLUTION includes 400 dpi
                                              500/7550
                               else
                                              500A/5500/7500
                               endif
               endif
    else
               if ICAP_XRESOLUTION includes 300
                               900/923/9500/9520
               else
                               990
               endif
    endif
 
else if CAP_IMAGEADDRESS supported: 8xx
    if ICAP_PIXELTYPE includes TWPT_RGB
               i820/i840
    else
               if ICAP_XRESOLUTION includes 400 dpi
                               i830
               else
                               i810
               endif
    endif
 
else it must be mid-volume: 3xxx/4xxx
    if CAP_ENABLECOLORPATCHCODE supported
               3590
    else if ICAP_PIXELTYPE includes TWPT_RGB
               4500
    else if CAP_AUTOMATICBORDERDETECTION supported
               3520
    else if CAP_MULTIFEEDTHICKNESSDETECTION supported
               3510
    else
               3500
    endif
 
endif
+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/debugging.htm b/Spec/Kodak/debugging.htm new file mode 100644 index 0000000..78f1143 --- /dev/null +++ b/Spec/Kodak/debugging.htm @@ -0,0 +1,897 @@ + + + + + + + + +Kodak KDS TWAIN Driver + + + + + + + + + + + +
+ +

Kodak KDS TWAIN Driver

+ +

Debugging Guide

+ +

03-July-2012

+ +

 

+ +

 

+ +

Contents

+ +

          +1.0     Overview

+ +

          +2.0     Finding the Driver Files

+ +

          +3.0     Configuring the System

+ +

          +4.0     Dumping the Data Files

+ +

          +5.0     Dumping the Image Files

+ +

 

+ +

 

+ +

 

+ +

1.0     +Overview

+ +

If sending information to Kodak about the TWAIN driver, we +recommend including log data, which will result in a quicker diagnosis.  +This document should be helpful to select what to send.  If in doubt, send +everything you can.

+ +

 

+ +

The TWAIN driver debugs most problems through its logging +system.   This logging system is reasonably sophisticated, and can be +configured to focus on specific areas, as needed.  The most common kinds +of logging configurations are as follows:

+ +

 

+ +

Logging everything: recording all activity.  +Occasionally this is the best way to capture needed information, especially if +the problem is easily reproducible, but not obviously a problem with either the +application or the scanner.  Logs generated this way tend to be very +large, and full of a lot of information. (Debug=1)

+ +

 

+ +

Flushing to disk: +best when analyzing crashes.  Disk drives rely on caches to boost +performance, however, when programs crash they may strand vital information in +those caches.  If an application crash is easily reproducible, then it’s +possible to flush every log entry to disk.  This is typically used when +logging everything, so the log files are very large and the application and +driver performance is very slow. (Debug=7)

+ +

 

+ +

Database Dumping: (5.x only) used to take a snapshot +of the main database elements in the driver.  (Debug=256)

+ +

 

+ +

Image Dumping: used to capture images as soon as they +are transferred from the scanner, and before they are processed or passed to +the application.

+ +

 

+ +

 

+ +

 

+ +

2.0     +Finding the Driver Files

+ +

All Kodak TWAIN driver files are accessible through the +following path:

+ +

 

+ +

%winbootdir%\twain_32\kodak

+ +

 

+ +

Where %winbootdir% is the +path to the Windows directory, which is usually either C:\WINDOWS or +C:\WINNT.  If you are not sure what this is you can do the following to +find it out.  This works for all versions of Windows.

+ +

 

+ +

1)      Click on START

+ +

2)      Select RUN

+ +

3)      Type in COMMAND +and hit the Enter key

+ +

4)      Type SET in the +DOS window

+ +

5)      Look for +WINBOOTDIR

+ +

 

+ +

When you look in the %winbootdir%\twain_32\kodak you +may see several directories and files.  Look for anything beginning with +the letters KDS; these contain the Kodak TWAIN drivers.  Pick the one that +matches your scanner.  You can find the version at the top of the readme.txt +file.

+ +

 

+ +

kds_i30_i40     - Version 6.x i30/i40 driver

+ +

 

+ +

kds_i100          - Version +6.x i100 driver

+ +

 

+ +

kds_i200          - Version +4.x i200 driver

+ +

 

+ +

kds_i600          - Version +5.x or 6.x i600 driver

+ +

 

+ +

kds_i800          - Version +4.x or 6.x i800 driver

+ +

 

+ +

            +kds_i1200        - Version 7.x i1200 +driver

+ +

 

+ +

            +kds_i1300        - Version 7.x i1300 +driver

+ +

 

+ +

            +kds_i1400        - +Version 9.x i1400 driver

+ +

 

+ +

            +kds_i1800        - Version 8.x i1800 +driver

+ +

 

+ +

            +kds_i1100        - Version 9.x i1100 +driver

+ +

 

+ +

            +kds_i700          - Version 9.x +i700 driver

+ +

 

+ +

            +kds_i4200_i4600 - Version 10.x i4000 driver

+ +

 

+ +

            +kds_i5000        - Version 11.x i5000 driver

+ +

 

+ +

            +kds_i2000        - Version 11.x i2000 driver

+ +

 

+ +

            +kds_i900          - Version 11.x +i900 driver

+ +

 

+ +

            +kds_i2900        - Version 12.x i2900 driver

+ +

 

+ +

            +kds_i3000        - Version 12.x i3000 driver

+ +

 

+ +

            +kds_pss            +- Version 12.x PS50/PS80 driver

+ +

 

+ +

 

+ +

3.0     +Configuring the System

+ +

 

+ +

If you are using a 2/3.x driver, then edit the const.ini +file.  If you are using a 4/5/6.x driver, then click on the file called a +shortcut to const.ini to edit the file.

+ +

 

+ +

Inside of this file you will find two values near the top.

+ +

 

+ +

            +Debug=0

+ +

            +DebugFilter=

+ +

 

+ +

These are the switches used to configure the Kodak TWAIN +driver logging system.  By default they are turned off, so that the driver +will only record a small amount of information in the event of an error.

+ +

 

+ +

The recommended values for Debug are as follows:

+ +

 

+ +

Debug=0         +- record nothing but errors

+ +

Debug=1         +- record everything

+ +

Debug=7         +- record everything and flush to disk

+ +

Debug=64       +- record just the memory usage

+ +

Debug=256     +- (5.x only) dump the data files

+ +

 

+ +

 

+ +

4.0     +Dumping the Data Files

+ +

This is available with the version 5/6.x drivers.  If +there is doubt about the state of the database or the language files or the +device configuration data, then it is possible to dump those files at the start +of the session.  This is done by setting Debug=256 in the const.ini +file.

+ +

 

+ +

The files all start with the letters KDS and are +placed in the user’s temp directory.  Unfortunately, there is no single, +common way to find this directory across all versions of Windows, so rather +than try to describe how it’s done for each OS, we recommend that you search on +your Windows OS disk (usually C:\) for all occurrences of KDS*.TXT, finding +the files:

+ +

 

+ +

            +KdsDbFixed.txt

+ +

KdsDeviceConfig.txt

+ +

KdsLabel.txt

+ +

KdsLookupGui.txt

+ +

KdsLookupTwain.txt

+ +

 

+ +

So, if you’re looking for everything possible to send when +looking for help, feel free to include these files.

+ +

 

+ +

 

+ +

 

+ +

5.0     +Dumping the Image Files

+ +

Not all drivers support this, but those that do will show a Dump +tab in the TWAIN GUI when it is run from the Scanner Validation Tool (SVT), if +the user has the right license level.

+ +

 

+ +

You have to contact Kodak to get a license.

+ +

 

+ +

For all scanners the tab offers a way to write images to +disk before they are passed up to the application.

+ +

 

+ +

The first option provides a way to guarantee that the +transfer of the image from the driver to the application did not change it in +any way.

+ +

 

+ +

The second option dumps the data before it is processed by +the driver.  This ‘raw’ image is the one that we would want to see if +there are questions about image quality.  It’s also the image you need to +use if you want to feed it back into the driver using the simulator.

+ +

 

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/faq.htm b/Spec/Kodak/faq.htm new file mode 100644 index 0000000..cc500ae --- /dev/null +++ b/Spec/Kodak/faq.htm @@ -0,0 +1,4520 @@ + + + + + + + + +Kodak Document Scanners + + + + + + + + + + +
+ +

Kodak Document +Scanners

+ +

TWAIN Driver Frequently Asked Questions (FAQ)

+ +

03-July-2012

+ +

 

+ +

Contents

+ +

 

+ +

1.0 Installation

+ +

1.1 Driver Files

+ +

1.2 +Installing Previous Versions

+ +

1.3 +Uninstalling the Driver

+ +

1.4 +Removing KDSMM

+ +

 

+ +

2.0 +Troubleshooting

+ +

2.1 +Application Cannot Find Source

+ +

2.2 +Real-Time Display Problem

+ +

2.3 +Application Hangs When Trying To Scan

+ +

2.4 TWAIN +Opens Very Slowly

+ +

2.5 System +cannot find KDS.DLL

+ +

2.6 +1394/SBP2 Issues

+ +

2.7 Platen +Autocrop/Deskew

+ +

2.8 The +SETUP001.INI File

+ +

2.9 ICAP_UNITS +Causing Problem

+ +

2.10 +CAP_PRINTERINDEX Persistence

+ +

 

+ +

 

+ +

3.0 +Development

+ +

3.1 +Scanner Simulator

+ +

3.2 +KDS_HOMEDIR

+ +

3.3 DEBUG +/ DEBUGFILTER

+ +

3.4 +ICAP_XFERMECH

+ +

3.5 +KDSTST.EXE

+ +

3.6 Custom +Capabilities

+ +

3.7 Force +Compression

+ +

3.8 Force +Version (3590 only, 1.x firmware)

+ +

3.9 Force +Resolution (3590 only, 1.x firmware)

+ +

3.10 +ICAP_PIXELTYPE (3590/4500/i200/i600/i700/i820/i840/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000)

+ +

3.11 Width +and Length Alignment

+ +

3.12 +Polarity

+ +

3.13 +Feeder Keep Alive (3000/4000 Series)

+ +

3.14 +Length Detection and Frames (3000/4000 Series)

+ +

3.15 +MSG_STOPFEEDER Operation

+ +

3.16 JPEG +Quantization (3590/4500/i820/i840/i200/i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000)

+ +

3.17 +Multiple Modes (5xxx/7xxx/9xxx series)

+ +

3.18 +DAT_EXTIMAGEINFO

+ +

3.19 +ICAP_FRAMES

+ +

3.20 Color +Dropout: Enhanced Processing

+ +

3.21 i30/i40 +Button Mapping

+ +

3.22 +Displaying Scanner Operator/Info Log

+ +

 

+ +

 

+ +

4.0 Known +Issues

+ +

4.1 +Programmatic Constraints

+ +

4.1.1 +ICAP_COMPRESSION

+ +

4.2 Delay +with MSG_ENDXFER

+ +

4.3 Fix +for Overscan (3xxx Series)

+ +

4.4 +DEFAULTS button does not affect the following...

+ +

4.5 TIFF JPEG +(3590/4500/i820/i840/i600/i700/i200/i900/i1100/i1200/i1300/i1800/i2000/i2900/i3000/i4000/i5000)

+ +

4.6 +Scanner Does Not Always Report Jams (5xxx/7xxx/9xxx)

+ +

 

+ +

5.0 +Acknowledgements

+ +

5.1 +Intel(r) JPEG Library

+ +

5.2 +Picture Elements(tm) ChromaTHR(tm), 3590/4500, 4.x +only

+ +

 

+ +

 

+ +

1.0 +Installation

+ +

The TWAIN drivers are intended for production +use with the following Kodak Digital Document Scanner model numbers:

+ +

 

+ +

    Model                          Supported +Driver Versions

+ +

    i30, +i40                                  6.x  +

+ +

    i250, +i260                     4.x

+ +

    i620, +i640, +i660                     5.x  +6.x

+ +

    +i700                                                        +9.x

+ +

    i810, +i820, i830, +i840         4.x        +6.x

+ +

    i1100                                                       +9.x

+ +

    i1200, +i1300                                    7.x

+ +

    +i1400                                                       +9.x

+ +

    +i1800                                                 8.x

+ +

    i2900, i3000                                                                    +12.x

+ +

    +i4000                                                             +10.x

+ +

    i5000, i2000, +i900                                                       +11.x

+ +

    PS50, PS80                                                                    +  12.x

+ +

    

+ +

 

+ +

If you are developing an Application and do +not have access to a scanner refer to section 3.1 to learn how to use the +Scanner Simulator.  Please note that not all drivers support all +scanners.  Check the ramscan.txt file for the list of supported scanners +for your driver.

+ +

 

+ +

 

+ +

1.1 +Driver Files

+ +

The installation places its main files into a +directory of the form "kds_model", for +example: kds_i600.

+ +

 

+ +

Because of this mechanism multiple KDS TWAIN +drivers can co-exist on a system.  The installation will always make +itself the new default (per the TWAIN spec), but it is up to the user to change +the selection to the most appropriate driver for whatever scanner is in use.

+ +

 

+ +

For ease of reading the rest of this document +will refer to the 'kds' directory in commentary and +examples, even for installs that may be of the form "kds_i600".

+ +

 

+ +

A 4.x installation includes the following +files, which are placed in the %win%\twain_32\kodak\kds directory:

+ +

 

+ +

    a shortcut to +const.ini            ; +shortcut to driver configuration settings

+ +

    a shortcut to +kds.log     +         ; shortcut to driver log

+ +

    a shortcut to +ramscan.txt          ; shortcut to +simulator settings

+ +

    a shortcut to setup001.ini +        ; shortcut to GUI snapshot of last +session

+ +

    const.ini                      +    ; link to real const.ini

+ +

    hippo.dll                          ; +image processing library

+ +

    kds.ds                             ; +the driver

+ +

    kdscust.h                          ; +custom TWAIN capabilities

+ +

    kdstst.exe                         ; +KODAK diagnostic tool

+ +

    l_ch_chn.ini                       ; +Simplified Chinese

+ +

    l_ch_twn.ini                       ; +Traditional Chinese

+ +

    l_de_deu.ini                       ; +German

+ +

    l_en_usa.cnt                       ; +English table of contents

+ +

    l_en_usa.hlp   +                    ; +English help file

+ +

    l_en_usa.ini                       ; +English

+ +

    l_es_esp.ini                       ; +Spanish

+ +

    l_fr_fra.ini                       ; +French

+ +

    l_it_ita.ini                       ; +Italian

+ +

    l_nl_nld.ini                       ; +Dutch

+ +

    l_pt_bra.ini                       ; +Portuguese-Brazilian

+ +

  +  memgrp.dll                         ; +Group-4 support

+ +

    readme.txt                         ; +the old readme file

+ +

 

+ +

A 5.x installation consists of the following +files, which are placed in the %win%\twain_32\kodak\kds directory:

+ +

 

+ +

    a shortcut to +const.ini            ; +shortcut to driver configuration settings

+ +

    a shortcut to +kds.log     +         ; shortcut to driver log

+ +

    a shortcut to +ramscan.txt          ; shortcut to +simulator settings

+ +

    a shortcut to setup001.ini +        ; shortcut to GUI snapshot of last +session

+ +

    hippo.dll                          ; +image processing library

+ +

    kds.ds                             ; +the driver

+ +

    kdscust.h                          ; +custom TWAIN capabilities

+ +

    kdstst.exe                         ; +KODAK diagnostic tool

+ +

    l_en_usa.hlp   +                    ; +English help file

+ +

  +  memgrp.dll                         ; +Group-4 support

+ +

    readme.txt                         ; +the old readme file

+ +

 

+ +

 A 6.x installation consists of the +following files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:

+ +

 

+ +

    a shortcut to +const.ini            ; +shortcut to driver configuration settings

+ +

    a shortcut to +kds.log     +         ; shortcut to driver log

+ +

    a shortcut to ramscan.txt  +        ; shortcut to simulator settings

+ +

    a shortcut to setup001.ini +        ; shortcut to GUI snapshot of last +session

+ +

    hippo.dll                          ; +image processing library

+ +

    +kds.ds                             ; +the driver

+ +

    kdscust.h                          ; +custom TWAIN capabilities

+ +

    +kdstst.exe                         ; +KODAK diagnostic tool

+ +

    l_en_usa.hlp   +                    ; +English help file

+ +

    +readme.txt                         ; +the old readme file

+ +

 

+ +

A 7.x installation consists of the following +files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:

+ +

 

+ +

       help                               +; help directory

+ +

        +ch_chn.chm                     ; +Simplified Chinese help file

+ +

        ch_twn.chm                     ; +Traditional Chinese +help file

+ +

        +de_deu.chm                     ; +German help file

+ +

        +en_usa.chm   +                  ; +English help file

+ +

        en_usa.chm                     ; +English help +file

+ +

        +es_esp.chm                     ; +Spanish help +file

+ +

        +fr_fra.chm                     ; +French help file

+ +

        +it_ita.chm                     ; +Italian help file

+ +

        +nl_nld.chm                     ; +Dutch help file

+ +

        +pt_bra.chm                     ; +Portuguese-Brazilian  help file

+ +

    lib                                  +; lib directory

+ +

        +i1200_i1300.ekpgct             ; +colortable package

+ +

        +hippo.dll                      ; +image processing library

+ +

        +firmware.dll                   ; +firmware library

+ +

        ecdo                           +; ecdo directory

+ +

            +GreenDefault.ekpgcd        +; default green color dropout

+ +

            +BlueDefault.ekpgcd         +; default blue color dropout

+ +

            +RedDefault.ekpgcd          +; default red color dropout

+ +

    a shortcut to kds_ixxx     +        ; shortcut to driver log directory

+ +

    const.ini    +                      +; driver configuration settings

+ +

    +kds.ds                             ; +the driver

+ +

    kdscust.h                          ; +custom TWAIN capabilities

+ +

    +kdstst.exe                         ; +KODAK diagnostic tool

+ +

    +twaingui.exe                       ; +the driver gui

+ +

 

+ +

A 8/9.x installation consists of the +following files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:

+ +

 

+ +

       help                               +; help directory

+ +

        +ch_chn.chm                     ; +Simplified Chinese help file

+ +

        ch_twn.chm                     ; +Traditional Chinese +help file

+ +

        +cs_cze.chm                     +; Czech help file

+ +

        +de_deu.chm                     ; +German help file

+ +

        +en_usa.chm   +                  ; +English help file

+ +

        es_esp.chm                     ; +Spanish help +file

+ +

        +fr_fra.chm                     ; +French help file

+ +

        +it_ita.chm                     ; +Italian help file

+ +

        +jp_jpn.chm                     +; Japanese help file

+ +

        +ko_kor.chm                     +; Korean help file

+ +

        +nl_nld.chm                     ; +Dutch help file

+ +

        +pt_bra.chm                     ; +Portuguese-Brazilian  help file

+ +

        +ru_rus.chm                     ; +Russian help file

+ +

        +tr_tur.chm                     ; +Turkish help file

+ +

    +install                            +; installation directory

+ +

        +install.log                    +; Installations log file

+ +

        +UNWISE.EXE                     +; Uninstall executable

+ +

    +profiles                           +; Predefined profiles directory

+ +

        +<model>                        +; model directory          

+ +

    a shortcut to kds_ixxx     +        ; shortcut to driver log directory

+ +

    +kds.ds                             ; +the driver

+ +

    +kdstst.exe                         ; +KODAK diagnostic tool

+ +

    +twaingui.exe                       ; +the driver gui

+ +

 

+ +

and all the lib files is installed in the +%win%\system32\kodak\kds_ixxxx +directory

+ +

 

+ +

       wiamini.dll                                         +; WIA +mini-driver (interface layer)

+ +

    wiascnrwia.dll                                    +; WIA +mini-driver (scanner layer)

+ +

    +lib                                ; +lib directory

+ +

        +i1400.ekpgct      +             ; +colortable package

+ +

        +hippo.dll                      ; +image processing library

+ +

        +firmware.dll                   ; +firmware library

+ +

        ecdo                           +; ecdo directory

+ +

            +GreenDefault.ekpgcd        +; default green color dropout

+ +

            +BlueDefault.ekpgcd         +; default blue color dropout

+ +

            +RedDefault.ekpgcd          +; default red color dropout

+ +

 

+ +

A 10.x installation consists of the following +files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:

+ +

 

+ +

       install

+ +

        +install.log                    +; Installations log file

+ +

        +installopenmp.log              +; Openmp log file       +

+ +

    a shortcut to kds_ixxx     +        ; shortcut to driver log directory

+ +

    +kds.ds                             ; +the driver

+ +

    +kdstst.exe                         ; +KODAK diagnostic tool

+ +

 

+ +

and all the lib files is installed in the +%win%\system32\kodak\kds_ixxxx +directory

+ +

 

+ +

       wiamini.dll                                         +; WIA +mini-driver

+ +

    +lib                                ; +lib directory

+ +

        device.dll              +       ; device library

+ +

        +devicemanager.dll       +       ; device manager library

+ +

        +driver.dll              +       ; driver library

+ +

        +hippo.dll               +       ; image processing library

+ +

        ixxx.ekpgct      +            +  ; colortable package

+ +

        +osjit.dll               +       ; Os just in time

+ +

        +twaingui.exe            +       ; driver gui +

+ +

        ecdo                           +; ecdo directory

+ +

            +BlueDefault.ekpgcd         +; default blue color dropout

+ +

            +GreenDefault.ekpgcd        +; default green color dropout

+ +

            +RedDefault.ekpgcd          +; default red color dropout

+ +

             +help                            ; +help directory

+ +

            +ch_chn.chm                  +; Simplified Chinese help file

+ +

            +ch_twn.chm                  ; +Traditional Chinese +help file

+ +

            +cs_cze.chm                  ; +Czech help file

+ +

            +de_deu.chm                  ; +German help file

+ +

            +en_usa.chm                  ; +English help file

+ +

            +es_esp.chm                  ; +Spanish help +file

+ +

            +fr_fra.chm                  ; +French help file

+ +

            +it_ita.chm                  ; +Italian help file

+ +

            +jp_jpn.chm                  ; +Japanese help file

+ +

            +ko_kor.chm                  ; +Korean help file

+ +

            +nl_nld.chm                  ; +Dutch help file

+ +

            +pt_bra.chm                  ; +Portuguese-Brazilian  help file

+ +

            +ru_rus.chm                  ; +Russian help file

+ +

            +tr_tur.chm                  ; +Turkish help file

+ +

        +profiles                        +; Predefined profiles directory

+ +

            +20060526175022901.profile   ; Black and White Document

+ +

            +20060526175022902.profile   ; Black and White Document (OCR Quality)

+ +

            +20060526175022903.profile   ; Color Document

+ +

            +20060526175022904.profile   ; Color Document (OCR Quality)

+ +

            +20060526175022905.profile   ; Color Photograph

+ +

            +bitonaldocument.png         ; Black and +white document graphic file

+ +

            +bitonaldocumentocr.png      ; Black and white document OCR +graphic file

+ +

            +colordocument.png           ; +Color document graphic file

+ +

            +colordocumentocr.png        ; Color document OCR +graphic file

+ +

            +colorphoto.png           +   ; Color photograph graphic file

+ +

            +default.png              +   ; Default graphic file

+ +

        +sounds                          +; Multifeed sounds

+ +

            +ding.wav                 +   ; Ding sound

+ +

 

+ +

A 12.x installation consists of the following +files, which are placed in the %win%\twain_32\kodak\kds_ixxxx directory:

+ +

 

+ +

       install

+ +

        +install.log                    +; Installations log file

+ +

        +installopenmp.log              +; Openmp log file       +

+ +

    a shortcut to kds_ixxx     +        ; shortcut to driver log directory

+ +

    +kds.ds                             ; +the driver

+ +

 

+ +

and all the lib files is installed in the +%win%\system32\kodak\kds_ixxxx +directory

+ +

 

+ +

       wia.dll                                                +; WIA driver +file

+ +

       wiaentry.dll                                       +; WIA driver +file

+ +

    +lib                                ; +lib directory

+ +

        +device.dll              +       ; device library

+ +

        +devicemanager.dll       +       ; device manager library

+ +

        +driver.dll              +       ; driver library

+ +

        +hippo.dll               +       ; image processing library

+ +

        ixxx.ekpgct      +            +  ; colortable package

+ +

        +lexexe.exe              +       ; image processing library file

+ +

        +osjit.dll               +       ; Os just in time

+ +

        +setup.txt               +       ; versions file

+ +

        +twaingui.exe            +       ; driver gui +

+ +

        twaingui.exe.config      +      ; driver gui file

+ +

        +vcomp100.dll            +       ; image processing library file

+ +

        ecdo                           +; ecdo directory

+ +

            +BlueDefault.ekpgcd         +; default blue color dropout

+ +

            +GreenDefault.ekpgcd        +; default green color dropout

+ +

            +RedDefault.ekpgcd          +; default red color dropout

+ +

            +McdoKodakMultiColor.ekpgcd ; multi-color dropout

+ +

            +McdoKodakSingleColor.ekpgcd; single-color dropout

+ +

             +help                            ; +help directory

+ +

            +ch_chn.chm                  +; Simplified Chinese help file

+ +

            +ch_twn.chm                  ; +Traditional Chinese +help file

+ +

            +cs_cze.chm                  ; +Czech help file

+ +

            +de_deu.chm                  ; +German help file

+ +

            +en_usa.chm   +               ; +English help file

+ +

            +es_esp.chm                  ; +Spanish help +file

+ +

            +fr_fra.chm                  ; +French help file

+ +

            +it_ita.chm                  ; +Italian help file

+ +

            +jp_jpn.chm                  ; +Japanese help file

+ +

            +ko_kor.chm                  ; +Korean help file

+ +

            +nl_nld.chm                  ; +Dutch help file

+ +

            +pt_bra.chm                  ; +Portuguese-Brazilian  help file

+ +

            +ru_rus.chm                  ; +Russian help file

+ +

            +tr_tur.chm                  ; +Turkish help file

+ +

        +profiles                        +; Predefined profiles directory

+ +

            +20060526175022901.profile   ; Black and White Perfect Page Document

+ +

            +20060526175022903.profile   ; Color Perfect Page Document

+ +

            +20060526175022905.profile   ; Color Photograph

+ +

            +bitonaldocument.png         ; Black and +White Perfect Page Document graphic file

+ +

            +colordocument.png           ; +Color Perfect Page Document graphic file

+ +

            +colorphoto.png           +   ; Color photograph graphic file

+ +

            +default.png              +   ; Default graphic file

+ +

        +sounds                          +; Multifeed sounds

+ +

            +ding.wav                 +   ; Ding sound

+ +

 

+ +

The KDS memory manager is installed in the +%win%\system32 directory.

+ +

 

+ +

    kdsmm.sys                          ; +memory management

+ +

 

+ +

The following freely distributable file from +Intel is placed in the %win%\system32 directory for Microsoft NT type OS's and +the %win%\system directory for Microsoft Windows 9x OS's.  This library is +built static into version 6.x and greater.

+ +

 

+ +

    ijl15.dll                          ; +JPEG support

+ +

 

+ +

 

+ +

1.2 +Installing Previous Versions

+ +

If for some reason it is necessary to install +a previous version of the Source, the user must remove the current installation +first.  Refer to the section on "Uninstalling the Driver."

+ +

 

+ +

 

+ +

1.3 +Uninstalling the Driver

+ +

The preferred method is to go into Add/Remove +Programs under the Control Panel, and remove either Host Diagnostics or +SVT.  Note that if both are installed on a system then uninstalling either +one will result in the removal of the TWAIN driver, making the remaining +application unusable.  For 5.x drivers Add/Remove Programs will list the +individual drivers installed (e.g. “Kodak i620/i640/i660 Scanner”).  +Removing this from the list will only uninstall the driver and the writeable +data that goes with it.  All other installed Kodak scanner drivers will +remain.  With 5.x, SVT will only be uninstalled when the last Kodak +Scanner driver is uninstalled.

+ +

 

+ +

If Add/Remove Programs does not exist, or +there is a need to just get rid of TWAIN (perhaps as part of a version +rollback) the quickest way to do this is to go to  %win%\twain_32\kodak and delete the appropriate kds +directory(s).  Do not forget about the writeable data directory.  +Check the shortcuts to see where it is located.

+ +

 

+ +

 

+ +

1.4 +Removing KDSMM

+ +

KDSMM is used by the system to allocate the +large blocks of memory needed by the scanners to perform at their maximum +speeds.  If it is absolutely necessary to stop using this driver it can be +turned off by deleting or renaming the KDSMM.SYS in the %win%\system32\drivers +directory.

+ +

NOTE: turning this driver off will prevent the +TWAIN driver from running at its maximum speed.

+ +

 

+ +

 

+ +

2.0 +Troubleshooting

+ +

This section addresses problems that may come +up when using the driver, and offers some possible actions that users must +attempt before calling for support.

+ +

 

+ +

 

+ +

2.1 +Application Cannot Find Source

+ +

There are four reasons that an Application +may be unable to locate the Source.

+ +

 

+ +

1) The Source must be located in the proper +directory, which is:  %win%\twain_32\kodak\kds

+ +

 

+ +

2) A needed DLL may be missing.  The +Source relies on the presence of the following DLL's:  kernel.dll, +user32.dll, gdi32.dll, comctl32.dll, comdlg32.dll, advapi32.dll, shlwapi.dll, +shell32.dll, winspool.drv, twain_32.dll, wnaspi32.dll.

+ +

 

+ +

3) Some or all of %win%\twain_32\kodak\kds is write +protected.  See section 3.2 for a possible way around this.

+ +

 

+ +

4) The Application may not be setting the appIdentity.SupportedGroups to DG_CONTROL | DG_IMAGE when +looking for the available Sources.  Or the Application may not have set #pragma pack(2) in the correct places.  Consider these +possibilities last, and only if you are writing your own Application.

+ +

 

+ +

 

+ +

2.2 +Real-Time Display Problem

+ +

If your application does a real-time display +of images on the fly, it's possible that you may see pauses in the display, +even though the scanner and software are running at rated speed.

+ +

 

+ +

The Source polls for images on the scanner, +and if none are found it sleeps for a specified period of time, and then tries +again.  This behavior is PC friendly in that it consumes fewer clock +cycles on the PC and issues fewer commands to the scanner.  However, if +the application is displaying each image in real-time, it can result in a display +that appears to start and stop for no apparent reason.

+ +

 

+ +

One possible solution is to adjust the PollSleep value.  Edit the CONST.INI field, and under +the [dsIdentity] section add the line:

+ +

 

+ +

            +PollSleep=100

+ +

 

+ +

This specifies a sleep value of 1/10th of a +second.  Adjusting this value can result in a smoother real-time +display.  Be careful of using low values, since they can impact the +performance of the system.

+ +

 

+ +

 

+ +

2.3 +Application Hangs When Trying To Scan

+ +

The TWAIN Working Group specifies that the +Source Manager Files (see Section 1.2) are supposed to reside in the main +Windows directory.  Some Sources and Applications, though, make the +mistake of installing these files in the Windows System directory (System on +Windows 9x/ME, System32 on Windows NT/2K/XP).

+ +

 

+ +

This can lead to a situation where the Source +and the Application end up accessing different copies of the Source Manager, +which leads to hangs or crashes.  If this situation is suspected, examine the +System and System32 directories for occurrances of +the files listed in Section 1.2, and remove them.

+ +

 

+ +

The installation of the Source does this +automatically.

+ +

 

+ +

 

+ +

2.4 +TWAIN Opens Very Slowly

+ +

We have seen instances with Windows 2000 +running virus scanning software where TWAIN seems to open very slowly.  At +this point we suspect some interaction between the virus checking software, +Windows and the TWAIN DSM (twain_32.dll).  There is no known fix at this +time, other than to turn off the virus scanning software.

+ +

 

+ +

 

+ +

2.5 +System cannot find KDS.DLL

+ +

KDS.DLL was used in the 1.x version of the +Source, and is no longer needed.  If you see it or any file in the KDS +directory ending in a .DS extension other than KDS.DS, then a re-install is +recommended.  Manually delete the %win%\twain_32\kodak\kds directory first, and after the install is complete the +problem will be fixed.

+ +

 

+ +

 

+ +

2.6 +1394/SBP2 Issues

+ +

During the course of development of the i200 +it was discovered that many OHCI compliant 1394 adapter cards carry a critical +bug that can result in a fatal communication error.

+ +

 

+ +

This bug appears during scanning, terminating +a session with paper left in the transport and the red light lit.  +Examination of the scanner log will reveal that a "Chipset Error" has +occurred.

+ +

 

+ +

As of this writing (September 2006) the only +recommended 1394 card for use is the one provided in the box with the +i200/i600/i1800 scanner.  If this error occurs please confirm that the +correct card is installed and in use in the PC before contacting your Kodak +Representative for assistance.

+ +

 

+ +

If the PC is a Pentium-III with a VIA +chipset, then the use of the 1394 card supplied with the scanner is not enough +to solve the problem.  Please contact your Kodak Service Representative +for more information.

+ +

 

+ +

Also note that any other information on this +issue that may be provided in the box with your scanner or on the Kodak website +should be considered more current than this section.

+ +

 

+ +

 

+ +

2.7 +Platen Autocrop/Deskew

+ +

Performing autocrop +and deskew functionality is somewhat different for +the platen than it is for the transport.  Most notably, the platen is far +more likely to gather dust and dirt that can impact the ability of the system +to locate the real image.  Regular cleaning of the platen is important if using +autocrop and deskew.

+ +

 

+ +

Also be sure to check the black background on +the platen cover.  This material can be wiped off with glass cleaner.

+ +

 

+ +

It is also important to perform regular +calibrations of the feeder and platen systems.  Image calibration can be accessed +through the Calibrate... button on the TWAIN driver's Imaging Tab.  If +your application does not give you access to this function, run the Scan +Validation Tool that was installed from the CD that came with your scanner.

+ +

 

+ +

If you are having problems getting autocrop and deskew to work +properly, or if the feeder (ADF) to flatbed mode is not performing as well as +it should off the platen, then try editing the CONST.INI file and adjusting the +following value:

+ +

 

+ +

            +ForceBaffleBlackPlatenAdjustment=60

+ +

 

+ +

Larger values will remove traces of dust and +light scatter that show up as false image data.  Smaller values will do +better at handling images with dark backgrounds.  Valid values are 0 - 255 +(though 128 is really the practical limit).  When experimenting, make sure +that the lamps have warmed up for at least a minute.

+ +

 

+ +

 

+ +

2.8 +The SETUP001.INI File

+ +

The TWAIN Specification requires that +applications save their GUI settings, so the user gets a better experience from +session to session.  Unfortunately, little guidance is given in how to +integrate this feature into the rest of the driver behavior.  At the time +of its creation, the following scheme was selected for this driver.

+ +

 

+ +

SETUP001.INI only records a session if the +driver’s GUI is raised by the application, and then only if the user selects +the OK or SCAN button (depending on the kinds of GUI brought up).  The +values saved reflect some, but not all, of the values shown on the GUI.  +The format of the data looks very similar to the output of the DG_CONTROL / +DAT_CUSTOMDSDATA / MSG_SET call, but fewer items are saved.

+ +

 

+ +

When a new session is started the +SETUP001.INI file is loaded, overriding the power-on defaults for the +driver.  No attempt is made to test which application generated the SETUP001.INI +file, so it is possible to use one application to create the file that is read +by another.  This is deliberate.  When the driver was first created +there was a 50/50 split for application writers to use the GUI versus +programmatic control, and the programmatic applications generally used the +standard TWAIN capabilities, never any custom capabilities.  The intention +of the SETUP001.INI file was to allow an end-user to set custom capabilities +from the GUI and have those values remain intact when working with their +preferred application.

+ +

 

+ +

This scheme may cause problems with some +programmatic applications, especially if they make assumptions about the +default values.  If you suspect this is happening we recommend editing the +SETUP001.INI file, deleting everything after the first set of comments.  +Save the results, then make the file read-only (this can be done from Windows +Explorer, just right-click the mouse on the name of the file and select +Properties from the menu; the read-only flag will appear on the Properties +dialog); doing this will guarantee that every invocation of the driver will +come up with the power-on defaults.

+ +

 

+ +

One final note:  the SETUP001.INI is not +a replacement for the DG_CONTROL / DAT_CUSTOMDSDATA / MSG_SET operation.  +If you wish to write an application that sets the driver using profiles, then +you must use DG_CONTROL / DAT_CUSTOMDSDATA / MSG_SET to do it.

+ +

  

+ +

 

+ +

2.9 ICAP_UNITS Causing Problem

+ +

Version 9.54 and newer (as well as version +4.x and earlier) drivers will default ICAP_UNITS to TWUN_INCHES. The ForceUnits* overrides mentioned below, will no longer be +supported as they are no longer needed (i.e. skip the rest of this section).

+ +

 

+ +

Version 5.x through 9.53 drivers will set the +ICAP_UNITS default based on the PC’s locale, which means that languages like +French will default to TWUN_CENTIMETERS. If this causes problems, the default +units can be overridden using the ForceUnitsInches=1 +in the const.ini file. This will overwrite the current ICAP_UNITS to inches.

+ +

 

+ +

Certain applications do not check the units +when acquiring TW_IMAGEINFO->XResolution, and +therefore save the wrong resolution in the image header.  If this causes +problems the units in which TWAIN reports this value can be overridden using +the ForceUnitsBehavior in the const.ini file. This +field has the following values:

+ +

 

+ +

ForceUnitsBehavior=0    +; negotiate TW_IMAGEINFO->XResolution in the +current driver units (old/default behavior)

+ +

ForceUnitsBehavior=1    +; negotiate TW_IMAGEINFO->XResolution in +ICAP_UNITS last set by the application (default TWUN_INCHES)

+ +

ForceUnitsBehavior=2    +; negotiate TW_IMAGEINFO->XResolution in +ICAP_UNITS last set or read by the application (default TWUN_INCHES)

+ +

 

+ +

The application “Imaging for Windows” never +sets ICAP_UNITS and always expects TW_IMAGEINFO->XResolution +in TWUN_INCHES.  Therefore ForceUnitsBehavior +will default to 1 for this application to force the desired result.

+ +

 

+ +

2.10 CAP_PRINTERINDEX Persistence

+ +

Printer index persists differently depending +on the driver version and scanner.  Versions 5.x and 6.x of the driver +will always remember printer index across scan sessions.  Version 4.x of +the driver should work this way for all scanners but may not in a few +instances.

+ +

 

+ +

The TWAIN driver will not remember the +printer index across driver sessions.  This value is lost each time the +driver is unloaded.  An exception to this rule is the i800 scanners which +store the printer index internally, so when the driver is reloaded it is able +to acquire the last value from the scanner.

+ +

 

+ +

3.0 +Development

+ +

This section contains details on features +that developers can use to help write applications using this Source.

+ +

 

+ +

 

+ +

3.1 +Scanner Simulator

+ +

The Scanner Simulator is a tool that allows +developers to use the TWAIN Source when no physical scanner is available.

+ +

 

+ +

The previous mechanism for running the RAM +Scanner has been removed from the Source.  If you were using the RAM +Scanner prior to version 1.2.15, please delete any files of the form kds_*ram.ds from your +%win%\twain_32\kodak\kds +directory (the installation should do this for you).

+ +

 

+ +

The new Scanner Simulator mechanism is driven +from the ramscan.txt found in %win%\twain_32\kodak\kds_*.

+ +

 

+ +

For 4.x drivers the scanner selection is done +at the top of the ramscan.txt.  For 5.x drivers the scanner selection is +done in the const.ini file.  To enter into simulation mode edit the +appropriate file and change the 'Simulate' line to the desired model number +(ex: i640).

+ +

 

+ +

To turn off simulation mode, set the +'Simulate' value back to zero.

+ +

 

+ +

Images generated by the Scanner Simulator +reflect the current settings for ICAP_COMPRESSION (Uncompressed, Group-4 and +JPEG only);       ICAP_PIXELFLAVOR and +ICAP_FRAMES.

+ +

 

+ +

It is also possible to display images from +files on disk.  The method for doing this is documented in ramscan.txt.

+ +

 

+ +

The sequence of events in a simulated session +are controlled using the @-commands at the bottom of the file.  These +commands are fully documented in ramscan.txt.

+ +

 

+ +

 

+ +

3.2 +KDS_HOMEDIR

+ +

This section should no longer be needed, +since the TWAIN writeable data files are now installed outside of the Windows +directory.  However, KDS_HOMEDIR is still recognized by the system, so +this section is left intact for those users who may have an existing dependency +on it.

+ +

 

+ +

Environments where the user is prevented from +writing into the %win% directory (such as secure configurations of NT/2K/XP), +require that the following files be moved from the %win%\twain_32\kodak\kds directory, to some +other writeable directory:

+ +

 

+ +

    const.ini

+ +

    l_ch_chn.ini

+ +

    l_ch_twn.ini

+ +

    l_de_deu.ini

+ +

    l_en_usa.cnt

+ +

    l_en_usa.hlp

+ +

    l_en_usa.ini

+ +

    l_es_esp.ini

+ +

    l_fr_fra.ini

+ +

    l_it_ita.ini

+ +

    l_nl_nld.ini

+ +

    l_pt_bra.ini

+ +

    ramscan.txt

+ +

    setup001.ini

+ +

 

+ +

It is then necessary to create an environment +variable KDS_HOMEDIR, which contains the full path to the new location of these +files.

+ +

 

+ +

The logfile +(kds.log), if created, will appear in this alternate directory.

+ +

 

+ +

 

+ +

3.3 +DEBUG / DEBUGFILTER

+ +

Users must not modify any of the Source's +data files without consulting with Eastman Kodak Company.  However, there +may be times during development when it is advantageous to get a snapshot of +the operation of the Source.  To do this, edit the const.ini file and look +for the Debug variable and set the value to two (2) or one (1) depending on +whether you are trying to catch an intermittent log message, or generate an +exhaustive dump of the operation of the Source.

+ +

 

+ +

Filtering the log file (kds.log) for occurrances of the string 'kdsdat' +will help to isolate those messages that relate to TWAIN communication between +the Application and the Source.

+ +

 

+ +

If sending a log to Eastman Kodak Company the +most useful selection is typically the following for a 4.x or earlier version +of the driver:

+ +

 

+ +

            +Debug=1

+ +

            +DebugFilter=kdsdat kdshal kdsprot

+ +

 

+ +

For 5.x and later, please use the following:

+ +

 

+ +

            +Debug=1

+ +

            +DebugFilter=TWAIN WIRE

+ +

 

+ +

Please note, the Source is designed to run in +production mode with the Debug variable set to zero (0), two (2), four (4) or +six (6); any other value will adversely affect the performance of the Source +and most likely use a great deal of disk space.

+ +

 

+ +

 

+ +

3.4 +ICAP_XFERMECH

+ +

The Source works best with an ICAP_XFERMECH +of TWSX_MEMORY.  TWSX_NATIVE transfers and TWSX_FILE transfers with an +image file format of TWFF_BMP require the Source to flip the image around the +x-axis.  In all cases the Source is able to keep up with the rated speed +of the scanner.  Efficiency is measured in terms of the number of amount +of time left to do work on each image before the application must proceed to +the next image. See ICAP_COMPRESSION for other restrictions.

+ +

 

+ +

 

+ +

3.5 +KDSTST.EXE

+ +

This program is not meant for general use, it +is a test tool that Eastman Kodak Company may use in the course of debugging +user problems.  Users should not run this program unless directed to do so +by Eastman Kodak Company. 

+ +

 

+ +

 

+ +

3.6 +Custom Capabilities

+ +

The scanner supported by this Source provides +some features and capabilities that go beyond what is described in the TWAIN +Specification.

+ +

 

+ +

The header file describing these features is kdscust.h, which is installed in the %win%\twain_32\kodak\kds directory.  +Developers should copy this file to their application build location, and use +it to access the Source's custom features.

+ +

 

+ +

Note: the #include for this file is best +placed immediately after the #include for twain.h

+ +

 

+ +

 

+ +

3.7 +Force Compression

+ +

Most older TWAIN applications are only +capable of processing uncompressed data.  The scanner is capable of +delivering uncompressed images at its rated speed, however moving uncompressed +data takes longer than moving compressed data, and there may be times when an +application needs to get all the processing time that it can for its own +operations.

+ +

 

+ +

Force Compression is a custom +capability.  It is available both programmatically and in the GUI, however +access to the GUI is turned off by default.  To activate it the user must +edit the const.ini file and set the value of ForceCompression +to 1.  This will result in the appearance of the ForceCompression +option on the driver's Compression tab.

+ +

 

+ +

If ICAP_COMPRESSION is set to TWCP_NONE for a +given camera, then Force Compression may be set to either TWCP_GROUP4 (for bitonal cameras) or TWCP_JPEG (for color cameras).  +When this is done the Source will force the scanner to use the specified +compression, but will internally decompress the image and pass along the +uncompressed data to the application.  If the value of ICAP_COMPRESSION is +set to anything other than TWCP_NONE, then the value of ICAP_FORCECOMPRESSION +is ignored, no matter what its current setting.

+ +

 

+ +

Users should only activate this option if +they are working with uncompressed data and are seeing the scanner transport +pausing because of buffer full conditions.  Force Compression allows +smaller images to be passed across SCSI, but at the cost of more processing per +image as it decompresses each one before passing it to the application.  +For this reason Force Compression is only recommended for fast machines with a +generous amount of RAM.

+ +

 

+ +

From the application's point of view the +Source has been set to obtain uncompressed data, and that is what it +delivers.  At no time does an application have to be aware that force +compression is in effect (unless it is driving the use of this feature +programmatically).

+ +

 

+ +

Also, please note: Group4 compression is +lossless, the decompressed images are exactly the same as if they had been +scanned uncompressed.  JPEG compression is lossy; +the decompressed images are NOT exactly the same as if they had been scanned +uncompressed.

+ +

 

+ +

i800 series:  These scanner models are +only capable of outputting JPEG compressed images, so ForceCompression +is the only way to get uncompressed images from the Source.  Therefore ForceCompression is activated at all times for these +scanners.  Support for uncompressed images is provided to maximize the +base of supported TWAIN applications, but it is not a recommended mode for use +with the i800 scanners, which are capable of producing huge amounts of large +color images very quickly.

+ +

 

+ +

 

+ +

3.8 +Force Version (3590 only, 1.x firmware)

+ +

The JFIF files created by the scanner +currently have an embedded revision of 1.2.  If an application is using an +ICAP_XFERMECH value of TWSX_FILE to transfer the images with a file format of +TWFF_JFIF, then the JFIF files created by the scanner are dumped straight to +disk.  In some rare cases there may be applications that have problems with +the embedded revision value.  If this situation is encountered it is +possible to change the value of the revision to 1.1 through use of ForceVersion.  The value should be added to the +const.ini file after the occurrence of ForceCompression +and should have the value of:  ForceVersion=257

+ +

 

+ +

 

+ +

3.9 +Force Resolution (3590 only, 1.x firmware)

+ +

The JFIF files created by the scanner +currently have an embedded unit of 0, with the density fields used to indicate +a square aspect ratio.  If an application is using an ICAP_XFERMECH value +of TWSX_FILE to transfer the images with a file format of TWFF_JFIF, then the +JFIF files created by the scanner are dumped straight to disk.  In some +cases there may be applications that want to know what the scanned resolution +of the image was. If this situation is encountered it is possible to have the +Source tweak the header so that the units field is set to 1 (dots per inch) and +the density fields are set to the value of ICAP_XRESOLUTION/ICAP_YRESOLUTION +for the image.  This alternate behavior may be activated through use of ForceResolution.  The value should be added to the +const.ini file after the occurrence of ForceCompression +and should have the value of:  ForceResolution=1

+ +

 

+ +

 

+ +

3.10 ICAP_PIXELTYPE +(3590/4500/i200/i600/i700/i820/i840/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000)

+ +

The 3590C uses ICAP_PIXELTYPE to switch +between the /Camera_Bitonal_Both and the /Camera_Color_Top cameras (it's still possible to do this +with the DAT_FILESYSTEM command, if necessary).  ICAP_PIXELTYPE also +switches the "Start in color mode" flag on the GUI back and forth +(for the 3590 only, TWPT_BW turns it off, TWPT_RGB turns it on).

+ +

 

+ +

Please note that prior to 4.x ICAP_PIXELTYPE +was not setting the CAP_CAMERAENABLE flag for the affected cameras.  The +result is that the 3590 was the only scanner that performed correctly when +setting ICAP_PIXELTYPE. 

+ +

 

+ +

Beginning with 4.x CAP_CAMERAENABLE is set +for the affected cameras, and the GUI will reflect the current setting of +ICAP_PIXELTYPE by placing the selection on the appropriate camera.

+ +

 

+ +

Setting ICAP_PIXELTYPE has the following +affect in 4.x and higher:

+ +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

ICAP_PIXELTYPE

+
+

Cameras Enabled*

+
+

Cameras Disabled*

+
+

New FileSystem

+
+

ICAP_GRAYSCALE

+
+

ICAP_BITDEPTH

+
+

TWPT_RGB

+
+

Color Front/Rear

+
+

Bitonal Front/Rear

+
+

/Camera_Color_Both

+
+

FALSE

+
+

24

+
+

TWPT_GRAY

+
+

Color Front/Rear

+
+

Bitonal Front/Rear

+
+

/Camera_Color_Both

+
+

TRUE

+
+

8

+
+

TWPT_BW

+
+

Bitonal Front/Rear

+
+

Color Front/Rear

+
+

/Camera_Bitonal_Both

+
+

FALSE

+
+

1

+
+ +

*Cameras Enabled -> CAP_CAMERAENABLE = TRUE

+ +

 

+ +

Do not to mix ICAP_PIXELTYPE with +DAT_FILESYSTEM, CAP_CAMERAENABLE, ICAP_GRAYSCALE.  If the above table +represents desired settings, ICAP_PIXELTYPE is the easiest way to get the desired +outputs.  Otherwise use DAT _FILESYSTEM, CAP_CAMERAENABLE, and +ICAP_GRAYSCALE to negotiate which output streams to receive.

+ +

 

+ +

Setting ICAP_GRAYSCALE will change the +ICAP_PIXELTYPE and ICAP_BITDEPTH settings for that camera, but not change the +current file system or enable/disable cameras.

+ +

Setting ICAP_BITDEPTH will change the +ICAP_PIXELTYPE and ICAP_GRAYSCALE settings for that camera, but not change the +current file system or enable/disable cameras.

+ +

Please reference TWAIN_ProgrammaticControl.htm for +which settings are valid on which file systems.

+ +

 

+ +

 

+ +

3.11 +Width and Length Alignment

+ +

The Kodak Document Scanners require the width +of all images to be aligned on 16-bit boundaries.  It requires the height +of color images to be aligned on 8-bit boundaries.  The Source provides +this on behalf of the user, but needs to go beyond it to 32-bit width alignment +for some image transfer modes.

+ +

 

+ +

The table breaks this down, showing the required +alignments for the width and the height for bitonal +and color images for each transfer mode.  Again, the Source will make +these corrections for you, after negotiation, when the values are downloaded to +the scanner.  The width and height dimensions returned by DAT_IMAGEINFO +will reflect the final adjustments:

+ +

 

+ +

ICAP_XFERMECH +&                +Bitonal +Alignment            +Color Alignment

+ +

ICAP_COMPRESSION               +Width x +Height               +Width x Height

+ +

TWSX_MEMORY

+ +

  +TWCP_NONE                     16 +x +1               +        16 x 8

+ +

  +TWCP_GROUP31D                 +16 x +1               +        n/a

+ +

  +TWCP_GROUP32D                 +16 x +1                       n/a

+ +

  +TWCP_GROUP4                   16 +x +1                       n/a

+ +

  +TWCP_JPEG                     n/a                          16 +x 8

+ +

 

+ +

TWSX_NATIVE

+ +

  +TWCP_NONE                     32 +x +1*                      32 +x 8*

+ +

 

+ +

TWSX_FILE

+ +

  BMP

+ +

    +TWCP_NONE                   32 +x +1*                      32 +x 8*

+ +

  TIFF

+ +

    +TWCP_NONE                   32 +x +1**                     32 +x 8**

+ +

    +TWCP_GROUP31D               +16 x +1                       n/a

+ +

    +TWCP_GROUP32D               +16 x +1               +        n/a

+ +

    +TWCP_GROUP4                 16 +x +1                       n/a

+ +

    +TWCP_JPEG                   n/a                          16 +x 8

+ +

  JFIF

+ +

  +  TWCP_JPEG                   n/a                          16 +x 8

+ +

 

+ +

* - DIBs must be aligned on LONG (32-bit) +boundaries.

+ +

 

+ +

** - TIFF can handle 16-bit alignment, but +because the image format can be selected after the image is scanned the Source +has to protect itself and default to 32-bit alignment.  This behavior can +be overridden by going into CONST.INI and adding the line:

+ +

            + ForceAlignment=1

+ +

Under the [dsIdentity] +section.  This will allow for 16-bit aligned TIFF files to be +created.  Note, however, that doing this will result in 16-bit aligned +images if the format is changed to BMP.

+ +

 

+ +

Note: At 150 DPI it is not possible to get +exactly 12" of width or 26" of height.  And, since it is not +possible to exceed these values, in this case the Source automatically +truncates down to the nearest alignment boundary (as appropriate) in order to +produce correct images.

+ +

 

+ +

Note: Auto cropped images may result in output +that is 16-bit aligned.  The Source will correct these for uncompressed +data, but will take no action on compressed images.  In this latter case +the necessary correction must be taken by the application.

+ +

 

+ +

 

+ +

3.12 +Polarity

+ +

Polarity on the IMAGING tab is a +misnomer.  The field shows the current setting of ICAP_PIXELFLAVOR, with +"Black on White" corresponding to TWPF_CHOCOLATE (the

+ +

default), and "White on Black" +corresponding to TWPF_VANILLA.

+ +

 

+ +

The breakdown of what this means for +uncompressed images is as follows:

+ +

 

+ +

                                    +white pixel         black pixel

+ +

TWCP_CHOCOLATE     +1              +        0

+ +

TWCP_VANILLA            +0              +        1

+ +

 

+ +

Unfortunately, in the case of images +compressed with TWCP_GROUP31D, TWCP_GROUP32D and TWCP_GROUP4, the sense (as +perceived by most viewers) has to be as follows:

+ +

 

+ +

                                    +white pixel         black pixel

+ +

TWCP_CHOCOLATE     +0              +        1

+ +

TWCP_VANILLA            +0              +        1

+ +

 

+ +

This becomes most apparent for images +transferred using TWSX_FILE with an image file format of TWFF_TIFF.  Many +viewers ignore the PhotometricInterpretation tag, so +that a correctly constructed TWCP_CHOCOLATE image is shown as white text on a +black background.

+ +

 

+ +

The problem goes further.  Developers +who wish to transfer the image in buffered memory mode would like to see the +*decompressed* image reflect the setting they made with ICAP_PIXELFLAVOR.  +The most obvious solution would be to change the behavior of ICAP_PIXELFLAVOR +to do one thing with TWSX_MEMORY transfers and the other with TWSX_FILE +transfers, but this would penalize those viewers capable of correctly handing +the TIFF PhotometricInterpretation tag.

+ +

 

+ +

The current solution has been to preserve the +legacy behavior, but add a new variable to the CONST.INI file.  This +variable is called OldPolarity, and if set to 0 (OldPolarity=0) it will cause compressed images to support +the use of ICAP_PIXELFLAVOR.

+ +

 

+ +

Application developers:

+ +

The value +to send for ICAP_PIXELFLAVOR is not different based on the compression you desire. If +the desire is to have zero represent black pixels then send TWCP_CHOCOLATE. If the desire is to have zero represent white pixels then +send TWCP_VANILLA.  Of course, that is +just how the raw data is returned to the application. When the application +saves the data to a TIF file, the application needs to make sure it sets the +TIF Photometric tag appropriately. For uncompressed images, the tag always +needs to be one; this will give 'normal' images for Chocolate and inverted +images for Vanilla.  For compressed images, the tag always needs to be +zero; this will give 'normal' images for Chocolate and inverted images for +Vanilla.  This difference has to do with how the Group IV spec says it +interprets the data.

+ +

 

+ +

  

+ +

3.13 +Feeder Keep Alive (3000/4000 Series)

+ +

Feeder keep alive addressed the situation of +the transport timing out before any paper was scanned.  With this value +set to TRUE the Source restarts the transport, allowing the session to wait +forever for the first sheet.  Feeder keep alive was set to TRUE by +default.  This was done because the Source had no way of telling the +application that the transport had halted, which meant that the application +would sit forever, waiting for an image that would never come (and thereby +forcing it to implement its own timer mechanism to declare a session ended).

+ +

 

+ +

Starting with version 1.2.8 there is a +mechanism in place that allows the Source to abort the session.  It works +in the same way as Jam and Multifeed events.  +This new mechanism is only in effect if CAP_FEEDERKEEPALIVE is set to +FALSE.  If it is set to TRUE, then the legacy behavior will occur +(transport running forever).

+ +

 

+ +

When CAP_FEEDERKEEPALIVE is set to FALSE, the +Source will monitor the feeder, and if it stops, then it will issue a +MSG_XFERREADY to the application, pretending that an image has been +captured.  If the Source issues a request for DAT_IMAGEINFO, then the +Source will make up to info from the negotiated capabilities.  When the +application goes to transfer the image, then the Source will immediately report +TWRC_CANCEL, which aborts the session.

+ +

 

+ +

 

+ +

3.14 +Length Detection and Frames (3000/4000 Series)

+ +

Length detection is used to spot multifeeds.  The user selects the size of the document +(off of the Multifeed tab), and if the scanner +detects an attempt to scan anything larger than this value then it will alert +the user.

+ +

 

+ +

Since TWAIN does not have the concept of +document sizes and frames (it just has frames), there is no standard way for +the Source to know what the size of the paper is going to be.  So it does +the next best thing by preventing the user from selecting a length that cuts +through any of the frames.  Consider three frames (FB, RB, FC) on the +scanning bed (S).  The color frame is the bottommost of the set, so it +determined the minimum non-zero value for length detection, as shown by the +=========.

+ +

 

+ +

      ++-----+----+---------+

+ +

      |S    +|FB  |         |

+ +

      +|     |    +|         |

+ +

      +|     ++----+         |

+ +

      +|                    +|

+ +

      |   ++----+           |

+ +

      |   +|RB  |           |

+ +

      |   +|    +|           |

+ +

      |   ++----+           |

+ +

      +|                    +|

+ +

      +|          +----+    |

+ +

      +|          |FC  +|    |

+ +

      +|          |    +|    |

+ +

      |     +     +----+    |

+ +

      +======================

+ +

      +|                    +|

+ +

      +|                    +|

+ +

 

+ +

(Please note that the frames are not labeled +in the real GUI, however it is possible to determine which frame goes with +which camera by right clicking on the line of the box and selecting +"What's This?")

+ +

            +

+ +

The Front Color (FC) frame will prevent the +length line from being less than itself, even if it is not possible to scan +with color (start in color and patch enable are both off).

+ +

 

+ +

If the user wants to have a length detection +line that reflects the bitonal documents only, and +does not plan to scan in color, then the FC box needs to be moved or made +smaller...

+ +

 

+ +

      ++-----+----+---------+

+ +

      |S    +|FB  |         |

+ +

      +|     |    |  +----+ |

+ +

      +|     +----+  |FC  | |

+ +

      +|             +|    | |

+ +

      |   ++----+    +----+ |

+ +

      |   +|RB  |           |

+ +

      |   +|    +|           |

+ +

      |   ++----+           |

+ +

      +|                    +|

+ +

      +======================

+ +

      +|                    +|

+ +

      +|                    +|

+ +

 

+ +

 

+ +

3.15 +MSG_STOPFEEDER Operation

+ +

TWAIN 1.9 provides a way to abort scanning +without losing images when CAP_AUTOSCAN is TRUE.

+ +

 

+ +

DG_CONTROL / DAT_PENDINGXFER / MSG_STOPFEEDER +may be issued in State 6.  When called it will cause the device's feeder +to stop running, but it will in no other way affect the session.  With the +feeder stopped, the Source will eventually transfer all the images from the +device's buffers, and then the session will exit normally, dropping back down +to State 5.

+ +

 

+ +

Note: using DG_CONTROL / DAT_PENDINGXFER / +MSG_RESET will not only cause scanning to stop, it will strand any images +remaining in the scanner's buffers.

+ +

 

+ +

 

+ +

3.16 JPEG Quantization +(3590/4500/i820/i840/i200/i600/i700/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000)

+ +

WARNING: This section deals with settings +that can degrade image quality.  Do not use this feature unless you +clearly understand all the implications.

+ +

 

+ +

There are three ways of selecting the JPEG Quantization.

+ +

1) From the Source's GUI

+ +

2) Using DAT_JPEGCOMPRESSION

+ +

3) Using ICAP_JPEGQUALITY

+ +

 

+ +

The Source's GUI uses information defaulted +in the driver to select the JPEG Quantization tables downloaded to the +scanner.  These values can be overridden in the CONST.INI file by adding a +line like the following:

+ +

 

+ +

            +JpegQuantization_Y_50=12121212171E2630121212141921283...

+ +

            +JpegQuantization_CbCr_50=1212121214191E2312121417191E...

+ +

 

+ +

The Y value selects the Luma +value, and the CbCr value selects the Chroma.  40=draft, 50=good, 80=better, 90=best and +100=superior.  The names for these are defined in each of the language .ini files.  If a new entry is created:

+ +

 

+ +

            +JpegQuantization_Y_10=8888888888888888888888888888888...

+ +

            +JpegQuantization_CbCr_10=8888888888888888888888888888...

+ +

 

+ +

Then it will show up as "10%" +(without the quotes) in the JPEQ Quality dropdown.  The available range of +values is from 0 to 100 in steps of 5.  Note that 100% does not correspond +to a true loss-less JPEG image, though it does select a value that minimizes +the amount of loss.

+ +

 

+ +

ICAP_JPEGQUALITY uses these same values, so +that the same tables can be obtained programmatically, and will be reflected in +the GUI settings, if the Source's GUI is raised.

+ +

 

+ +

DAT_JPEGCOMPRESSION is the older method of +controlling JPEG compression.  Instead of selecting an arbitrary 'quality' +number, this operation directly downloads a JPEG Quantization table to the +scanner.  Any time that this happens the Source will set ICAP_JPEGQUALITY +to TWJQ_UNKNOWN, which will show up at "(application)" in the +Source's GUI.  This setting indicates that the Source does not know the +current quality setting for the JPEG Quantization.

+ +

 

+ +

If the user selects this value from the +Source's GUI, then it will select the values last set by +DAT_JPEGCOMPRESSION.  If there are no values available, then it will leave +the current settings unchanged.

+ +

 

+ +

 

+ +

3.17 Multiple Modes (5xxx/7xxx/9xxx series)

+ +

The following information has not been +certified for production use.  It is presented for customers who wish to +experiment with this feature.  It only applies to drivers certified for +use with the 5xxx/7xxx/9xxx scanners.

+ +

 

+ +

The 'Gemini' scanners +500/500A/900/923/990/5xxx/7xxx/9xxx support 18 modes.  TWAIN in general +has no elegant way of dealing with this kind of complexity, and experience has +shown that the majority of applications do not need it.

+ +

 

+ +

Still, there may be some users who absolutely +require more than one mode.  The Source provides support for this in a few +ways.

+ +

 

+ +

CAP_MODE selects which mode will be the +current mode when scanning begins.  In a default configuration the user +can select one of the modes (1 - 18); once selected they are locked into that +mode for that scanning session.  Changing the mode on the scanner console +and scanning paper with it results in the Source generating an error.

+ +

 

+ +

The ForceAcceptMode +in the CONST.INI file under the [dsIdentity] section +can be used to force the Source to support more than the ICAP_MODE.  The +value is a bit mask with bits 1 - 18 corresponding to those modes that the +Source will be forced to accept images from.  Note, though that forcing +this behavior is not enough.  If the selected mode has not been setup +properly its use can result in unexpected behavior, corrupt images or crashing +of the application.

+ +

 

+ +

The DG_CONTROL / DAT_USERINTERFACE / +MSG_SETUPDS command can be used to set up multiple modes.  The command +sends the session attributes to the current CAP_MODE, but does not initiate +scanning.  This allows the application to set as many modes as it needs +prior to issuing MSG_ENABLEDS to begin image capture.

+ +

 

+ +

The DG_CONTROL / DAT_PASSTHRU / MSG_SET and +MSG_GET can be used to control aspects of the scanner that are not explicitly +described by the Source.  Use of this command is not casually +recommended.  Users who believe that this is the only solution should +contact Eastman Kodak Company before attempting to use it.

+ +

 

+ +

 

+ +

3.18 +DAT_EXTIMAGEINFO

+ +

Please reference the TWAIN_ExtImageInfo.htm +found in the KODAK directory.

+ +

 

+ +

3.19 +ICAP_FRAMES

+ +

There are no requirements in the TWAIN spec +around when ICAP_FRAMES should be available.  Therefore limiting it at any +time could potentially break customers.  When a custom capability renders +ICAP_FRAMES invalid (e.g. ICAP_CROPPING mode set to +TWCR_AUTOMATICBORDERDETECTION or TWCR_AGGRESSIVEAUTOCROP), MSG_SET and +MSG_RESET will still be available (i.e.  frames will be disabled on the +screen, but allowed full access programmatically).

+ +

 

+ +

3.20 Color Dropout: +Enhanced Processing

+ +

Due to hardware constraints it is not +possible to have enhanced color dropout on one camera and normal color dropout +on another.  Any changes to enhanced processing for one camera will +automatically be effected on the other.

+ +

 

+ +

3.21 i30/i40 Button +Mapping

+ +

In order to add an application to send button +events to, you must add the application to the registry at:

+ +

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\StillImage\Registered +Applications

+ +

 

+ +

3.22 Displaying +Scanner Operator/Info Log

+ +

For those scanners that support it, an +application can negotiate the custom CAP_LOG capability, setting it to +TWLH_OPERATOR.

+ +

They can then issue a custom DG_CONTROL / +DAT_USERINTERFACE / MSG_ENABLEINFO, which will bring up the UI with just the +INFO tab, set to the Operator Log.

+ +

#define CAP_LOG         +      0x8082

+ +

#define    +TWLH_OPERATOR      1

+ +

#define    +TWLH_INFO          5

+ +

 

+ +

 

+ +

4.0 +Known Issues

+ +

This section reports known issues with the +Source.

+ +

 

+ +

 

+ +

4.1 +Programmatic Constraints

+ +

The Source does not currently protect itself +from certain combinations of programmatic access.  For instance, it is +possible to set ICAP_CONTRAST and ICAP_THRESHOLD when ICAP_HALFTONES is set to +one of the dithering algorithms.  This behavior does not affect the +ability of the scanner to scan or the quality of its images; however, if an +application is relying on the unavailability of capabilities to control its own +GUI sensitivity, then this problem may become a factor.

+ +

 

+ +

 

+ +

4.1.1 +ICAP_COMPRESSION

+ +

Compression is properly constrained based on +the current value of ICAP_XFERMECH:

+ +

 

+ +

ICAP_XFERMECH        +ICAP_COMPRESSION

+ +

TWSX_NATIVE          TWCP_NONE**

+ +

 

+ +

TWSX_FILE            TWCP_NONE, +TWCP_GROUP31D*,

+ +

                     +TWCP_GROUP32D*, TWCP_GROUP4,

+ +

                     +TWCP_JPEG

+ +

 

+ +

TWSX_MEMORY          TWCP_NONE, +TWCP_GROUP31D*,

+ +

                     +TWCP_GROUP32D*, TWCP_GROUP4,

+ +

                     +TWCP_JPEG

+ +

* - i800 only 

+ +

** - accepts other valid values but resets to +TWCP_NONE automatically

+ +

 

+ +

The Source does not currently protect against +compressions other than TWCP_NONE if the TWSX_FILE image format is TWFF_BMP, +(this error test will be added to the DG_CONTROL / DAT_SETUPXFERFILE / MSG_SET +in a later version).

+ +

                        +

+ +

Because of this dependency, the Source does +not remember the last setting of compression, but will always default to +TWCP_NONE (because the Source's power on default for ICAP_XFERMECH is +TWSX_NATIVE).

+ +

 

+ +

This can be annoying for users working with +Applications that rely solely on the Source's GUI.  If the user wishes to +use any compression other than TWCP_NONE then they must reset it each time the +Source is restarted.

+ +

 

+ +

A workaround is available in this +release.  Users wishing to override the default behavior may do so by +editing the const.ini file, going to the [SkipDependency] +section, and changing the value of ICAP_COMPRESSION from 0 to 1.

+ +

 

+ +

Please note, making this change may cause +unwanted behavior with Applications that do not rely on the Source's GUI.  +If unexpected side-effects occur then reset the value back to 0.

+ +

 

+ +

The Source protects itself when the +ICAP_XFERMECH is TWSX_NATIVE by always setting the compression to  +TWCP_NONE.

+ +

 

+ +

 

+ +

4.2 +Delay with MSG_ENDXFER

+ +

Programmers will notice that if there is no +paper in the scanner's feeder the TWAIN message DG_CONTROL / DAT_PENDINGXFERS / +MSG_ENDXFER will not return until the transport timeout occurs.  This is a +part of the design of the Source, since the scanner cannot properly determine +how to set pTW_PENDINGXFERS.Count until it scans the +next piece of paper or the transport times out.  Users requiring +MSG_ENDXFER to be more responsive must use a smaller transport timeout value.

+ +

 

+ +

Beginning with version 3.x there is a +programmatic workaround for this problem using the custom CAP_NOWAIT +capability.  Setting this value to TRUE will result in any blocking call +immediately returning TWRC_BUSY until the request is complete.  See the +KDSCUST.H file for more information.

+ +

 

+ +

 

+ +

4.3 +Fix for Overscan (3xxx Series)

+ +

Firmware 1.0.21 of the 3500 has a bug in overscan.  If the top and bottom sides are set to overscan and scanning is done, and then the top and bottom +sides are set to no-overscan and scanning is done, +then it will be noticed that the bottom image has done top overscan, +even though the scanner has been set to no top overscan +and reports no top overscan.

+ +

 

+ +

The Source gets around this problem by +downloading the bottom settings twice.  This behavior is controllable from +the CONST.INI file in the [ICAP_OVERSCAN] section under the FixOverscan +flag.  The default value for the flag is 1, which is what causes the rear +to be downloaded twice.  There is no measurable performance benefit from +setting this flag to 0, so it should remain at 1, even if the user does not use +overscan.

+ +

 

+ +

Update:  As of firmware (3500 v1.1.4, 3510 +v1.0.10, 3590 v1.0.6) this problem was fixed.  So, starting with version +v1.2.5 of the Source the FixOverscan flag will +default to 0.

+ +

 

+ +

 

+ +

4.4 +DEFAULTS button does not affect the following...

+ +

Pressing the DEFAULTS button on the GUI will +reset most of the capabilities to their default settings, with the following +exceptions (note that not all of these values are present in the Source's GUI):

+ +

 

+ +

CAP_DEVICEEVENT

+ +

CAP_DEVICEONLINE

+ +

CAP_DEVICETIMEDATE

+ +

CAP_DISABLEFIELDINUI

+ +

CAP_MAXBATCHBUFFERS

+ +

CAP_NOWAIT

+ +

CAP_SCSIADAPTERTARGET

+ +

CAP_SERIALNUMBER

+ +

ICAP_IMAGEFILEFORMAT

+ +

ICAP_XFERMECH

+ +

 

+ +

 

+ +

4.5 +TIFF JPEG +(3590/4500/i820/i840/i600/i700/i200/i900/i1100/i1200/i1300/i1400/i1800/i2000/i2900/i3000/i4000/i5000)

+ +

This Source provides support for TIFF/JPEG +images (accessed by specifying a value of TWSX_FILE for ICAP_XFERMECH, +specifying TWCP_JPEG for the value of ICAP_COMPRESSION, and requesting +TWFF_TIFF for the file format when calling DAT_SETUPFILEXFER).

+ +

 

+ +

The resultant image is generated following +the "TIFF Technical Note #2".  The following is a dump of a +sample image created using the scanner simulator.

+ +

 

+ +

Reading file: i0000002.tif

+ +

The file size is 21690 bytes.

+ +

Intel (little endian) byte +order

+ +

IFD OFFSET = 8

+ +

The number of tags = 16

+ +

Tag                               Type            Length          Value

+ +

254 New Subfile +Type              LONG     +       1               0

+ +

255 Subfile +Type            +      SHORT    +       1               1

+ +

256 Image +Width            +       LONG     +       1               832

+ +

257 Image +Length             +     LONG     +       1               1176

+ +

258 Bits Per Sample      +         SHORT    +       3               <206> +8 8 8

+ +

259 +Compression           +        SHORT    +       1               7

+ +

262 +Photometric            +       SHORT    +       1               6

+ +

273 Strip +Offsets            +     LONG     +       1               252

+ +

277 Samples Per +Pixel             SHORT    +       1               3

+ +

278 Rows Per Strip        +        LONG     +       1               1176

+ +

279 Strip Byte +Counts             LONG     +       1               21438

+ +

282 X +Resolution            +      RATIONAL        +1               <212> +100 / 1

+ +

283 Y +Resolution           +       RATIONAL +       1               <220> +100 / 1

+ +

296 Resolution +Unit        +       SHORT    +       1               2

+ +

530 YCbCr +Sub-sampling            +SHORT    +       2               2 +2

+ +

532 Reference Black +White         +LONG     +       6               <228>

+ +

 

+ +

Items of note include the following.  +Compression is set to '7', per Note 2.  JPEG Compression in TIFF v6 was +set to a value of '6'.  Photometric interpretation is set to 6, which +indicates YCbCr for the JPEG encoding.  Finally, +the YCbCr Sub-sampling is present, and set to 2 2.

+ +

 

+ +

Prior to this release the TWAIN Source +attempted to follow the TIFF v6 guidelines for TIFF/JPEG generation.  +Since "Note #2" depreciates that part of the TIFF v6 spec, this +"Note #2" method comprises the only 'standard' way of generating +TIFF/JPEG images.

+ +

 

+ +

It is still possible to get the TWAIN Source +to create TIFF/JPEG images in the older style.  Please contact your +Eastman Kodak Company representative if you absolutely have to have this +feature.

+ +

 

+ +

 

+ +

4.6 +Scanner Does Not Always Report Jams (5xxx/7xxx/9xxx)

+ +

The 5xxx/7xxx/9xxx series of scanners with +Document Image Management may not always report jam conditions to the TWAIN +Source.  Scanners without the Document Image Manager always correctly +report the occurrence of the jam.

+ +

 

+ +

Pressing the End Of Job button on a 9000 +series scanner will usually flush the jam error to the TWAIN Source.

+ +

 

+ +

TWAIN sessions with 5000/7000 series scanners +will appear to end normally, as if the session had been terminated by the +operator.

+ +

 

+ +

Jams are always reported on the scanner +console, so operators are encouraged to go there to learn the reason for +unexpected stoppages during a scanning session.

+ +

            +

+ +

 

+ +

 

+ +

5.0 +Acknowledgements

+ +

This section acknowledges code used by other +vendors in the development of this TWAIN driver.

+ +

 

+ +

 

+ +

5.1 +Intel(r) JPEG Library

+ +

The Intel(r) JPEG Library (IJL) is a high +performance API for compressing/decompressing JPEG images.  Information on +it can be obtained at Intel's website: http://developer.intel.com

+ +

 

+ +

 

+ +

5.2 +Picture Elements(tm) ChromaTHR(tm), 3590/4500, 4.x +only

+ +

Picture Elements(tm) software converts color +images to bitonal using their ChromaTHR(tm) +technology.  Hardware support may be purchased from them by customers +requiring higher quality images at production scanner speeds.  For more +information, please refer to the Picture Elements website: http://www.picturel.com

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/kdscust.h b/Spec/Kodak/kdscust.h new file mode 100644 index 0000000..9ff0f3a --- /dev/null +++ b/Spec/Kodak/kdscust.h @@ -0,0 +1,3846 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Kodak Document Scanner TWAIN Source +// Custom Stuff... +// +// Copyright (c) 1998-2013 Eastman Kodak Company, All Rights Reserved +// +// Altering the information in this file is not authorized except +// with the express consent of Eastman Kodak Company. The values +// of the constants in this file are set at the discretion of +// Eastman Kodak Company. New constants may be added at any +// time and old ones may be removed or modified at any time. +// +// The capabilities contained in this header file are unique to the +// Kodak Digital Science(tm) Scanners. As such, the application +// has a responsibility to verify that it is communicating with +// this Source before attempting to use them. Verification is +// accomplished by examining the TW_IDENTITY structure returned by +// the Source from the DG_CONTROL / DAT_PARENT / MSG_OPENDS call. +// This Source reports its identity in the following fields: +// +// TW_IDENTITY +// Manufacturer "Eastman Kodak Company" +// Version.Info "KDS v#.#.# YYYY/MM/DD" +// +// By looking at the Manufacturer name, and looking for KDS as the +// first three letters in the Version.Info, it should be possible +// for an application to unambiguously identify this Source. +// +// +// The Family names break down into the following models... +// +// GEMINI (kds): +// 500, 500A, +// 900, 923, 990, +// 5500, 5520, +// 7500, 7520, 7550, 7560, +// 9500, 9520 +// +// VIPER (kds): +// 3500, 3510, 3520, 3590, +// 4500 +// +// PRISM (kds_i800): +// i810, i820, i830, i840 +// +// PHOENIX (kds_i600): +// i610, i620, i640, i660 +// +// ALIEN (kds_i200): +// i250, i260, i280 +// +// Alf (kds_i100): +// i150, i160 +// +// Pony (kds_i30_i40): +// i30, i40, i40T +// +// MUSTANG2 (kds_i55_i65): +// i55, i65 +// +// PIRANHA (kds_i1300): +// i1310, i1320 +// +// PIRANHA1200 (kds_i1200): +// i1210, i1220 +// +// WILDFIRE (kds_i1800): +// i1840, i1860 +// +// A2O2 (kds_i1400): +// i1410, i1420, i1440 +// +// Fosters (kds_i1100): +// i1120 +// +// Inferno (kds_i700): +// i720, i730, i750, i780 +// +// Panther (kds_i4200_i4600): +// i4200, i4600 +// +// Blaze (kds_i5000): +// i5200, i5600, i5800 +// +// Piranha2 (kds_i2000): +// i2400, i2600, i2800 +// +// Rufous (kds_i900): +// i920 +// +// FalconA4 (kds_i2900): +// i2900 +// +// FalconA3 (kds_i3000): +// i3000 +// +// Piranha2stw (kds_pss): [Note: This scanner family supports the same +// PS50, PS80 list of capabilities as the Piranha2 +// (kds_i2000) scanner family.] +// +// For more information about these capabilities and the driver, +// please refer to the Integrator's Guide on the media that came +// with your scanner. +// +// ************************************************************** +// This file does not conform to the 2-byte packing rule for +// TWAIN, it should use the default packing for the compiler... +// ************************************************************** +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef KDSCUST_H +#define KDSCUST_H + + + +//////////////////////////////////////////////////////////////////////////////// +// INCLUDE FILES +//////////////////////////////////////////////////////////////////////////////// + +#ifdef _WIN32 +#include "twain.h" +#endif + + + +//////////////////////////////////////////////////////////////////////////////// +// DEFINES, TYPEDEFS, CONSTS & ENUMS +//////////////////////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////////////////////// +// CAP Section +//////////////////////////////////////////////////////////////////////////////// + + + +// CAP_BACKGROUND +// Family: A2O2, Alf, Blaze, Falcon, Fosters, Inferno, Mustang2, Panther, +// Phoenix, Piranha, Piranha2, Rufous, Wildfire +// Type: TWTY_INT16 +// Container: Enumeration +// Allowed: TWBK_BLACK, TWBK_WHITE +// Default: (scanner dependent) +// Notes: Reports what the scanner background was at the +// time the scanner was started. This capability +// cannot detect a "hot" change. +// For Blaze and Panther, it allows the user to select the color +// of the imaging background. This can be set differently per side. +#define CAP_BACKGROUND 0x8089 +#define TWBK_BLACK 0 +#define TWBK_WHITE 1 + + +// CAP_BACKGROUNDFRONT +// Family: A2O2, Alf, Blaze, Falcon, Fosters, Panther, Piranha, Piranha2, +// Rufous +// Type: TWTY_INT16 +// Container: Enumeration +// Allowed: TWBF_BLACK, TWBF_WHITE +// Default: (scanner dependent) +// Notes: Reports what the scanner front background was at the +// time the scanner was started. This capability +// cannot detect a "hot" change. +#define CAP_BACKGROUNDFRONT 0x808C +#define TWBF_BLACK 0 +#define TWBF_WHITE 1 + + +// CAP_BACKGROUNDREAR +// Family: A2O2, Alf, Blaze, Falcon, Fosters, Panther, Piranha, Piranha2, +// Rufous +// Type: TWTY_INT16 +// Container: Enumeration +// Allowed: TWBR_BLACK, TWBR_WHITE +// Default: (scanner dependent) +// Notes: Reports what the scanner rear background was at the +// time the scanner was started. This capability +// cannot detect a "hot" change. +#define CAP_BACKGROUNDREAR 0x808D +#define TWBR_BLACK 0 +#define TWBR_WHITE 1 + + +// CAP_BACKGROUNDPLATEN +// Family: n/a +// Type: TWTY_INT16 +// Container: Enumeration +// Allowed: TWBP_BLACK, TWBP_WHITE +// Default: (scanner dependent) +// Notes: Reports what the scanner background was at the +// time the scanner was started. This capability +// cannot detect a "hot" change. +// This capability is not available at this time. +#define CAP_BACKGROUNDPLATEN 0x808E +#define TWBP_BLACK 0 +#define TWBP_WHITE 1 + + +// CAP_BATCHCOUNT +// Family: Prism, Wildfire +// Type: TWTY_FIX32 +// Container: Range +// Allowed: 0 - 32767 +// Default: 0 +// Notes: Count of CAP_BATCHLEVEL's... +#define CAP_BATCHCOUNT 0x802B + + +// CAP_BATCHENDFUNCTION +// Family: Prism, Wildfire +// Type: TWTY_INT16 +// Container: Enumeration (per camera) +// Allowed: TWPL_NONE, TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3 +// Default: TWPL_NONE +// Notes: Determines the level that batching will count +// and test against the batch counting value. +#define CAP_BATCHENDFUNCTION 0x804F +#define TWBE_NONE 0 +#define TWBE_STOPFEEDER 1 +#define TWBE_ENDOFJOB 2 +#define TWBE_NEWBATCH 3 + + +// CAP_BATCHLEVEL +// Family: Prism, Wildfire +// Type: TWTY_INT16 +// Container: Enumeration (per camera) +// Allowed: TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3 +// Default: TWPL_LEVEL1 +// Notes: Determines the level that batching will count +// and test against the batch counting value. +#define CAP_BATCHLEVEL 0x804E + + +// CAP_BATCHSTARTFUNCTION +// Family: Prism, Wildfire +// Type: TWTY_INT16 +// Container: Enumeration (per camera) +// Allowed: TWPL_NONE, TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3 +// Default: TWPL_NONE +// Notes: Level that a batch should start in... +#define CAP_BATCHSTARTFUNCTION 0x803F + + +// CAP_BINARIZATION +// Family: Viper (3590 only) +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Controls the presence of binarization in the +// camera control. It also overrides the value +// of the front bitonal CAP_CAMERAENABLE. +#define CAP_BINARIZATION 0x8030 + + +// CAP_BLANKPAGE +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Mustang2, Panther, Phoenix, +// Piranha, Piranha2, Pony, Rufous, Wildfire +// Type: TW_UINT16 +// Container: Enumeration +// Allowed: TWBP_IMAGE +// Default: TWBP_IMAGE +// Notes: Blank image deletion (values 0 and 2 can not used, they became obsolete) +#define CAP_BLANKPAGE 0x809A +#define TWBP_IMAGE 1 + + +// CAP_BLANKPAGEMODE +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Mustang2, Panther, Phoenix, +// Piranha, Piranha2, Pony, Rufous, Wildfire +// Type: TW_UINT16 +// Container: Enumeration +// Allowed: TWBM_NONE, TWBM_COMPSIZE, TWBM_CONTENT +// Default: TWBM_NONE +// Notes: Blank image deletion mode. Not all values are supported on all scanners. +#define CAP_BLANKPAGEMODE 0x809B +#define TWBM_COMPSIZE 0 +#define TWBM_NONE 1 +#define TWBM_CONTENT 2 + + +// CAP_BLANKPAGECOMPSIZEBW +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Mustang2, Panther, Phoenix, +// Piranha, Piranha2, Pony, Rufous, Wildfire +// Type: TW_UINT32 +// Container: Range +// Allowed: 0 to 1000KB +// Default: 0 +// Notes: Delete Bitonal image if the final size is less than specific amount. +// Value needs to be in 1024 increments +// The front and rear values must be the same on Mustang2 and Pony +// When set to a non-zero value: CAP_BLANKPAGEMODE is automatically +// set to TWBM_COMPSIZE +// If set zero and CAP_BLANKPAGECOMPSIZEBW and CAP_BLANKPAGECOMPSIZEGRAY +// are zero, then CAP_BLANKPAGEMODE is automatically changed to TWBM_NONE +#define CAP_BLANKPAGECOMPSIZEBW 0x809C + + +// CAP_BLANKPAGECOMPSIZEGRAY +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Mustang2, Panther, Phoenix, +// Piranha, Piranha2, Pony, Rufous, Wildfire +// Type: TW_UINT32 +// Container: Range +// Allowed: 0 to 1000KB +// Default: 0 +// Notes: Delete Gray image if the final size is less than specific amount. +// Value needs to be in 1024 increments +// The front and rear values must be the same on Mustang2 and Pony +// When set to a non-zero value: CAP_BLANKPAGEMODE is automatically +// set to TWBM_COMPSIZE +// If set zero and CAP_BLANKPAGECOMPSIZEBW and CAP_BLANKPAGECOMPSIZEGRAY +// are zero, then CAP_BLANKPAGEMODE is automatically changed to TWBM_NONE +#define CAP_BLANKPAGECOMPSIZEGRAY 0x809D + + +// CAP_BLANKPAGECOMPSIZERGB +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Mustang2, Panther, Phoenix, +// Piranha, Piranha2, Pony, Rufous, Wildfire +// Type: TW_UINT32 +// Container: Range +// Allowed: 0 to 1000KB +// Default: 0 +// Notes: Delete Color image if the final size is less than specific amount. +// Value needs to be in 1024 increments +// The front and rear values must be the same on Mustang2 and Pony +// When set to a non-zero value: CAP_BLANKPAGEMODE is automatically +// set to TWBM_COMPSIZE +// If set zero and CAP_BLANKPAGECOMPSIZEBW and CAP_BLANKPAGECOMPSIZEGRAY +// are zero, then CAP_BLANKPAGEMODE is automatically changed to TWBM_NONE +#define CAP_BLANKPAGECOMPSIZERGB 0x809E + + +// CAP_BLANKPAGECONTENT +// Family: A2O2, Blaze, Falcon, Panther, Piranha, Piranha2 +// Type: TW_UINT32 +// Container: Range +// Allowed: 0 to 100 +// Default: 0 +// Notes: If the percent of content on the image is less than or equal to +// this amount, the image will be deleted. This is only valid when +// CAP_BLANKPAGEMODE is set to TWBM_CONTENT +#define CAP_BLANKPAGECONTENT 0x80C4 + + +// CAP_CAMERAENABLE +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, Mustang2, +// Panther, Phoenix, Piranha, Piranha2, Pony, Prism, +// Rufous, Wildfire, Viper +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: TRUE (except for the 3590 front bitonal) +// Notes: Controls the delivery of images. If this capability +// is set to TRUE then the Source will deliver an image +// for this camera during scanning. You need to use +// DAT_FILESYSTEM to address each of the cameras. +#define CAP_CAMERAENABLE 0x801D + + +// CAP_CAMERAORDER +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, +// Prism, Rufous, Wildfire, Viper +// Type: TWTY_UINT16 +// Container: Array +// Allowed: TWCM_BW_BOTH, TWCM_CL_BOTH +// Default: TWCM_CL_BOTH, TWCM_BW_BOTH +// Notes: Selects the ordering of the cameras according to the +// order that they appear in the list. So the default +// indicates that a color front or rear will precede a +// bitonal front or rear. +// +// There is a conflict between the standard TWAIN CAP_CAMERAORDER and +// the Kodak custom CAP_CAMERAORDER. The standard version has a value +// of 0x1037 and uses the TWPT_* values. The Kodak version can be seen +// below. This driver does not support the TWAIN 2.0 version of this +// capability. An application must use the Kodak version to talk to a +// Kodak driver. +#ifdef CAP_CAMERAORDER + #undef CAP_CAMERAORDER +#endif +#define CAP_CAMERAORDERSTANDARD 0x1037 +#define CAP_CAMERAORDER 0x801E +#define TWCM_BW_BOTH 0 +#define TWCM_BW_TOP 1 +#define TWCM_BW_BOTTOM 2 +#define TWCM_CLBW_BOTH 3 +#define TWCM_CL_TOP 4 +#define TWCM_CL_BOTTOM 5 +#define TWCM_CL_BOTH 6 +#define TWCM_GR_TOP 7 +#define TWCM_GR_BOTTOM 8 +#define TWCM_GR_BOTH 9 + + +// CAP_CHECKDIGIT +// Family: Prism, Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: To set the check image address digit ON/OFF. +#define CAP_CHECKDIGIT 0x808B + + +// CAP_DOCUMENTCOUNT +// Family: Gemini +// Type: TWTY_STR32 +// Container: OneValue +// Allowed: 0 - 999,999,999 +// Default: 0 +// Notes: 5000/7000/9000 only. Sets the document count, but +// only if CAP_PRINTERENABLED is either undefined or +// set to FALSE. +#define CAP_DOCUMENTCOUNT 0x8017 + + +// CAP_DOCUMENTCOUNTENABLED +// Family: Gemini +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: 5000/7000/9000 only. Determines whether or not +// the CAP_DOCUMENTCOUNT is to be downloaded. +#define CAP_DOCUMENTCOUNTENABLED 0x8018 + + +// CAP_DOUBLEFEEDENDJOB +// Family: Inferno, Blaze, Falcon, Panther, Phoenix, Piranha2, Prism, +// Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Controls the action the scanner takes when a double +// feed is detected. A value of TRUE will cause the +// session to be terminated. A value of FALSE will +// cause the multifeed to be ignored (though an audible +// alarm will still be sounded, if it is turned on). +#define CAP_DOUBLEFEEDENDJOB 0x806E + + +// CAP_DOUBLEFEEDSTOP +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, Prism, +// Rufous, Wildfire, Viper +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Controls the action the scanner takes when a double +// feed is detected. A value of TRUE will cause the +// session to be terminated. A value of FALSE will +// cause the multifeed to be ignored (though an audible +// alarm will still be sounded, if it is turned on). +#define CAP_DOUBLEFEEDSTOP 0x8056 + + +// CAP_DUALSTACKINGENABLED +// Family: Blaze +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Indicates if the Controlled Dual Stacking Accessory is +// enabled. It can only be enabled if the accessory is +// installed. +#define CAP_DUALSTACKINGENABLED 0x8110 + + +// CAP_DUALSTACKINGLENGTHMODE +// Family: Blaze +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: Scanner specific +// Default: TWDSLM_NONE +// Notes: Indicates the length method being used to make document sorting decisions +// for the Controlled Dual Stacking Accessory. The stacking length mode +// only has meaning if CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGLENGTHMODE 0x8111 +#define TWDSLM_NONE 0 +#define TWDSLM_LESSTHAN 1 +#define TWDSLM_GREATERTHAN 2 +#define TWDSLM_BETWEEN 3 + + +// CAP_DUALSTACKINGLENGTH1 +// Family: Blaze +// Type: TWTY_FIX32 +// Container: Range +// Allowed: Scanner-specific +// Default: Scanner-specific (min range value) +// Notes: Dual stacking length1 (in ICAP_UNITS). +// If CAP_DUALSTACKINGLENGTHMODE is "less than", then any documents shorter +// than this value will be placed in the selected CAP_DUALSTACKINGSTACK. +// If CAP_DUALSTACKINGLENGTHMODE is "greater than", then any documents longer +// than this value will be placed in the selected CAP_DUALSTACKINGSTACK. +// If CAP_DUALSTACKINGLENGTHMODE is "between", then any documents longer than +// this value and shorter than CAP_DUALSTACKINGLENGTH2 will be placed in the +// selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE and CAP_DUALSTACKINGLENGTHMODE +// is set to any value other than TWDSLM_NONE. +// The range is determined by the scanner, so an application +// might want to ask what the range is. +#define CAP_DUALSTACKINGLENGTH1 0x8112 + + +// CAP_DUALSTACKINGLENGTH2 +// Family: Blaze +// Type: TWTY_FIX32 +// Container: Range +// Allowed: Scanner-specific +// Default: Scanner-specific (min range value) +// Notes: Dual stacking length2 (in ICAP_UNITS). +// If CAP_DUALSTACKINGLENGTHMODE is "between", then any documents longer than +// CAP_DUALSTACKINGLENGTH1 and shorter than CAP_DUALSTACKINGLENGTH2 will be +// placed in the selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE and CAP_DUALSTACKINGLENGTHMODE +// is set to TWDSLM_BETWEEN. +// The range is determined by the scanner, so an application +// might want to ask what the range is. +#define CAP_DUALSTACKINGLENGTH2 0x8113 + + +// CAP_DUALSTACKINGMULTIFEED +// Family: Blaze +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Indicates if Multifeed documents should be placed in +// the selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGMULTIFEED 0x8114 + + +// CAP_DUALSTACKINGPATCHTRANSFER +// Family: Blaze +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Indicates if Patch Type Transfer documents should be placed in +// the selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGPATCHTRANSFER 0x8115 + + +// CAP_DUALSTACKINGPATCHTYPE1 +// Family: Blaze +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Indicates if Patch Type 1 documents should be placed in +// the selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGPATCHTYPE1 0x8116 + + +// CAP_DUALSTACKINGPATCHTYPE2 +// Family: Blaze +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Indicates if Patch Type 2 documents should be placed in +// the selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGPATCHTYPE2 0x8117 + + +// CAP_DUALSTACKINGPATCHTYPE3 +// Family: Blaze +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Indicates if Patch Type 3 documents should be placed in +// the selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGPATCHTYPE3 0x8118 + + +// CAP_DUALSTACKINGPATCHTYPE4 +// Family: Blaze +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Indicates if Patch Type 4 documents should be placed in +// the selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGPATCHTYPE4 0x8119 + + +// CAP_DUALSTACKINGPATCHTYPE6 +// Family: Blaze +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Indicates if Patch Type 6 documents should be placed in +// the selected CAP_DUALSTACKINGSTACK. +// Only valid if CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGPATCHTYPE6 0x811A + + +// CAP_DUALSTACKINGSTACK +// Family: Blaze +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: Scanner specific +// Default: TWDSS_STACK1 +// Notes: Which stack a document should drop into +// based on stacking criteria. Only valid if +// CAP_DUALSTACKINGENABLED is TRUE. +#define CAP_DUALSTACKINGSTACK 0x811B +#define TWDSS_STACK1 1 +#define TWDSS_STACK2 2 + + +// CAP_EASYSTACKING +// Family: Inferno, Phoenix, Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: If set to TRUE then the scanner makes adjustments +// to improve the arrangement of the output stack as +// the paper exits the transport. +#define CAP_EASYSTACKING 0x8075 + + +// CAP_ENABLECOLORPATCHCODE +// Family: Viper (3590) +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Controls recognition of the 3590 patch page. +#define CAP_ENABLECOLORPATCHCODE 0x8054 + + +// CAP_ENERGYSTAR +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, Mustang2, +// Panther, Phoenix, Piranha, Piranha2, Pony, Rufous, Wildfire +// Type: TWTY_INT32 +// Container: Range +// Allowed: Alien: 0, 15 - 60 (minutes) +// Alf/Inferno/Mustang2/Phoenix/Pony/Wildfire: 0, 5 - 60 (minutes) +// A2O2/Fosters/Piranha: 0, 5 - 240 (minutes) +// Blaze/Panther/Piranha2: 5 - 240 (minutes) +// Falcon/Rufous: 1 - 240 (minutes) +// Default: 15 +// Notes: Minutes of idle time before Energy Star kicks in... +#define CAP_ENERGYSTAR 0x802F + + +// CAP_FEEDERKEEPALIVE +// Family: Viper +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Controls the behavior of the feeder in the following way: +// +// State ICAP_XFERCOUNT First Page All Other Pages +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// FALSE -1 Timeout Timeout +// FALSE >0 Timeout Timeout +// TRUE -1 Keep Alive Timeout +// TRUE >0 Keep Alive Timeout +// +// The effect when TRUE from the user's perspective is that if the +// transport times out while waiting for the first sheet of paper, +// the Source will reenable the scanner, and start the transport +// back up again. It will continue to do this until it gets the +// first sheet of paper, or until the user stops the scanner from +// the application. +#define CAP_FEEDERKEEPALIVE 0x8001 + + +// CAP_FEEDERMODE +// Family: A2O2 (i1440), Alien (i280), Blaze, Falcon, Panther, Piranha2 +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: A2O2, Alien: TWFM_NONE, TWFM_SPECIAL +// Others: Scanner specific +// Default: A2O2, Alien: TWFM_NONE +// Others: Scanner specific +// Notes: Selects TWFM_NONE will show Off on the UI +// and TWFM_SPECIAL is On on the UI +// CAP_FEEDERMODE is for Special Document +#define CAP_FEEDERMODE 0x806F +#define TWFM_NONE 0 +#define TWFM_SPECIAL 1 +#define TWFM_STACKINGIMPROVED 2 +#define TWFM_STACKINGBEST 3 +#define TWFM_FRAGILE 4 +#define TWFM_LIGHTWEIGHT 5 +#define TWFM_THICK 6 +#define TWFM_THIN 7 + + +// CAP_FIXEDDOCUMENTSIZE +// Family: Viper (not 3500) +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Controls the scanner speed-up feature. Note that this +// feature cannot be used with overscan. And it does +// require that all the documents in the batch be of the +// same size. +#define CAP_FIXEDDOCUMENTSIZE 0x8055 + + +// CAP_FOLDEDCORNER +// Family: Inferno, Phoenix +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: TWFC_DISABLED, TWFC_STOP, TWFC_ENDOFJOB +// Default: TWFC_DISABLED +// Notes: Controls Folded Corner detection and the action taken +// if one is discovered during scanning... +#define CAP_FOLDEDCORNER 0x8070 +#define TWFC_DISABLED 0 +#define TWFC_STOPFEEDER 1 +#define TWFC_ENDOFJOB 2 +#define TWCC_FOLDEDCORNER 0x8001 +#define TWDE_FOLDEDCORNER 0x8001 + + +// CAP_FOLDEDCORNERSENSITIVITY +// Family: Inferno, Phoenix +// Type: TWTY_UINT16 +// Container: Range +// Allowed: 1 - 100 +// Default: 2 +// Notes: Controls the folded corner sensitivity, if folder +// corner detection is turned on... +#define CAP_FOLDEDCORNERSENSITIVITY 0x8071 + + +// CAP_FUNCTIONKEY* +// Family: Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: TWFK_NONE +// Notes: i800 series only. Controls the action taken by the +// function keys during a scanning session... +#define CAP_FUNCTIONKEY1 0x8037 +#define CAP_FUNCTIONKEY2 0x8038 +#define CAP_FUNCTIONKEY3 0x8039 +#define CAP_FUNCTIONKEY4 0x803A // not used +#define TWFK_NONE 0 +#define TWFK_ENDOFJOB 1 +#define TWFK_TERMINATEBATCH 2 +#define TWFK_SKIPMULTIFEED 3 +#define TWFK_SKIPPRINTING 4 +#define TWFK_SKIPPATCH 5 +#define TWFK_LOWERELEVATOR 6 + + +// CAP_IMAGEADDRESS +// Family: Gemini, Prism, Wildfire +// Type: TWTY_STR255 +// Container: OneValue +// Allowed: The image address string... +// Default: Scanner Next Image Address (read from device) +// Notes: 800/5000/7000/9000 only. Sets the image address. +#define CAP_IMAGEADDRESS 0x8015 + + +// CAP_IMAGEADDRESSENABLED +// Family: Gemini +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: 5000/7000/9000 only. Determines whether or not +// the CAP_IMAGEADDRESS is to be downloaded. +#define CAP_IMAGEADDRESSENABLED 0x8016 + + +// CAP_IMAGEADDRESSTEMPLATES +// Family: Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see below) +// Default: TWIA_1 +// Notes: 800 only. Determines what kind of image address +// format is allowed. See CONST.INI for the user +// selectable list of formats, and the language files +// L_XX_XXX.INI for the associated text in the image +// address presets dropdown list. Note that, like +// with ICAP_HALFTONES and ICAP_SUPPORTEDSIZES, it is +// not really possible for an application to know +// what the user is selecting, it just has to be +// accepted blindly. +#define CAP_IMAGEADDRESSTEMPLATES 0x803E +#define TWIA_CUSTOM -1 +#define TWIA_NONE 0 +#define TWIA_1 1 +#define TWIA_2 2 +#define TWIA_3 3 +#define TWIA_4 4 +#define TWIA_5 5 +#define TWIA_6 6 +#define TWIA_7 7 +#define TWIA_8 8 +#define TWIA_9 9 +#define TWIA_10 10 +#define TWIA_11 11 +#define TWIA_12 12 +#define TWIA_13 13 +#define TWIA_14 14 +#define TWIA_15 15 +#define TWIA_16 16 + + +// CAP_IMAGEADDRESS_A +// CAP_IMAGEADDRESS_B +// CAP_IMAGEADDRESS_C +// CAP_IMAGEADDRESS_D +// Family: Prism, Wildfire +// Type: TWTY_STR255 +// Container: OneValue +// Allowed: The image address template fields... +// Default: (see CAP_IMAGEADDRESSTEMPLATES) +// Notes: 800 only. Specifies the meaning and the maximum sizes +// of the fields in the image address. A value of 'f' +// indicates a fixed field. Values of 1, 2, 3 indicate +// level fields. The number of characters determines the +// maximum allowed in that field. +#define CAP_IMAGEADDRESS_A 0x804A +#define CAP_IMAGEADDRESS_B 0x804B +#define CAP_IMAGEADDRESS_C 0x804C +#define CAP_IMAGEADDRESS_D 0x804D + + +// CAP_IMAGEMERGE +// Family: A2O2, Falcon, Fosters, Panther, Piranha, Piranha2, Rufous +// Type: TW_UINT16 +// Container: Enumeration +// Allowed: TWIM_NONE, TWIM_FRONTONTOP, TWIM_FRONTONBOTTOM, +// TWIM_FRONTONLEFT, TWIM_FRONTONRIGHT +// Default: TWIM_NONE +// Notes: Merges the front and back images into a single image that is +// returned to the application. +#define CAP_IMAGEMERGE 0x80C5 +#define TWIM_NONE 0 +#define TWIM_FRONTONTOP 1 // front is on top of the back +#define TWIM_FRONTONBOTTOM 2 // back is on top of front +#define TWIM_FRONTONLEFT 3 // front is to the left of the back +#define TWIM_FRONTONRIGHT 4 // back is to the left of the front + + +// CAP_IMAGESDIFFERENT +// Family: Blaze, Falcon, Panther, Piranha2 +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: When this is TRUE the user can set different values for the +// color and bitonal cameras. When set to FALSE a value set +// on a color camera will be matched (if possible) by the bitonal +// camera, and vice versa. +#define CAP_IMAGESDIFFERENT 0x8100 + + +// CAP_INDICATORSWARMUP +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, Mustang2, +// Panther, Phoenix, Piranha, Piranha2, Pony, Rufous, +// Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Controls the appearance of the LampSaver and Warmup +// dialogs. Only turn this off if these dialogs are +// interfering with the operation of your application. +// For version 9.3 drivers and up, if lamps are not +// warmed-up at scan time, your application can be told +// the number of seconds remaining before scanning will +// begin; refer to TWDE_LAMPWARMUP in CAP_DEVICEEVENT +// for more information. +#define CAP_INDICATORSWARMUP 0x806C + + +// CAP_INTELLIGENTDOCUMENTPROTECTION +// Family: Falcon +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: See below... +// Default: TWIDP_NORMAL +// Notes: ADF only. Controls the level of document protection. +#define CAP_INTELLIGENTDOCUMENTPROTECTION 0x810D +#define TWIDP_NONE 0 +#define TWIDP_MINIMUM 1 +#define TWIDP_NORMAL 2 +#define TWIDP_MAXIMUM 3 + + +// CAP_LEVELTOFOLLOW1 +// CAP_LEVELTOFOLLOW2 +// CAP_LEVELTOFOLLOW3 +// Family: Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3 +// Default: TWPL_LEVEL1 +// Notes: For Image Addressing, determines dependencies among the +// level counters. +#define CAP_LEVELTOFOLLOW1 0x803B +#define CAP_LEVELTOFOLLOW2 0x803C +#define CAP_LEVELTOFOLLOW3 0x803D + + +// CAP_MODE +// Family: Gemini +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: TWMO_MODE1 +// Notes: Selects the current mode. +#define CAP_MODE 0x8019 +#define TWMO_MODE1 1 +#define TWMO_MODE2 2 +#define TWMO_MODE3 3 +#define TWMO_MODE4 4 +#define TWMO_MODE5 5 +#define TWMO_MODE6 6 +#define TWMO_MODE7 7 +#define TWMO_MODE8 8 +#define TWMO_MODE9 9 +#define TWMO_MODE10 10 +#define TWMO_MODE11 11 +#define TWMO_MODE12 12 +#define TWMO_MODE13 13 +#define TWMO_MODE14 14 +#define TWMO_MODE15 15 +#define TWMO_MODE16 16 +#define TWMO_MODE17 17 +#define TWMO_MODE18 18 + + +// CAP_MULTIFEEDCOUNT +// Family: A2O2, Falcon, Fosters, Blaze, Inferno, Mustang2, Panther, Phoenix, +// Piranha, Piranha2, Pony, Rufous, Wildfire +// Type: TWTY_INT32 +// Container: OneValue +// Allowed: 0 - 32767 +// Default: 0 +// Notes: Count of multifeeds per scan session +#define CAP_MULTIFEEDCOUNT 0x8086 + + +// CAP_MULTIFEEDRESPONSE +// Family: A2O2, Falcon, Fosters, Blaze, Inferno, Panther, Phoenix, Piranha, +// Piranha2, Rufous, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: Fosters - TWMR_CONTINUE, TWMR_ENDOFJOB +// Inferno/Phoenix/Wildfire - TWMR_CONTINUE, TWMR_ENDOFJOB, TWMR_STOPFEEDER +// A2O2/Piranha - TWMR_CONTINUE, TWMR_ENDOFJOB, TWMR_ENDOFJOBLEAVEPAPER +// Piranha2/Rufous - TWMR_CONTINUE, TWMR_ENDOFJOB, TWMR_ENDOFJOBLEAVEPAPER, +// TWMR_ENDOFJOBGENERATEIMAGE +// Blaze/Falcon/Panther - TWMR_CONTINUE, TWMR_ENDOFJOB, TWMR_ENDOFJOBLEAVEPAPER, +// TWMR_ENDOFJOBGENERATEIMAGE, TWMR_STOPFEEDER, +// TWMR_STOPFEEDERLEAVEPAPER +// Default: TWMR_ENDOFJOB +// Notes: Selects action taken when the multifeed detected. +#define CAP_MULTIFEEDRESPONSE 0x80BA +#define TWMR_CONTINUE 0 +#define TWMR_ENDOFJOB 1 +#define TWMR_ENDOFJOBLEAVEPAPER 2 +#define TWMR_STOPFEEDER 3 +#define TWMR_STOPFEEDERLEAVEPAPER 4 +#define TWMR_ENDOFJOBGENERATEIMAGE 5 + + +// CAP_MULTIFEEDSOUND +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, Mustang2, +// Panther, Phoenix, Piranha, Piranha2, Pony, Rufous, +// Wildfire +// Type: TWTY_STR255 +// Container: OneValue +// Allowed: Text +// Default: "ding.wav" +// Notes: Sound when detect document multifeeds. +#define CAP_MULTIFEEDSOUND 0x802D + + +// CAP_MULTIFEEDTHICKNESSDETECTION +// Family: Viper (not 3500) +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Controls the whether thickness is used to detect +// document multifeeds. +#define CAP_MULTIFEEDTHICKNESSDETECTION 0x8057 + + +// CAP_NOWAIT +// Family: A2O2, Alf, Alien, Blaze, Gemini, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, Prism, +// Rufous, Wildfire, Viper +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Legacy behavior for this Source is to wait inside +// of the MSG_ENDXFER command until the next image +// is scanned or until the session is terminated, so +// that it can properly set the value of the +// TW_PENDINGXFERS.Count field. This has the unhappy +// side-effect of hanging the application. +// +// This capability allows the application to issue a +// non-blocking call to MSG_ENDXFER. The application +// must NOT move on to the next image until it receives +// a TWRC_SUCCESS from the command. A custom return +// code of TWRC_BUSY will indicate that the Source +// is still waiting on the device. The application can +// end the session by issuing a MSG_STOPFEEDER command. +// +// Note that if CAP_AUTOSCAN is off then this situation +// can happen for any image related command that is +// issued: DAT_IMAGEINFO, DAT_IMAGELAYOUT, +// DAT_IMAGEFILEXFER, DAT_IMAGEMEMXFER, DAT_IMAGEFILEXFER. +// +// TWAIN 2.2 defines TWRC_BUSY. The driver assumes that +// the application's TWAIN protocol corresponds to the +// twain.h file that it was built with. Therefore, for +// applications that report a protocol of 2.1 or less +// the value of TWRC_BUSY will be 0x8001. For apps that +// report a value of 2.2 or higher the value returned +// will match whatever TWRC_BUSY is set to in the twain.h +// file. OBS_TWRC_BUSY is provided for situations where +// an app reports a value of 2.1 or less when it is using +// a 2.2 or greater twain.h. In this case the application +// must make a code change to use OBS_TWRC_BUSY. +// +// Applications must also allow for the protocol reported +// by the TWAIN driver. Drivers reporting 2.1 or less +// will only report a value of 0x8001 for TWRC_BUSY, +// regardless of the protocol reported by the application. +#define CAP_NOWAIT 0x8032 +#define OBS_TWRC_BUSY 0x8001 +#ifndef TWRC_BUSY +#define TWRC_BUSY 0x8001 +#endif + + +// CAP_PAGECOUNT +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, +// Prism, Rufous, Wildfire, Viper +// Type: TWTY_FIX32 +// Container: Range +// Allowed: 0 - 32767 +// Default: 0 +// Notes: Count of pages to transfer. This capability only +// takes effect if CAP_XFERCOUNT is -1. A value of 0 +// disables this capability. +#define CAP_PAGECOUNT 0x8031 + + +// CAP_PAGESIZELIMIT +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, +// Prism, Rufous, Wildfire, Viper +// Type: TWTY_FIX32 +// Container: Range +// Allowed: 0 - ICAP_PHYSICALHEIGHT +// Default: 0 +// Notes: Maximum allowed physical page height (in ICAP_UNITS). +// This is a double document detection feature. +#define CAP_PAGESIZELIMIT 0x8002 + + +// CAP_PAPERSOURCE +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, +// Rufous, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: A2O2, Alien, Piranha, Piranha2 - TWPU_ADF. If platen installed +// TWPU_AUTO and TWPU_PLATEN also allowed. +// Alf, Fosters, Pony, Rufous - TWPU_ADF. +// Mustang2 - TWPU_ADF, TWPU_AUTO, TWPU_PLATEN +// Inferno/Panther/Phoenix/Wildfire - TWPU_ADF, TWPU_ELEVATOR100, +// TWPU_ELEVATOR250, TWPU_ELEVATOR500 +// Blaze - TWPU_ADF, TWPU_ELEVATOR100, TWPU_ELEVATOR250, +// TWPU_ELEVATOR500, TWPU_ELEVATOR750 +// Falcon (if only ADF) - TWPU_ADF, TWPU_ELEVATOR100, TWPU_ELEVATOR250 +// Falcon (if Flatbed available) - add TWPU_AUTO, TWPU_PLATEN, +// TWPU_ELEVATOR100PLATEN, TWPU_ELEVATOR250PLATEN +// Default: Alf, Alien, Fosters, Pony, Rufous - TWPU_ADF +// Inferno/Panther/Phoenix/Wildfire - TWPU_ELEVATOR500 +// Blaze - TWPU_ELEVATOR750 +// A2O2, Mustang2, Piranha, Piranha2 - TWPU_AUTO +// Falcon (if only ADF) - TWPU_ELEVATOR250 +// Falcon (if Flatbed available) - TWPU_ELEVATOR250PLATEN +// Notes: Selects source of paper (ADF or Platen). TWPU_AUTO +// selects ADF but changes to Platen if the ADF has no +// paper in it at the start of the scanning session. +#define CAP_PAPERSOURCE 0x802C +#define TWPU_AUTO 0 +#define TWPU_ADF 1 +#define TWPU_PLATEN 2 +#define TWPU_ELEVATOR500 3 +#define TWPU_ELEVATOR250 4 +#define TWPU_ELEVATOR100 5 +#define TWPU_ELEVATOR750 6 +#define TWPU_ELEVATOR100PLATEN 7 +#define TWPU_ELEVATOR250PLATEN 8 +#define TWPU_ELEVATOR500PLATEN 9 + + +// CAP_PATCHCOUNT +// Family: A2O2 (i1440), Alien(i280), Inferno, Panther, Phoenix, +// Wildfire +// Type: TWTY_INT32 +// Container: OneValue +// Allowed: 0 - 32767 +// Default: 0 +// Notes: Count of patches per scan session +#define CAP_PATCHCOUNT 0x8087 + + +// CAP_PATCHHEAD1 +// Family: Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Enables/disables the first patch reader. +#define CAP_PATCHHEAD1 0x80BF + + +// CAP_PATCHHEAD2 +// Family: Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Enables/disables the second patch reader. +#define CAP_PATCHHEAD2 0x80C0 + + +// CAP_PATCHHEAD3 +// Family: Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Enables/disables the third patch reader. +#define CAP_PATCHHEAD3 0x80C1 + + +// CAP_PATCHHEAD4 +// Family: Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Enables/disables the fourth patch reader. +#define CAP_PATCHHEAD4 0x80C2 + + +// CAP_PCARDENABLED +// Family: n/a +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Enables/disables the P-Card (note that this operates +// in tandem with the DAT_PCARD operation, setting this +// value here or there will modify both values). +// This capability is not available at this time. +#define CAP_PCARDENABLED 0x806A + + +// CAP_POWEROFFTIMEOUT +// Family: Falcon +// Type: TWTY_INT32 +// Container: Range +// Allowed: Falcon: 0, 0 - 240 (minutes) +// Default: 60 +// Notes: Minutes of idle time following CAP_ENERGYSTAR +// before device is powered off... +#define CAP_POWEROFFTIMEOUT 0x810C + + +// CAP_PRINTERDATE +// Family: Blaze, Falcon, Inferno, Panther, Phoenix, Wildfire +// Type: TWTY_STR255 +// Container: OneValue +// Allowed: Text +// Default: "" +// Notes: This will set the scanner to a specific date prior to printing. +// The scanner will be returned to the original date afterwards. +// Set to "" to disable. +// Format: YYYY/MM/DD (YYYY - year, MM - month, DD - day) +#define CAP_PRINTERDATE 0x80BC + + +// CAP_PRINTERDATEDELIMITER +// Family: A2O2, Alien, Blaze, Falcon, Inferno, Panther, Phoenix, Prism, +// Wildfire, Viper (3520/4500) +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: Prism - TWPD_FORWARDSLASH +// Others - TWPD_NONE +// Notes: Selects the delimiter to be used in the date +// (not the time, though, time always uses a +// delimiter of colon ':'). +#define CAP_PRINTERDATEDELIMITER 0x801C +#define TWPD_NONE 0 +#define TWPD_FORWARDSLASH 1 +#define TWPD_HYPHEN 2 +#define TWPD_PERIOD 3 +#define TWPD_BLANK 4 + + +// CAP_PRINTERDATEFORMAT +// Family: A2O2, Blaze, Falcon, Inferno, Panther, Phoenix, Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: A2O2/Phoenix/Prism - TWPE_MMDDYYYY, TWPE_DDMMYYYY, TWPE_YYYYMMDD +// Other - TWPE_MMDDYYYY, TWPE_DDMMYYYY, TWPE_YYYYMMDD, TWPE_DDD, TWPE_YYYYDDD +// Default: Prism - TWPE_MMDDYYYY +// Other - TWPE_YYYYMMDD +// Notes: Selects the format to be used to display +// the date (not the time, though). +#define CAP_PRINTERDATEFORMAT 0x8033 +#define TWPE_MMDDYYYY 0 +#define TWPE_DDMMYYYY 1 +#define TWPE_YYYYMMDD 2 +#define TWPE_DDD 3 +#define TWPE_YYYYDDD 4 + + +// CAP_PRINTERFONT +// Family: A2O2, Alien, Blaze, Falcon, Gemini, Inferno, Panther Phoenix, +// Prism, Wildfire, Viper (3520/4500) +// Type: TWTY_UINT16 +// Allowed: A2O2/Alien/Gemini/Viper - TWPN_LARGECOMIC,TWPN_LARGECINE,TWPN_SMALLCOMIC,TWPN_SMALLCINE +// Inferno/Phoenix/Prism/Wildfire - TWPN_LARGECOMIC,TWPN_LARGECINE,TWPN_LARGECOMIC180,TWPN_LARGECINE180, +// TWPN_SMALLCOMIC,TWPN_SMALLCINE,TWPN_SMALLCOMIC180,TWPN_SMALLCINE180 +// Blaze/Falcon - TWPN_LARGECOMIC,TWPN_LARGECINE,TWPN_LARGECOMIC180,TWPN_LARGECINE180, +// TWPN_SMALLCOMIC,TWPN_SMALLCINE,TWPN_SMALLCOMIC180,TWPN_SMALLCINE180, +// TWPN_BOLDLARGECOMIC,TWPN_BOLDLARGECINE,TWPN_BOLDLARGECOMIC180,TWPN_BOLDLARGECINE180 +// Panther - TWPN_LARGECOMIC,TWPN_LARGECINE,TWPN_LARGECOMIC180,TWPN_LARGECINE180, +// TWPN_SMALLCOMIC,TWPN_SMALLCINE,TWPN_SMALLCOMIC180,TWPN_SMALLCINE180, +// TWPN_BOLDLARGECOMIC,TWPN_BOLDLARGECINE +// Default: Blaze, Falcon, Panther, Prism- TWPN_SMALLCOMIC +// Other- TWPN_LARGECOMIC +// +// +// Notes: elects the printer font to be used. +// Small also means 'Normal'; Large also means 'Bold'; BoldLarge also means 'ExtraBold' +#define CAP_PRINTERFONT 0x8044 +#define TWPN_LARGECOMIC 0 +#define TWPN_LARGECINE 1 +#define TWPN_LARGECOMIC180 2 +#define TWPN_LARGECINE180 3 +#define TWPN_SMALLCOMIC 4 +#define TWPN_SMALLCINE 5 +#define TWPN_SMALLCOMIC180 6 +#define TWPN_SMALLCINE180 7 +#define TWPN_BOLDLARGECOMIC 8 +#define TWPN_BOLDLARGECINE 9 +#define TWPN_BOLDLARGECOMIC180 10 +#define TWPN_BOLDLARGECINE180 11 +#define TWPN_BOLDSMALLCOMIC 12 +#define TWPN_BOLDSMALLCINE 13 +#define TWPN_BOLDSMALLCOMIC180 14 +#define TWPN_BOLDSMALLCINE180 15 + + +// CAP_PRINTERFONTFORMAT +// Family: Wildfire +// Type: TWTY_UINT16 +// Allowed: TWPFF_NORMAL, TWPFF_BLOCK +// Default: TWPFF_NORMAL +// +// Notes: elects the printer font format to be used +#define CAP_PRINTERFONTFORMAT 0x80BE +#define TWPFF_NORMAL 0 +#define TWPFF_BLOCK 1 + + +// CAP_PRINTERIMAGEADDRESSFORMAT +// Family: Gemini, Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: Gemini-TWPI_DISPLAYLEADINGZEROS +// Prism-TWPI_SUPPRESSLEADINGZEROS +// Wildfire-TWPI_SUPPRESSLEADINGZEROS +// Notes: Selects the print format of leading zeros +// in the image address. +#define CAP_PRINTERIMAGEADDRESSFORMAT 0x8045 +#define TWPI_DISPLAYLEADINGZEROS 0 +#define TWPI_SUPPRESSLEADINGZEROS 1 +#define TWPI_COMPRESSLEADINGZEROS 2 + + +// CAP_PRINTERIMAGEADDRESSLEVEL +// Family: Gemini, Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: Gemini-TWPL_LEVEL0, TWPL_LEVEL1, TWPL_LEVEL2, +// TWPL_LEVEL3, TWPL_ALLLEVELS +// Prism- TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3, +// TWPL_ALLLEVELS +// Wildfire-TWPL_LEVEL1, TWPL_LEVEL2, TWPL_LEVEL3, +// TWPL_ALLLEVELS +// Default: TWPL_ALLLEVELS +// Notes: Selects the image address level that printing +// will occur on. A value of TWPL_ALLLEVELS +// overrides any of the others. +#define CAP_PRINTERIMAGEADDRESSLEVEL 0x8047 +#define TWPL_LEVEL0 0 +#define TWPL_LEVEL1 1 +#define TWPL_LEVEL2 2 +#define TWPL_LEVEL3 3 +#define TWPL_ALLLEVELS 4 +#define TWPL_NONE 5 + + +// CAP_PRINTERINDEXDIGITS +// Family: A2O2, Alien, Blaze, Falcon, Inferno, Panther, Phoenix, +// Prism, Wildfire, Viper (3520/4500) +// Type: TWTY_UINT16 +// Container: Range +// Allowed: 1 - 9 +// Default: 9 +// Notes: Sets the number of digits of the counter to be +// printed. Note that the data will be truncated +// if the number of digits in the count exceeds +// this value. +#define CAP_PRINTERINDEXDIGITS 0x801B + + +// CAP_PRINTERINDEXFORMAT +// Family: A2O2, Alien, Blaze, Falcon, Inferno, Panther, Phoenix, +// Prism, Wildfire, Viper (3520/4500) +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see CAP_PRINTERIMAGEADDRESSFORMAT) +// Default: Prism-TWPI_SUPPRESSLEADINGZEROS +// Other-TWPI_DISPLAYLEADINGZEROS +// Notes: Selects the use of leading zeros or spaces when +// printing the counter value. +#define CAP_PRINTERINDEXFORMAT 0x801A + + +// CAP_PRINTERPOSITION +// Family A2O2, Alien, Blaze, Falcon, Gemini, Inferno, Panther, Phoenix, +// Prism, Wildfire, Viper (3520/4500) +// Type: TWTY_FIX32 +// Container: Range +// Allowed: Scanner specific +// Default: Scanner specific +// Notes: Selects the printer position (y-offset, in ICAP_UNITS) +// to be used as the starting position for printing. +#define CAP_PRINTERPOSITION 0x8046 + + +// CAP_PRINTERTIME +// Family: Inferno, Blaze, Falcon, Panther, Phoenix, Wildfire +// Type: TWTY_STR255 +// Container: OneValue +// Allowed: Text +// Default: "" +// Notes: This will set the scanner to a specific time prior to printing. +// The scanner will be returned to the original time afterwards. +// Set to "" to disable. +// Format: HH:MM (HH - hour (0-23), MM - minutes (0-59), +// i.e. 00:00->23:59) +#define CAP_PRINTERTIME 0x80BD + + +// CAP_PRINTERWRITESEQUENCE +// Family: A2O2, Alien, Blaze, Falcon, Gemini(5000/7000), Inferno, Panther, +// Phoenix, Prism, Wildfire +// Type: TWTY_UINT16 +// Allowed: All the stuff below (sheesh)... +// Notes: Selects the write sequence. +#define CAP_PRINTERWRITESEQUENCE 0x8049 +#define TWPW_NONE 0 +#define TWPW_FULLIAALLDELIMITERS 1 +#define TWPW_FULLIANODELIMITERS 2 +#define TWPW_FULLIAFIXEDDELIMITERS 3 +#define TWPW_DELIMITER 4 +#define TWPW_FIXEDIA 5 +#define TWPW_INDEXIA 6 +#define TWPW_CURRENTLEVELIA 7 +#define TWPW_DATE 8 +#define TWPW_DAY 9 +#define TWPW_TIME 10 +#define TWPW_DOCUMENTCOUNT 11 +#define TWPW_MESSAGE1 12 +#define TWPW_MESSAGE2 13 +#define TWPW_MESSAGE3 14 +#define TWPW_MESSAGE4 15 +#define TWPW_MESSAGE5 16 +#define TWPW_MESSAGE6 17 +#define TWPW_MESSAGE7 18 +#define TWPW_MESSAGE8 19 +#define TWPW_MESSAGE9 20 +#define TWPW_SPACE 21 +#define TWPW_TEXT 22 +#define TWPW_INDEX 23 +#define TWPW_MMDDYYYY 24 +#define TWPW_DDMMYYYY 25 +#define TWPW_YYYYMMDD 26 +#define TWPW_IMAGEADDRESS_A 27 +#define TWPW_IMAGEADDRESS_B 28 +#define TWPW_IMAGEADDRESS_C 29 +#define TWPW_IMAGEADDRESS_D 30 + + +// CAP_PRINTERWRITESEQUENCEINDEX +// Family: Gemini (5000/7000) +// Type: TWTY_UINT16 +// Allowed: 1 - 7 +// Notes: Selects the write sequence index. +#define CAP_PRINTERWRITESEQUENCEINDEX 0x8048 + + +// CAP_PRINTERWRITESEQUENCEMESSAGE1 - 12 +// Family: A2O2, Blaze, Falcon, Gemini, Inferno, Panther, Phoenix, +// Prism, Wildfire, Viper (3520/4500) +// Type: TWTY_STR255 +// Container: OneValue +// Allowed: A2O2/Falcon/Panther only has one message +// Prism/Phoenix/Wildfire/Inferno: 1 to 6 +// Default: A2O2- ABC +// Gemini-#1 +// Viper- ABC +// Prism- (empty string) +// Inferno/Phoenix- ABC +// Blaze/Falcon/Panther/Wildfire- 111 +// Notes: 5000/7000 only...selects the write sequence +// messages (1 - 9). Prism only...selects the +// write sequence messages 1-6 if the levels +// are independent and 7-12 for 'all' levels. +#define CAP_PRINTERWRITESEQUENCEMESSAGE1 0x800C +#define CAP_PRINTERWRITESEQUENCEMESSAGE2 0x800D +#define CAP_PRINTERWRITESEQUENCEMESSAGE3 0x800E +#define CAP_PRINTERWRITESEQUENCEMESSAGE4 0x800F +#define CAP_PRINTERWRITESEQUENCEMESSAGE5 0x8010 +#define CAP_PRINTERWRITESEQUENCEMESSAGE6 0x8011 +#define CAP_PRINTERWRITESEQUENCEMESSAGE7 0x8012 +#define CAP_PRINTERWRITESEQUENCEMESSAGE8 0x8013 +#define CAP_PRINTERWRITESEQUENCEMESSAGE9 0x8014 +#define CAP_PRINTERWRITESEQUENCEMESSAGE10 0x8034 +#define CAP_PRINTERWRITESEQUENCEMESSAGE11 0x8035 +#define CAP_PRINTERWRITESEQUENCEMESSAGE12 0x8036 + + +// CAP_PRINTERWRITESEQUENCEMESSAGEINDEX +// Family: A2O2, Alien, Inferno, Phoenix, Wildfire +// Type: TWTY_UINT16 +// Container: OneValue +// Allowed: Inferno/Phoenix/Wildfire 1 - 6 +// A2O2, Alien 1 +// Default: 1 +// Notes: Selects the write sequence messages. +#define CAP_PRINTERWRITESEQUENCEMESSAGEINDEX 0x808A + + +// CAP_PRINTERWRITESEQUENCESPACE +// Family: Gemini(5000/7000) +// Type: TWTY_UINT16 +// Allowed: Number of blanks... +// Notes: 5000/7000 only. Blank count for the write sequence. +#define CAP_PRINTERWRITESEQUENCESPACE 0x800A + + +// CAP_PRINTERWRITESEQUENCESPACESTRING +// Family: Gemini(5000/7000) +// Type: TWTY_STR255 +// Allowed: The WriteSequenceSpace string... +// Notes: 5000/7000 only. Selects the write sequence +// count of spaces. +#define CAP_PRINTERWRITESEQUENCESPACESTRING 0x800B + + +// CAP_PRINTERWRITESEQUENCESTRING +// Family: A2O2, Alien, Blaze, Falcon, Gemini (5000/7000), Inferno, +// Panther, Phoenix, Prism, Wildfire +// Type: TWTY_STR255 +// Allowed: The WriteSequence string... +// Notes: 5000/7000 only. Selects the write sequence. +#define CAP_PRINTERWRITESEQUENCESTRING 0x8009 + + +// CAP_PROFILES +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Panther, Phoenix, Piranha, +// Piranha2, Rufous, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: TWPO_DEFAULT +// Notes: THIS IS DEPRECATED TWAIN 10.X+. DAT_PROFILES SHOULD BE USED INSTEAD. +// Selects the current profile. This set the current settings from +// the selected profile to the driver. +// Or see the CUSTOMDSDATA that works the same as profile. +// See the MSG_SETUPDS on how to download the settings to the scanner +// without enable the scanning session. +// Also refer to DAT_PROFILES later in this file. +#define CAP_PROFILES 0x809F +#define TWPO_UNKNOWN -1 +#define TWPO_DEFAULT 0 +#define TWPO_FILE01 1 +#define TWPO_FILE02 2 +#define TWPO_FILE03 3 +#define TWPO_FILE04 4 +#define TWPO_FILE05 5 +#define TWPO_FILE06 6 +#define TWPO_FILE07 7 +#define TWPO_FILE08 8 +#define TWPO_FILE09 9 +#define TWPO_FILE10 10 +#define TWPO_FILE11 11 +#define TWPO_FILE12 12 +#define TWPO_FILE13 13 +#define TWPO_FILE14 14 +#define TWPO_FILE15 15 +#define TWPO_FILE16 16 +#define TWPO_FILE17 17 +#define TWPO_FILE18 18 +#define TWPO_FILE19 19 +#define TWPO_FILE20 20 +#define TWPO_FILE21 21 +#define TWPO_FILE22 22 +#define TWPO_FILE23 23 +#define TWPO_FILE24 24 +#define TWPO_FILE25 25 +#define TWPO_FILE26 26 +#define TWPO_FILE27 27 +#define TWPO_FILE28 28 +#define TWPO_FILE29 29 +#define TWPO_FILE30 30 +#define TWPO_FILE31 31 +#define TWPO_FILE32 32 +#define TWPO_FILE33 33 +#define TWPO_FILE34 34 +#define TWPO_FILE35 35 +#define TWPO_FILE36 36 +#define TWPO_FILE37 37 +#define TWPO_FILE38 38 +#define TWPO_FILE39 39 +#define TWPO_FILE40 40 +#define TWPO_FILE41 41 +#define TWPO_FILE42 42 +#define TWPO_FILE43 43 +#define TWPO_FILE44 44 +#define TWPO_FILE45 45 +#define TWPO_FILE46 46 +#define TWPO_FILE47 47 +#define TWPO_FILE48 48 +#define TWPO_FILE49 49 +#define TWPO_FILE50 50 +#define TWPO_FILE51 51 +#define TWPO_FILE52 52 +#define TWPO_FILE53 53 +#define TWPO_FILE54 54 +#define TWPO_FILE55 55 +#define TWPO_FILE56 56 +#define TWPO_FILE57 57 +#define TWPO_FILE58 58 +#define TWPO_FILE59 59 +#define TWPO_FILE60 60 + + +// CAP_SIDESDIFFERENT +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Panther, Phoenix, Piranha, +// Piranha2, Rufous, Wildfire +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: When this is TRUE the user can set different values for the +// front and rear camera. +// Setting this to FALSE will copy all the front settings to the +// rear for the current camera. +// This will automatically change to TRUE when the front and +// rear no longer match. Note: a value of TRUE does NOT imply +// that the sides are different (e.g. if everything matches and +// this is set to TRUE) +#define CAP_CAMERALINK 0x80B7 // deprecated after v7.55 +#define CAP_SIDESDIFFERENT 0x80B7 // available since v7.56 + + +// CAP_SIMULATING +// Family: Blaze, Falcon, Panther, Piranha2 +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Simulate the scanner. +#define CAP_SIMULATING 0x810B + + +// CAP_SUPPORTEDSIZES +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Gemini, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, Prism, +// Rufous, Wildfire, Viper +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: TWSS_A4 +// Notes: This list adds custom values to this standard TWAIN +// capability. The TWSS_USER* values may be set up by +// an end-user through the CONST.INI and appropriate +// language file(s) to add custom sizes to the existing +// list. See the CONST.INI file under the section +// [SupportedSizes] for more info on how to do this. +#define TWSS_6X5 0x8001 +#define TWSS_12X12 0x8002 +#define TWSS_3X5 0x8003 // 3.5 x 5 +#define TWSS_4X6 0x8004 +#define TWSS_5X7 0x8005 +#define TWSS_8X10 0x8006 +#define TWSS_4X7 0x8007 +#define TWSS_4X10 0x8008 +#define TWSS_100X150 0x8009 +#define TWSS_127X177 0x8010 +#define TWSS_90X130 0x8011 +#define TWSS_57X88 0x8012 // 57.17 x 88.9 +#define TWSS_5X3 0x8013 // 3.5 x 5 +#define TWSS_6X4 0x8014 +#define TWSS_7X5 0x8015 +#define TWSS_7X4 0x8016 +#define TWSS_150X100 0x8017 +#define TWSS_177X127 0x8018 +#define TWSS_130X90 0x8019 +#define TWSS_88X57 0x8020 // 57.17 x 88.9 +#define TWSS_USER0 0x8100 +#define TWSS_USER1 0x8101 +#define TWSS_USER2 0x8102 +#define TWSS_USER3 0x8103 +#define TWSS_USER4 0x8104 +#define TWSS_USER5 0x8105 +#define TWSS_USER6 0x8106 +#define TWSS_USER7 0x8107 +#define TWSS_USER8 0x8108 +#define TWSS_USER9 0x8109 + + +// CAP_TOGGLEPATCH +// Family: A2O2 (i1440), Alien (i280), Blaze, Falcon (i3000), Inferno, +// Panther, Phoenix, Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: TWTP_DISABLED +// Notes: Controls recognition of the color patch. +#define CAP_TOGGLEPATCH 0x806D +#define TWTP_DISABLED 0 +#define TWTP_BOTHSIDE 1 +#define TWTP_FRONTSIDE 2 +#define TWTP_SAMESIDE 4 +#define TWTP_DETECTONLY 7 + + +// CAP_TRANSPORTAUTOSTART +// Family: A2O2, Fosters, Blaze, Inferno, Panther, Phoenix, +// Piranha, Piranha2, Prism, Rufous, Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: A2O2, Fosters, Piranha, Piranha2, Rufous: TRUE (readonly) +// Other: TRUE / FALSE +// Default: A2O2, Blaze, Fosters, Panther, Piranha, Piranha2, Rufous: TRUE +// Other: FALSE +// Notes: A value of TRUE will cause the scanner transport to +// start up when the MSG_ENABLEDS command is issued. +#define CAP_TRANSPORTAUTOSTART 0x8029 + + +// CAP_TRANSPORTTIMEOUT +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther,Phoenix, Piranha, Piranha2, Pony, +// Prism, Rufous, Wildfire, Viper +// Type: TWTY_INT32 +// Container: Range +// Allowed: Alf/Alien: 3-30 +// Mustang2/Pony: 1-30 +// A2O2/Fosters/Inferno/Phoenix/Piranha/Wildfire: 0,1-300 +// Prism: 0,5-300 +// Viper: 3-30 +// Blaze/Panther/Piranha2/Rufous: 0, 1-120 +// Default: A2O2/Alf/Alien: 8 +// Fosters/Mustang2/Piranha/Pony: 1 +// Inferno/Phoenix/Wildfire: 15 +// Blaze/Panther: 5 +// Prism: 10 +// Viper: 8 +// Piranha2/Rufous: 0 +// Notes: Number of seconds before transport times out. +#define CAP_TRANSPORTTIMEOUT 0x8003 + + +// CAP_TRANSPORTTIMEOUTRESPONSE +// Family: A2O2, Fosters, Blaze, Falcon, Inferno, Panther, Phoenix, +// Piranha, Piranha2, Prism, Rufous, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: A2O2, Fosters, Piranha, Piranha2, Rufous: TWTR_ENDOFJOB +// Other: See below +// Default: A2O2,Falcon,Fosters,Panther,Piranha,Piranha2,Rufous: TWTR_ENDOFJOB +// Other: TWTR_STOPFEEDER +// Notes: Selects action taken when the transport times out. +// If the transport timeout is disabled, then this +// capability is ignored. +#define CAP_TRANSPORTTIMEOUTRESPONSE 0x8028 +#define TWTR_STOPFEEDER 0 +#define TWTR_ENDOFJOB 1 + + +// CAP_ULTRASONICSENSITIVITY +// Family: A2O2, Alf, Alien, Blaze, Falcon, Inferno, Panther, Phoenix, +// Piranha, Piranha2, Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: See below... +// Default: TWUS_DISABLED +// Notes: Controls the sensitivity of the ultrasonic multifeed +// detector. +// +// Please note that there is a conflict with version 2.2 of the +// TWAIN Spec. Previous versions of kds_cust.h defined TWUS_* +// values. This behavior is still supported if used with +// a TWAIN 2.1 twain.h or earlier. +// +// Applications must change to use TWUSS_* with CAP_ULTRASONICSENSITIVITY, +// this will work with any version of the driver. +// +// Only use TWUS_* with the standard CAP_DOUBLEFEEDDETECTIONSENSITIVITY +// capability. +#define CAP_ULTRASONICSENSITIVITY 0x8027 +#ifndef CAP_DOUBLEFEEDDETECTIONSENSITIVITY + #define TWUS_DISABLED 0 + #define TWUS_LOW 1 + #define TWUS_MEDIUM 2 + #define TWUS_HIGH 3 +#endif +#define TWUSS_DISABLED 0 +#define TWUSS_LOW 1 +#define TWUSS_MEDIUM 2 +#define TWUSS_HIGH 3 + + +// CAP_ULTRASONICSENSOR* +// Family: Blaze, Inferno, Panther, Phoenix, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: See below... +// Default: TWUO_ENABLED +// Notes: Controls the individual ultrasonic sensor +// detector. +#define CAP_ULTRASONICSENSORCENTER 0x808F +#define CAP_ULTRASONICSENSORLEFT 0x8090 +#define CAP_ULTRASONICSENSORRIGHT 0x8091 +#define CAP_ULTRASONICSENSORLEFTCENTER 0x8105 +#define CAP_ULTRASONICSENSORRIGHTCENTER 0x8106 +#define TWUO_DISABLED 0 +#define TWUO_ENABLED 1 +#define TWUO_IGNOREZONE 2 + + +// CAP_ULTRASONICSENSORZONEHEIGHT +// Family: Blaze +// Type: TWTY_FIX32 +// Container: Range +// Allowed: Scanner specific +// Default: Scanner specific +// Notes: Height of zone for the CAP_ULTRASONICSENSOR* that +// are set to TWUO_IGNOREZONE +#define CAP_ULTRASONICSENSORZONEHEIGHT 0x8107 + + +// CAP_WINDOW +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Panther, Phoenix, +// Piranha, Piranha2, Rufous, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: See below.. +// Default: TWWW_BASE +// Notes: Deprecated, use CAP_WINDOWCAMERA or DAT_FILESYSTEM. +#define CAP_WINDOW 0x80AD +#define TWWW_BASE 0 +#define TWWW_1 1 +#define TWWW_2 2 +#define TWWW_3 3 +#define TWWW_4 4 +#define TWWW_5 5 +#define TWWW_6 6 +#define TWWW_7 7 +#define TWWW_8 8 +#define TWWW_9 9 +#define TWWW_10 10 + + +// CAP_WINDOWCAMERA +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Panther, Phoenix, +// Piranha, Piranha2, Rufous, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: See below.. +// Default: TWWC_BASE_BITONAL_FRONT +// Notes: Allows for direct addressing of windows. Does not +// change CAP_SIDESDIFFERENT like DAT_FILESYSTEM. +#define CAP_WINDOWCAMERA 0x80B4 +#define TWWC_DELETEALL -1 +#define TWWC_BASE_BITONAL_FRONT 0 +#define TWWC_BASE_BITONAL_REAR 1 +#define TWWC_BASE_COLOR_FRONT 2 +#define TWWC_BASE_COLOR_REAR 3 +#define TWWC_1_BITONAL_FRONT 4 +#define TWWC_1_BITONAL_REAR 5 +#define TWWC_1_COLOR_FRONT 6 +#define TWWC_1_COLOR_REAR 7 +#define TWWC_2_BITONAL_FRONT 8 +#define TWWC_2_BITONAL_REAR 9 +#define TWWC_2_COLOR_FRONT 10 +#define TWWC_2_COLOR_REAR 11 +#define TWWC_3_BITONAL_FRONT 12 +#define TWWC_3_BITONAL_REAR 13 +#define TWWC_3_COLOR_FRONT 14 +#define TWWC_3_COLOR_REAR 15 +#define TWWC_4_BITONAL_FRONT 16 +#define TWWC_4_BITONAL_REAR 17 +#define TWWC_4_COLOR_FRONT 18 +#define TWWC_4_COLOR_REAR 19 +#define TWWC_5_BITONAL_FRONT 20 +#define TWWC_5_BITONAL_REAR 21 +#define TWWC_5_COLOR_FRONT 22 +#define TWWC_5_COLOR_REAR 23 +#define TWWC_6_BITONAL_FRONT 24 +#define TWWC_6_BITONAL_REAR 25 +#define TWWC_6_COLOR_FRONT 26 +#define TWWC_6_COLOR_REAR 27 +#define TWWC_7_BITONAL_FRONT 28 +#define TWWC_7_BITONAL_REAR 29 +#define TWWC_7_COLOR_FRONT 30 +#define TWWC_7_COLOR_REAR 31 +#define TWWC_8_BITONAL_FRONT 32 +#define TWWC_8_BITONAL_REAR 33 +#define TWWC_8_COLOR_FRONT 34 +#define TWWC_8_COLOR_REAR 35 +#define TWWC_9_BITONAL_FRONT 36 +#define TWWC_9_BITONAL_REAR 37 +#define TWWC_9_COLOR_FRONT 38 +#define TWWC_9_COLOR_REAR 39 +#define TWWC_10_BITONAL_FRONT 40 +#define TWWC_10_BITONAL_REAR 41 +#define TWWC_10_COLOR_FRONT 42 +#define TWWC_10_COLOR_REAR 43 + + +// CAP_WINDOWPOSITION +// Family: A2O2, Alf, Alien, Fosters, Gemini, Inferno, Mustang2, +// Phoenix, Piranha, Pony, Prism, Wildfire, Viper +// Type: TWTY_FRAME +// Container: OneValue +// Allowed: Anything +// Default: 0,0 (top left of screen) +// Notes: Left and Top position of dialog (Width and Height are +// ignored). Use this to select the location of the +// Source's GUI when it is displayed to the user. +#define CAP_WINDOWPOSITION 0x8004 + + + +//////////////////////////////////////////////////////////////////////////////// +// ICAP Section +//////////////////////////////////////////////////////////////////////////////// + + + +// ICAP_ADDBORDER +// Family: A2O2, Blaze, Falcon, Fosters, Inferno, Panther, Phoenix, +// Piranha, Piranha2, Prism, Rufous, Wildfire +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Adds a black border around a bitonal document. +#define ICAP_ADDBORDER 0x8023 + + +#define ICAP_ANSELBRIGHTNESS 0x80A0 +#define ICAP_ANSELCONTRAST 0x80A1 +#define ICAP_ANSELHIGHLIGHT 0x80A2 +#define ICAP_ANSELMIDTONE 0x80A3 + + +// ICAP_ANSELREMOVEREDEYE +// Family: Oasis +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Controls red-eye removal. +#define ICAP_ANSELREMOVEREDEYE 0x80A4 + + +// ICAP_ANSELRESTORECOLOR +// Family: Oasis +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Adds a black border around a bitonal document. +#define ICAP_ANSELRESTORECOLOR 0x80A5 + + +#define ICAP_ANSELSATURATECOLORS 0x80A6 +#define ICAP_ANSELSHADOW 0x80A7 + + +// ICAP_ANSELSHARPENIMAGE +// Family: Oasis +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: (see below) +// Default: TWASP_DISABLE +// Notes: Controls picture sharpening. +#define ICAP_ANSELSHARPENIMAGE 0x80A8 +#define TWASP_DISABLE 0 +#define TWASP_NORMAL 1 +#define TWASP_HIGH 2 +#define TWASP_EXAGGERATED 3 + + +// ICAP_ANSELSHASTA +// Family: Oasis +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: (see below) +// Default: TWASH_DISABLE +// Notes: TBD +#define ICAP_ANSELSHASTA 0x80A9 +#define TWASH_DISABLE 0 +#define TWASH_AUTO 1 +#define TWASH_MANUAL 2 + + +// ICAP_AUTOCOLORAMOUNT +// Family: A2O2, Blaze, Falcon, Inferno, Panther, Phoenix, Piranha, +// Piranha2, Wildfire +// Type: TWTY_INT32 +// Container: Range (per camera) +// Allowed: 1 to 200 +// Default: 1 +// Notes: The amount of color that needs to be present in a document +// before it will be saved as either a color or grayscale image. +#define ICAP_AUTOCOLORAMOUNT 0x8092 + + +// ICAP_AUTOCOLORCONTENT +// Family: A2O2, Blaze, Falcon, Inferno, Panther, Phoenix, Piranha, +// Piranha2, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: TWCL_NONE,TWCL_LOW,TWCL_MEDIUM,TWCL_HIGH,TWCL_CUSTOM +// Default: TWCL_NONE +// Notes: Preset values for AUTOCOLORAMOUNT and AUTOCOLORTHRESHOLD. +// NONE turns autocolor detection off. +// CUSTOM allows amount and threshold to be set. +// When this is not NONE, CAMERAENABLE has no effect on output +// color (rgb/gray/bw). Rather, CAMERAENABLE dictates which +// sides should be scanned (front/rear). +// Enabling both color and bitonal for a side indicates both are +// desired as output, and therefore AUTOCOLORCONTENT will be set +// to TWCL_NONE. +// If both color and bitonal are enabled on a side when +// AUTOCOLORCONTENT is turned on, CAMERAENABLED will be set to +// FALSE for the bitonal camera on that side. +#define ICAP_AUTOCOLORCONTENT 0x8093 +#define TWCL_NONE 0 +#define TWCL_LOW 1 +#define TWCL_MEDIUM 2 +#define TWCL_HIGH 3 +#define TWCL_CUSTOM 4 + + +// ICAP_AUTOCOLORTHRESHOLD +// Family: A2O2, Blaze, Falcon, Inferno, Panther, Phoenix, Piranha, +// Piranha2, Wildfire +// Type: TWTY_INT32 +// Container: Range (per camera) +// Allowed: 0 to 100 +// Default: Falcon, Panther, Piranha2: 20 +// Other: 50 +// Notes: The color threshold or intensity (i.e. pale blue vs. dark blue) +// at which a given a color will be included in the Color Amount +// calculation . A higher value indicates that a more intense color +// is required. +#define ICAP_AUTOCOLORTHRESHOLD 0x8094 + + +// ICAP_BACKGROUNDADJUSTAGGRESSIVENESS +// Family: A2O2, Blaze, Falcon, Panther, Piranha, Piranha2 +// Type: TWTY_INT32 +// Container: Range (per color camera) +// Allowed: -10 to 10 +// Default: 0 +// Notes: The background color adjustment aggressiveness +#define ICAP_BACKGROUNDADJUSTAGGRESSIVENESS 0x80B0 + + +// ICAP_BACKGROUNDADJUSTAPPLYTO +// Family: A2O2, Blaze, Falcon, Panther, Piranha, Piranha2 +// Type: TWTY_UINT16 +// Container: Enumeration (per color camera) +// Allowed: TWBA_ALL,TWBA_NEUTRAL,TWBA_PREDOMINATE +// Default: TWBA_PREDOMINATE +// Notes: The background color adjustment apply to +#define ICAP_BACKGROUNDADJUSTAPPLYTO 0x80AF +#define TWBA_ALL 0 +#define TWBA_NEUTRAL 1 +#define TWBA_PREDOMINATE 2 + + +// ICAP_BACKGROUNDADJUSTMODE +// Family: A2O2, Blaze, Falcon, Panther, Piranha, Piranha2 +// Type: TWTY_UINT16 +// Container: Enumeration (per color camera) +// Allowed: TWBS_NONE,TWBS_AUTO,TWBS_CHANGETOWHITE, TWBS_AUTOMATICBASIC +// Default: TWCL_NONE +// Notes: The background smoothing mode +#define ICAP_BACKGROUNDADJUSTMODE 0x80AE +#define TWBS_NONE 0 +#define TWBS_AUTOMATIC 1 +#define TWBS_CHANGETOWHITE 2 +#define TWBS_AUTOMATICBASIC 3 + + +// ICAP_COLORBALANCEAUTOMATICAGGRESSIVENESS +// Family: Falcon, Piranha2, Rufous +// Type: TWTY_INT32 +// Container: Range (per color camera) +// Allowed: -2 to 2 +// Default: 0 +// Notes: Indicates how aggressive the automatic white balance will be. +// This is only available when ICAP_COLORBALANCEMODE set to +// TWCBM_AUTOMATICADVANCED +#define ICAP_COLORBALANCEAUTOMATICAGGRESSIVENESS 0x810A + + +// ICAP_COLORBALANCEMODE +// Family: Blaze, Falcon, Piranha2, Rufous +// Type: TWTY_UINT16 +// Container: Enumeration (per color camera) +// Allowed: Blaze: TWCBM_NONE, TWCBM_MANUAL +// Others: TWCBM_NONE, TWCBM_MANUAL, TWCBM_AUTOMATIC, +// TWCBM_AUTOMATICBASIC +// Default: Blaze: TWCBM_NONE +// Others: TWCBM_AUTOMATICBASIC +// Notes: Allows the user to select the method for adjusting the color +// balance of a color image. +// TWCBM_NONE means no adjustment is made. +// TWCBM_MANUAL means the user can adjust Red, Green and Blue +// (see ICAP_COLORBALANCEREAD/GREEN/BLUE). +// TWCBM_AUTOMATICBASIC means the scanner will automatically +// adjust the balance to be white. +// TWCBM_AUTOMATIC is the same as TWCBM_AUTOMATICBASIC but +// the user can also adjust the aggressiveness of the balance +// (see ICAP_COLORBALANCEAUTOMATICAGRESSIVENESS). +#define ICAP_COLORBALANCEMODE 0x8109 +#define TWCBM_NONE 0 +#define TWCBM_MANUAL 1 +#define TWCBM_AUTOMATICBASIC 2 +#define TWCBM_AUTOMATIC 3 + + +// ICAP_COLORBALANCEBLUE +// ICAP_COLORBALANCEGREEN +// ICAP_COLORBALANCERED +// Family: A2O2, Blaze, Falcon, Fosters, Panther, Piranha, Piranha2, Rufous +// Type: TWTY_INT32 +// Container: Range (per camera) +// Allowed: -50 to 50 step 1 for the GUI +// -1000 to 1000 step 20 for programmatic +// Default: 0 +// Notes: Allow the user to adjust the color balance. This is ignored +// if ICAP_COLORBALANCEMODE is not set to TWCBM_MANUAL. +#define ICAP_COLORBALANCEBLUE 0x80B1 +#define ICAP_COLORBALANCEGREEN 0x80B2 +#define ICAP_COLORBALANCERED 0x80B3 + + +// CAP_COLORBRIGHTNESSMODE +// Family: Blaze, Falcon, Piranha2 +// Type: TWTY_UINT16 +// Container: Enumeration (per color camera) +// Allowed: Blaze: TWCBR_NONE, TWCBR_MANUAL +// Others: TWCBR_NONE, TWCBR_MANUAL, TWCBR_AUTOMATIC +// Default: Blaze: TWCBR_NONE +// Others: TWCBR_AUTOMATIC +// Notes: Allows the user to select the method for adjusting the +// brightness and contrast of a color or grayscale image. +// TWCBR_NONE means no adjustment is made. +// TWCBR_MANUAL means the user can adjust Brightness and +// Contrast (see ICAP_BRIGHTNESS and ICAP_CONTRAST). +// TWCBR_AUTOMATICBASIC means the scanner will +// automatically adjust the image. +#define ICAP_COLORBRIGHTNESSMODE 0x8108 +#define TWCBR_NONE 0 +#define TWCBR_MANUAL 1 +#define TWCBR_AUTOMATICBASIC 2 + + +// ICAP_COLORSHARPEN +// Family: Blaze, Falcon, Panther, Piranha2, Rufous +// Type: TWTY_UINT32 +// Container: Range (per output stream) +// Allowed: 0 - 3 +// Default: 1 +// Notes: Apply sharpening to image - 0 indicates no sharpening. +// 1 is normal, 2 is more sharpening, and a value of 3 +// applies a lot of sharpening. +#define ICAP_COLORSHARPEN 0x8102 + + +// ICAP_COLORSHARPENING +// Family: Prism, Wildfire, Viper +// Type: TWTY_INT16 +// Container: Enumeration (per camera) +// Allowed: TWCS_NONE, TWCS_3X3FIRFILTER +// Default: TWCS_3X3FIRFILTER +// Notes: Color image sharpening. This setting only has +// meaning if ICAP_COMPRESSION is set to TWCP_JPEG. +#define ICAP_COLORSHARPENING 0x8041 +#define TWCS_NONE 0 +#define TWCS_3X3FIRFILTER 1 + + +// ICAP_COLORTABLE +// Family: A2O2, Alf, Alien, Fosters, Inferno, Mustang2, Phoenix, +// Piranha, Pony, Prism, Wildfire, Viper +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: (as discovered in scanner) +// Notes: Selects the color table to use. This capability +// is like ICAP_HALFTONES in that there is no +// programmatic way to guarantee the results of a +// given selection. The best tactic is to present +// the data to the user 'as is' and let them select +// what they want. +#define ICAP_COLORTABLE 0x8020 +#define TWCT_UNKNOWN -1 +#define TWCT_DEFAULT 0 +#define TWCT_FILE01 1 +#define TWCT_FILE02 2 +#define TWCT_FILE03 3 +#define TWCT_FILE04 4 +#define TWCT_FILE05 5 +#define TWCT_FILE06 6 +#define TWCT_FILE07 7 +#define TWCT_FILE08 8 +#define TWCT_FILE09 9 +#define TWCT_FILE10 10 +#define TWCT_FILE11 11 +#define TWCT_FILE12 12 +#define TWCT_FILE13 13 +#define TWCT_FILE14 14 +#define TWCT_FILE15 15 +#define TWCT_FILE16 16 +#define TWCT_FILE17 17 +#define TWCT_FILE18 18 +#define TWCT_FILE19 19 +#define TWCT_FILE20 20 +#define TWCT_FILE21 21 +#define TWCT_FILE22 22 +#define TWCT_FILE23 23 +#define TWCT_FILE24 24 +#define TWCT_FILE25 25 +#define TWCT_FILE26 26 +#define TWCT_FILE27 27 +#define TWCT_FILE28 28 +#define TWCT_FILE29 29 +#define TWCT_FILE30 30 +#define TWCT_FILE31 31 +#define TWCT_FILE32 32 +#define TWCT_FILE33 33 +#define TWCT_FILE34 34 +#define TWCT_FILE35 35 +#define TWCT_FILE36 36 +#define TWCT_FILE37 37 +#define TWCT_FILE38 38 +#define TWCT_FILE39 39 +#define TWCT_FILE40 40 +#define TWCT_FILE41 41 +#define TWCT_FILE42 42 +#define TWCT_FILE43 43 +#define TWCT_FILE44 44 +#define TWCT_FILE45 45 +#define TWCT_FILE46 46 +#define TWCT_FILE47 47 +#define TWCT_FILE48 48 +#define TWCT_FILE49 49 +#define TWCT_FILE50 50 +#define TWCT_FILE51 51 +#define TWCT_FILE52 52 +#define TWCT_FILE53 53 +#define TWCT_FILE54 54 +#define TWCT_FILE55 55 +#define TWCT_FILE56 56 +#define TWCT_FILE57 57 +#define TWCT_FILE58 58 +#define TWCT_FILE59 59 +#define TWCT_FILE60 60 + +// ICAP_CROPPINGMODE +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, +// Prism, Rufous, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: See below... +// Default: TWCR_AUTOMATICBORDERDETECTION +// Notes: Selects the mode of cropping. This capability is +// tied to ICAP_AUTOMATICBORDERDETECTION, where FALSE +// equals TWCR_TRANSPORT and TRUE equals +// TWCR_AUTOMATICBORDERDETECTION. +// Continuous cropping mode is also known as Long Paper mode. +// If the user set one of the camera to TWCR_CONTIUOUS +// all the camera force to set cropping to TWCR_CONTIUOUS +// and if all camera in TWCR_CONTIUOUS cropping mode, the +// user change one of the camera to other cropping mode +// then all the camera will force to set the same cropping mode +#define ICAP_CROPPINGMODE 0x8022 +#define TWCR_AUTOMATICBORDERDETECTION 0 +#define TWCR_TRANSPORT 1 +#define TWCR_DOCUMENT 2 +#define TWCR_AGGRESSIVEAUTOCROP 3 +#define TWCR_CONTINUOUS 4 +#define TWCR_MULTIPLEAGGRESSIVE 5 +#define TWCR_PHOTO 6 +#define TWCR_PHOTOINROI 7 + + +// ICAP_DOCUMENTTYPE +// Family: A2O2, Blaze, Falcon, Fosters, Oasis, Panther, Piranha, Piranha2, Rufous +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: See below +// Default: TWDT_TEXTWITHGRAPHIC +// Oasis: TWDT_PHOTO +// Notes: Allows user to select the type of document being scanned. +#define ICAP_DOCUMENTTYPE 0x80AC +#define TWDT_PHOTO 0 +#define TWDT_TEXTWITHGRAPHICS 1 +#define TWDT_TEXTWITHPHOTO 2 +#define TWDT_TEXT 3 + + +// ICAP_ECDO +// Family: A2O2, Blaze, Falcon, Fosters, Panther, Piranha, Piranha2, Rufous +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: None +// Notes: Allows user to select the ECDO color for bitonal/gray camera. +// Also refer to DAT_ECDO later in this file. +#define ICAP_ECDO 0x80B8 +#define TWCD_UNKNOWN -1 +#define TWCD_NONE 0 +#define TWCD_FILE01 1 +#define TWCD_FILE02 2 +#define TWCD_FILE03 3 +#define TWCD_FILE04 4 +#define TWCD_FILE05 5 +#define TWCD_FILE06 6 +#define TWCD_FILE07 7 +#define TWCD_FILE08 8 +#define TWCD_FILE09 9 +#define TWCD_FILE10 10 +#define TWCD_FILE11 11 +#define TWCD_FILE12 12 +#define TWCD_FILE13 13 +#define TWCD_FILE14 14 +#define TWCD_FILE15 15 +#define TWCD_FILE16 16 +#define TWCD_FILE17 17 +#define TWCD_FILE18 18 +#define TWCD_FILE19 19 +#define TWCD_FILE20 20 +#define TWCD_FILE21 21 +#define TWCD_FILE22 22 +#define TWCD_FILE23 23 +#define TWCD_FILE24 24 +#define TWCD_FILE25 25 +#define TWCD_FILE26 26 +#define TWCD_FILE27 27 +#define TWCD_FILE28 28 +#define TWCD_FILE29 29 +#define TWCD_FILE30 30 +#define TWCD_FILE31 31 +#define TWCD_FILE32 32 +#define TWCD_FILE33 33 +#define TWCD_FILE34 34 +#define TWCD_FILE35 35 +#define TWCD_FILE36 36 +#define TWCD_FILE37 37 +#define TWCD_FILE38 38 +#define TWCD_FILE39 39 +#define TWCD_FILE40 40 +#define TWCD_FILE41 41 +#define TWCD_FILE42 42 +#define TWCD_FILE43 43 +#define TWCD_FILE44 44 +#define TWCD_FILE45 45 +#define TWCD_FILE46 46 +#define TWCD_FILE47 47 +#define TWCD_FILE48 48 +#define TWCD_FILE49 49 +#define TWCD_FILE50 50 +#define TWCD_FILE51 51 +#define TWCD_FILE52 52 +#define TWCD_FILE53 53 +#define TWCD_FILE54 54 +#define TWCD_FILE55 55 +#define TWCD_FILE56 56 +#define TWCD_FILE57 57 +#define TWCD_FILE58 58 +#define TWCD_FILE59 59 +#define TWCD_FILE60 60 + + +// ICAP_ECDOAGGRESSIVENESS +// Family: Blaze, Falcon, Panther, Piranha2 +// Type: TWTY_INT32 +// Container: Range (per output stream, bitonal only) +// Allowed: -10 to 10 +// Default: 0 +// Notes: Change the amount of multi-color dropout applied to +// a bitonal image. +#define ICAP_ECDOAGGRESSIVENESS 0x8103 + + +// ICAP_ECDOTREATASCOLOR +// Family: A2O2 +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Allows you to indicate that a color other than black or +// dark blue ink was used for the data entered on the form. +// This is not available when ECDO is set to (none). +// This feature is not available for all models. +#define ICAP_ECDOTREATASCOLOR 0x80C3 + + +// ICAP_FILTERBACKGROUND +// Family: A2O2, Alf, Alien, Fosters, Inferno, Mustang2, Phoenix, +// Piranha, Pony, Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Range +// Allowed: 0 - 255 +// Default: 245 +// Notes: Selects the grayscale color to replace the dropout +// color when capturing bitonal images... +#define ICAP_FILTERBACKGROUND 0x8026 + + +// ICAP_FILTERENUM +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, +// Prism, Rufous, Wildfire +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: See ICAP_FILTER +// Default: TWFT_NONE +// Notes: Tied to ICAP_FILTER... +// ICAP_FILTER is an array...and we need an enum (sigh)... +#define ICAP_FILTERENUM 0x8024 + + +// ICAP_FILTERPROCESSING +// Family: Phoenix +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: TWFP_NORMAL, TWFP_LOWRES +// Default: TWFP_NORMAL +// Notes: If color dropout at low resolutions results in +// unwanted artifacts, try changing this capability +// to TWFP_LOWRES. +#define ICAP_FILTERPROCESSING 0x8088 +#define TWFP_NORMAL 0 +#define TWFP_LOWRES 1 + + +// ICAP_FILTERTHRESHOLD +// Family: A2O2, Alf, Alien, Fosters, Inferno, Mustang2, Phoenix, +// Piranha, Pony, Prism, Wildfire +// Type: TWTY_UINT16 +// Container: Range +// Allowed: 0 - 255 +// Default: 175 +// Notes: Selects the threshold point of the color data when +// capturing bitonal images... +#define ICAP_FILTERTHRESHOLD 0x8025 + + +// ICAP_FLIPBACKGROUNDCOLOR +// Family: Gemini +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: 5000/7000 only. This is Border Reduction. A feature +// that changes the borders on the left and the right to +// white the opposite pixel flavor 'color'. A value of +// TRUE does the change, a value of FALSE leaves it as is... +#define ICAP_FLIPBACKGROUNDCOLOR 0x8043 + + +// ICAP_FORCECOMPRESSION +// Family: Gemini, Inferno, Phoenix, Prism, Wildfire, Viper +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: same rules as ICAP_COMPRESSION +// Default: TWCP_NONE +// Notes: A throughput efficiency mechanism. If an application +// requires uncompressed data, but the size of the image +// is more than SCSI can manage, then use this capability +// to force the scanner to compress the data, and the +// Source to decompress in software before transferring +// it to the application. Note that with the Prism +// this value is always TWCP_JPEG for the color cameras. +#define ICAP_FORCECOMPRESSION 0x8008 + + +// ICAP_FOREGROUNDBOLDNESSAGGRESSIVENESS +// Family: Falcon +// Type: TWTY_INT32 +// Container: Range (per color camera) +// Allowed: -10 to 10 +// Default: 0 +// Notes: The foreground boldness aggressiveness setting. +// This setting only has meaning if +// ICAP_FOREGROUNDBOLDNESSMODE is TWFB_AUTOMATIC. +#define ICAP_FOREGROUNDBOLDNESSAGGRESSIVENESS 0x810E + + +// ICAP_FOREGROUNDBOLDNESSMODE +// Family: Falcon +// Type: TWTY_UINT16 +// Container: Enumeration (per color camera) +// Allowed: TWFB_NONE, TWFB_AUTOMATICBASIC, TWFB_AUTOMATIC +// Default: TWFB_NONE +// Notes: The foreground boldness mode +#define ICAP_FOREGROUNDBOLDNESSMODE 0x810F +#define TWFB_NONE 0 +#define TWFB_AUTOMATICBASIC 1 +#define TWFB_AUTOMATIC 2 + + +// ICAP_FRAMELENGTHCONTROL +// Family: Gemini +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: 5000/7000 only. Controls the way the scanner detects +// the end of the document. A value of TRUE reflects the +// way all other scanners work. A value of FALSE should +// be used for documents with ragged bottom edges... +#define ICAP_FRAMELENGTHCONTROL 0x8042 + + +// ICAP_FRAMESANGLE +// Family: Blaze, Falcon, Oasis, Panther, Piranha2 +// Type: TWTY_FRAMEANGLE +// Container: Enumeration +// Allowed: 0,0 - ICAP_PHYSICALWIDTH,ICAP_PHYSICALHEIGHT +// Default: value of ICAP_SUPPORTEDSIZE +// Notes: With the support of angles it becomes necessary to +// provide a way to specify the coordinates and the +// angle simultaneously, otherwise it's impossible to +// provide proper validation. So if you are working +// with non-zero angles, then use this capability +// instead of ICAP_FRAMES or DAT_IMAGELAYOUT. +#define ICAP_FRAMESANGLE 0x80BB + + +// ICAP_GAMMAENABLED +// Family: Blaze, Falcon, Inferno, Panther, Phoenix, Piranha2, Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: A value of TRUE causes the scanner to apply +// its gamma table to the image. This only has +// meaning for grayscale output. +#define ICAP_GAMMAENABLED 0x8074 + + +// ICAP_GRAYSCALE +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, +// Mustang2, Panther, Phoenix, Piranha, Piranha2, Pony, +// Prism,, Rufous, Wildfire +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: If set to TRUE then the color output will be +// converted to grayscale. You can also get to +// this mode by setting ICAP_PIXELTYPE to +// TWPT_GRAY, though if you do it that way you +// will get grayscale output for both the front +// and the rear images... +#define ICAP_GRAYSCALE 0x802E + + +// ICAP_HALFTONESQUALITY +// Family: Viper (3590/4500) +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: TWHQ_SOFTWAREFAST and TWHQ_SOFTWAREBEST or +// TWHQ_HARDWAREBEST +// Default: TWHQ_SOFTWAREFAST or TWHQ_HARDWAREBEST +// Notes: Selects the quality/performance of the +// ChromaTHR(tm) software quality settings for +// making bitonal images from color data. If +// a hardware card is present, than it is the +// only option available; otherwise the two +// software options are made available... +#define ICAP_HALFTONESQUALITY 0x801F +#define TWHQ_NONE 0 +#define TWHQ_SOFTWAREFAST 1 +#define TWHQ_SOFTWAREBEST 2 +#define TWHQ_HARDWAREBEST 3 + + +// ICAP_HOLEFILLENABLED +// Family: Falcon, Piranha, Piranha2 +// Type: TWTY_BOOL +// Container: OneValue (per output stream) +// Allowed: TRUE / FALSE +// Default: FALSE +// Notes: Hole Fill enabled/disabled. +#define ICAP_HOLEFILLENABLED 0x8104 + + +// ICAP_IMAGEEDGEFILL +// Family: A2O2, Falcon, Fosters, Mustang2, Panther, Piranha, +// Piranha2, Pony, Rufous +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: (see list below) +// Default: TWIE_AUTOMATIC if the scanner is supported. +// Otherwise TWIE_NONE is the default +// Notes: Fills in each edge of the image with the selected color. +// The TWIE_AUTOMATIC and TWIE_AUTOMATICWITHTEAR are not available +// for all scanners. +#define ICAP_IMAGEEDGEFILL 0x8095 +#define TWIE_NONE 0 +#define TWIE_WHITE 1 +#define TWIE_BLACK 2 +#define TWIE_AUTOMATIC 3 +#define TWIE_AUTOMATICWITHTEAR 4 + + +// ICAP_IMAGEEDGEFILLALLSIDES +// Family: A2O2, Falcon, Fosters, Panther, Piranha, Piranha2, Rufous +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: Indicates if all of the sides for image edge fill are the same +// value, based on ICAP_IMAGEEDGETOP +#define ICAP_IMAGEEDGEFILLALLSIDES 0x80B9 +#define ICAP_IMAGEEDGEFILLALLSIZE 0x80B9 // Deprecated TWAIN 10.x+ + + +// ICAP_IMAGEEDGE* +// Family: A2O2, Falcon, Fosters, Mustang2, Panther, Piranha, Piranha2, +// Pony, Rufous +// Type: TWTY_FIX32 +// Container: Range (per camera) +// Allowed: 0 to ICAP_PHYSICALWIDTH for left and right +// 0 to ICAP_PHYSICALHEIGHT for the the top and bottom +// Default: 0 +// Notes: Amount of fill for the left/right/top/bottom edge of the image +#define ICAP_IMAGEEDGELEFT 0x8096 +#define ICAP_IMAGEEDGERIGHT 0x8097 +#define ICAP_IMAGEEDGETOP 0x8098 +#define ICAP_IMAGEEDGEBOTTOM 0x8099 + + +// ICAP_IMAGEFILEFORMAT +// Family: (all) +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: TWFF_BMP, TWFF_JFIF, TWFF_TIFF, TWFF_RAW... +// Default: TWFF_BMP +// Notes: This is a standard TWAIN capability, we're just +// adding a custom argument to it +#define TWFF_RAW 0x8001 +#define TWFF_RAWBMP 0x8002 + + +// CAP_IMAGEMAGNIFICATIONFACTOR +// Family: n/a +// Type: TWTY_UINT16 +// Container: Range +// Allowed: 0 - 255 +// Default: 0 +// Notes: Helps the scanner determine the 'real' size of images +// coming from the P-Card. This information is used to +// optimize buffer thresholding. +// This capability is not available at this time. +#define CAP_IMAGEMAGNIFICATIONFACTOR 0x806B + + +// ICAP_LAMPSAVER +// Family: Prism, Viper +// Type: TWTY_BOOL +// Container: OneValue +// Allowed: TRUE / FALSE +// Default: TRUE +// Notes: If TRUE the scanner's lamps will automatically turn off +// after ten minutes of non-use; saving power and extending +// the life of the lamps. +#define ICAP_LAMPSAVER 0x8005 + + +// ICAP_LAMPTIMEOUT +// Family: Prism, Viper +// Type: TWTY_UINT16 +// Container: Range +// Allowed: Viper:0,10 Prism:0-30 (minutes) +// Default: 10, 20 +// Notes: Controls the lamp saver option. Please note that this +// capability should be used instead of ICAP_LAMPSAVER. +#define ICAP_LAMPTIMEOUT 0x802A + + +// ICAP_MEDIATYPE +// Family: A2O2, Blaze, Falcon, Fosters, Panther, Piranha, Piranha2, Rufous +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: See below +// Default: TWMT_PLAINPAPER +// Notes: Allows user to select type of media being scanned. +// The front and rear camera setting must be the same. +#define ICAP_MEDIATYPE 0x80B6 +#define TWMT_CARDSTOCK 0 +#define TWMT_GLOSSYPAPER 1 +#define TWMT_MAGAZINE 2 +#define TWMT_PLAINPAPER 3 +#define TWMT_THINPAPER 4 + + +// ICAP_ORTHOGONALROTATE +// Family: Blaze, Falcon, Piranha2 +// Type: TWTY_UINT16 +// Container: Enumeration (per camera) +// Allowed: (see below) +// Default: TWOROT_NONE +// Notes: Orthogonal rotation +#define ICAP_ORTHOGONALROTATE 0x80D5 +#define TWOROT_NONE 0 +#define TWOROT_AUTOMATIC 1 +#define TWOROT_90 2 +#define TWOROT_180 3 +#define TWOROT_270 4 +#define TWOROT_AUTOMATIC_90 5 +#define TWOROT_AUTOMATIC_180 6 +#define TWOROT_AUTOMATIC_270 7 + + +// ICAP_OVERSCANX +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, Panther, +// Phoenix, Piranha, Piranha2, Prism, Rufous, Wildfire, Viper +// Type: TWTY_FIX32 +// Container: Range (per camera) +// Allowed: 3500: 0-0.5" All others: 0-0.375" +// Default: 3500: 0.5" All others: 0.375" +// Notes: Amount of overscan (in ICAP_UNITS) on the left and +// right sides of the cropping region. +#define ICAP_OVERSCANX 0x8006 + + +// ICAP_OVERSCANY +// Family: A2O2, Alf, Alien, Blaze, Falcon, Fosters, Inferno, Panther, +// Phoenix, Piranha, Piranha2, Prism, Rufous, Wildfire, Viper +// Type: TWTY_FIX32 +// Container: Range (per camera) +// Allowed: 3500: 0-0.5" All others: 0-0.375" +// Default: 3500: 0.5" All others: 0.375" +// Notes: Amount of overscan (in ICAP_UNITS) on the top and +// bottom sides of the cropping region. +#define ICAP_OVERSCANY 0x8007 + + +// ICAP_PADDING +// Family: n/a +// Type: TWTY_UINT16 +// Container: Enumeration +// Allowed: (see list below) +// Default: TWPG_AUTO +// Notes: Selects the padding to force the bytes-per-row +// (or the stride) to always land on a specific +// boundry... +#define ICAP_PADDING 0x80AA +#define TWPG_AUTO 0 +#define TWPG_NONE 1 +#define TWPG_BYTE 2 +#define TWPG_WORD 3 +#define TWPG_LONGWORD 4 +#define TWPG_OCTAWORD 5 + + +// ICAP_PHYSICALHEIGHTADJUST +// Family: Blaze, Falcon, Panther, Piranha2 +// Type: TWTY_FIX32 +// Container: Range +// Allowed: Scanner specific +// Default: Scanner specific +// Notes: Adjusts the value of ICAP_PHYSICALHEIGHT. Applications must +// set this value to have access to the full scan length of the +// ADF. +#define ICAP_PHYSICALHEIGHTADJUST 0x8101 + + +// ICAP_SKEWANGLE +// Family: A2O2, Blaze, Falcon, Fosters, Panther, Piranha, Piranha2, Rufous +// Type: TWTY_UINT16 +// Container: Range +// Allowed: -360000 - 360000 +// Default: 0 +// Notes: Selects the deskew angle for fixed cropping. +#define ICAP_SKEWANGLE 0x80B5 + + +// ICAP_STREAKREMOVALAGGRESSIVENESS +// Family: Blaze, Falcon, Panther, Piranha, Piranha2 +// Type: TWTY_INT32 +// Container: Range +// Allowed: -2 to 2 +// Default: 0 +// Notes: Streak removal aggressiveness level. -2 is least aggressive +// while 2 is most aggressive. The aggressiveness level is +// meaningless if streak removal ‘enabled’ is FALSE. +#define ICAP_STREAKREMOVALAGGRESSIVENESS 0x80C7 + + +// ICAP_STREAKREMOVALENABLED +// Family: Blaze, Falcon, Panther, Piranha, Piranha2 +// Type: TWTY_BOOL +// Container: OneValue (per output stream) +// Allowed: TRUE / FALSE +// Default: Piranha: FALSE +// Others: TRUE +// Notes: Streak Removal enabled/disabled. If TRUE, then the +// streak removal ‘aggressiveness level’ has meaning. +#define ICAP_STREAKREMOVALENABLED 0x80C6 + + +// ICAP_VERTICALBLACKLINEREMOVAL +// Family: Prism (not implemented, ignore this for now) +// Type: TWTY_BOOL +// Container: OneValue (per camera) +// Allowed: TRUE/FALSE +// Default: TRUE +// Notes: Controls vertical black line removal (VBLR). +// Only supported for bitonal with ATP... +#define ICAP_VERTICALBLACKLINEREMOVAL 0x8021 + + + +//////////////////////////////////////////////////////////////////////////////// +// DAT Section +//////////////////////////////////////////////////////////////////////////////// + + + +// +// A2O2/Falcon/Inferno/Phoenix/Piranha/Piranha2/Wildfire auto color learning +// (DG_CONTROL)... +// Notes: This utility will determine the proper ‘Color Amount’ value +// to use with the current ‘Color Threshold’ value, in order to +// save a representative stack of color documents as either color +// or grayscale images... +#define DAT_AUTOCOLORLEARN 0x8006 + + +// +// Color Table Map (DG_CONTROL)... +// Notes: This data structure allows an application to +// map the ICAP_COLORTABLE numeric values to +// both the English and current language strings. +// The call allocates the data structure. The +// application parses the items (a value of +// 0xFFFF for ColorTableValue indicates the end +// of the array). +#define DAT_COLORTABLEMAP 0x8003 +typedef struct +{ + TW_UINT16 ColorTableValue; + TW_STR255 szEnglish; + TW_STR255 szCurrent; +} TW_COLORTABLEMAP, *pTW_COLORTABLEMAP; + + +// +// Device Information +// Notes: This data structure provides additional +// information about the device that may be +// useful with some system message, such +// as WM_DEVICECHANGE. The dwFields value +// indicates how many fields are supported +// by the driver (the value doesn't include +// the dwFields, itself)... +// +// dwModelNumber - ex: 200, 990, 3520... +// szModelName - ex: i200, 990... +// szProtocol - ex: ASPI, SCSISCAN... +// dwFirmware - ex: 10427 (1.4.27) +// +// Only if szProtocol is SCSISCAN +// szDeviceName - \\.\Scanner# style +// szDeviceChange - \\?\SBP2... style +// +// Only if szProtocol is ASPI +// dwHostAdapter +// dwTarget +// +#define DAT_DEVICEINFO 0x8005 +#define TWCNST_DEVICEINFOFIELDS 9 +typedef struct +{ + TW_UINT32 dwFields; + TW_UINT32 dwModelNumber; // field 1 + TW_STR255 szModelName; // field 2 + TW_STR255 szProtocol; // field 3 + TW_STR255 szDeviceName; // field 4 + TW_UINT32 dwHostAdapter; // field 5 + TW_UINT32 dwTarget; // field 6 + // put new fields here... + TW_STR255 szDeviceChange; // field 7 + 256 = 256 + TW_UINT32 dwFirmware; // field 8 + 32 = 288 + TW_STR255 szDriverFilename; // field 9 + 256 = 544 + // always reduce this if we add fields... + TW_UINT8 reserved[65536-544]; +} TW_DEVICEINFO, *pTW_DEVICEINFO; + + +// Driver Electronic Color Dropout (for drivers that support ICAP_ECDO) +// +// Notes: Use this structure to explore and manage dropout colors. +// +// This data structure allows an application to map the ICAP_ECDO +// numeric values to both the English and current language strings. +// ICAP_ECDO is used to select a dropout color for the current camera. +// +// The driver will allocate the returned data structure. +// +// To get the list of dropout choices (for when an application wants +// to present the list on its own user interface): +// ----------------------------------------------------------------- +// 1. Application calls DG_CONTROL / DAT_ECDO / MSG_GET to get +// the list of all the choices. +// 2. Driver returns the list of choices (i.e. fills in the +// TW_ECDO structure for each choice). +// 3. Application loops through the returned list until both szEnglish +// and szCurrent are blank (which indicates the end of the list). +// +// To find a dropout choice (for when an application needs to find +// the TWCD_* for use with ICAP_ECDO): +// ----------------------------------------------------------------- +// 1. Application calls DG_CONTROL / DAT_ECDO / MSG_GET to get +// the list of all the choices. +// 2. Driver returns the list of choices (i.e. fills in the +// TW_ECDO structure for each choice). +// 3. Application loops through the returned list until it finds the +// desired English dropout name (use szEnglish because this will +// always be consistent no matter what the language of the driver +// is; where szCurrrent will be based on the driver's current +// language, which may be different then the last time the list +// was returned). +// 4. Application uses the EcdoValue of the desired dropout choice +// as the setting for ICAP_ECDO. This means the EcdoValue +// will be one of the TWCD_* defines (e.g. TWCD_FILE01). +// +#define DAT_ECDO 0x800A +typedef struct +{ + TW_UINT16 EcdoValue; + TW_STR255 szEcdo; + TW_STR255 szText; + TW_UINT8 Reserved[1024]; // Room for more stuff +} TW_ECDO, *pTW_ECDO; + + +// Driver Logs (DG_CONTROL / DAT_LOG / MSG_GET) +// +// This will get a log and save it in the provided file. There are text based logs and XML based +// logs. Some logs are scanner specific, so the content will not be common among all scanner +// families, and some are common so the content can be common among all scanners. +// +// Text based logs are ones that can be easily viewed in something like Notepad, each log entry +// will be on its own line. These logs contain the same information as is shown on the driver UI +// on the Log tab. The language for the translated text will be based on the current language +// selected for the driver. +// +// The XML based logs will contain data in a XML format. For details on the XML format for +// a log, refer to the TWAIN_Features.htm in the Intergrator’s Guide. +// +// For devices that support the Flatbed as an accessory (e.g. i1300, i1400), the application +// will need to make a second call to get the flatbed’s information (see DeviceType below). This +// is necessary because the flatbed is a separate device. +// +// To generate an EKLOG specify a LogType of TWGL_EKLOG. The DeviceType is ignored. The +// Filename specifies the full path and file for the log, and it should end in .eklog. +// The Description is stored with the EKLOG. Use SaveImages to specify if .tif and .jpg +// files should be included (including them may result in a very large EKLOG file). +// +#define DAT_LOG 0x800C +typedef struct { + TW_UINT16 LogType; // log to get (see TWGL_*) + TW_UINT16 DeviceType; // ADF or Flatbed (see TWDV_*) + TW_STR255 Filename; // full path and name to store log into + TW_STR255 Description; // Reason for log (use with TWLG_EKLOG) + TW_BOOL SaveImages; // Save images (use with TWLG_EKLOG) + TW_UINT8 Reserved[254]; // Room for future expansion +} TW_LOG, *pTW_LOG; + +// different logs that can be retrieved via DAT_LOG. The comment indicate whether the +// log is text based or XML base, and whether it is common among all scanner families or not. +#define TWGL_GENERAL 0 // text, not common +#define TWGL_OPERATOR 1 // text, not common +#define TWGL_GENERAL_XML 2 // XML, common +#define TWGL_EKLOG 3 // EKLOG (TWDV_* value is ignored) + + +// different devices, which can be used by multiple CAPs/ICAPs/DATs +#define TWDV_UNKNOWN 0 // unknown/reserved +#define TWDV_ADF 1 // base scanner +#define TWDV_FLATBED 2 // flatbed scanner + + +// OCP buttons (DG_CONTROL / DAT_OCPBUTTONS / MSG_SET) +// +// Scanner supported: Falcon, Piranha2 +// Max number of buttons: 9 +// +// This feature allows the application to set the displayed text on the OCP for +// each button. It also allows the application to set the Paper Source for each +// button. The driver may not remember this information. So we recommand +// that the application should send the text after successfully MSG_OPENDS. +// +// To configure the number of buttons for the user to scroll through, the +// App must send an array of TW_OCPBUTTONS structures which has the number +// of the buttons defined plus an extra one that has Text field blank. +// For example, if the user wants to setup the text for 3 buttons then +// define the array of 4 TW_OCPBUTTONS structures. Set the Text for each +// the first 3 items and set the Text to blank for the 4th. +// +// For the scanners that don’t have the ability to display the text, the +// application still can configure the number of buttons for the user +// to scroll through. +// +// The order of the buttons displayed on the OCP is the same order of the +// buttons defined in the array. +// +// The Text is in the current language. The Ansi code page which is based +// on the CAP_LANGUAGE is used for the conversion. +// +// The Paper Source value to pass in is the TWAIN enum value for the Paper +// Source associated with the button. For eaxmple, TWPU_ADF is the enum value +// associated with the "adf" paper source. For the complete list of Paper +// Source enums, look at the TWPU_* definitions under CAP_PAPERSOURCE. +// +// The NumDataFields value refers to the number of data fields to follow. +// If the PaperSource field is being set, then NumDataFields must be set to 1. +// In the future, we could add other data fields, in which case NumDataFields +// would be incremented by the caller. +// +// The Reserved field must be initialized to zero. +// +// For example, if setting a button to "Color PDF" and the paper source is +// "Document Feeder", then: +// Text = "Color PDF" +// NumDataFields = 1 +// PaperSource = TWPU_ADF +// +#define DAT_OCPBUTTONS 0x800E +typedef struct { + TW_STR255 Text; // Displayed text on OCP for a button + TW_UINT32 NumDataFields; // Number of fields of data that follow this field + TW_UINT32 PaperSource; // TWPU_* enum from CAP_PAPERSOURCE + TW_UINT8 Reserved[504]; // Room for future expansion +} TW_OCPBUTTONS, *pTW_OCPBUTTONS; + + +// +// Alien Personality Card (DG_CONTROL)... +// Notes: These represent the common commands that pcards +// may support. Other commands documented by the +// manufacturer of the card may be accessed using +// the DAT_PASSTHRU operation... +#define DAT_PCARD 0x8002 +typedef struct +{ + TW_UINT32 StructSize; + TW_UINT32 Action; + TW_UINT32 DataSize; + TW_MEMREF Data; +} TW_PCARD, *pTW_PCARD; + +// Additional return codes... +#define TWRC_PCARD_CHECKSTATUS 0x8002 // something interesting has happened +#define TWRC_PCARD_FATAL 0x8003 // the card is dead +#define TWRC_PCARD_RETRYIMAGE 0x8004 // the image failed a quality test +#define TWRC_PCARD_NOCARD 0x8005 // no card installed + +// Supported actions... +#define TWPCD_ACTION_INQUIRY 0 +#define TWPCD_ACTION_STATUS 1 +#define TWPCD_ACTION_ATTRIBUTES 2 +#define TWPCD_ACTION_DIAGNOSTIC 3 + +// Support structures for the various actions... +typedef struct +{ + TW_INT8 StructSize[4]; // 0-3 + TW_INT8 VendorId[8]; // 4-11 + TW_INT8 ProductId[16]; // 12-27 + TW_INT8 RevisionNumber[4]; // 28-31 + TW_INT8 BuildNumber[2]; // 32-33 + TW_INT8 Reserved[2048-34]; // 34-2048 +} TW_PCARD_INQUIRY, FAR * pTW_PCARD_INQUIRY; + +typedef struct +{ + TW_INT8 StructSize[4]; // 0-3 + TW_INT8 Code[4]; // 4-7 + TW_INT8 Severity; // 8 + TW_INT8 Text[1011]; // 9-1019 + TW_INT8 Reserved[2048-1020]; // 1020-2048 +} TW_PCARD_STATUS, *pTW_PCARD_STATUS; + +typedef struct +{ + TW_INT8 StructSize[4]; // 0-3 +} TW_PCARD_ATTRIBUTES, *pTW_PCARD_ATTRIBUTES; + +typedef struct +{ + TW_INT8 StructSize[4]; // 0-3 +} TW_PCARD_HEADER, *pTW_PCARD_HEADER; + + +// Driver Profiles (for drivers that support CAP_PROFILES) +// +// Notes: Use this structure to explore and manage profiles. These profiles +// are compatible with DAT_CUSTOMDSDATA. +// +// This data structure allows an application to map the CAP_PROFILES +// numeric values to both the English and current language strings. +// +// To get the list of profiles (for when an application wants to +// present the list on its own user interface): +// ----------------------------------------------------------------- +// 1. Application calls DG_CONTROL / DAT_PROFILES / MSG_GET to get +// the list of all the profiles. +// 2. Driver returns the list of profiles (i.e. fills in the +// TW_PROFILES structure for each profile) +// 3. Application loops through the returned list until both szEnglish +// and szName are blank (which indicates the end of the list) +// +// To find a profile (for when an application needs to find the +// TWPO_* for use with CAP_PROFILES): +// ----------------------------------------------------------------- +// 1. Application calls DG_CONTROL / DAT_PROFILES / MSG_GET to get +// the list of all the profiles. +// 2. Driver returns the list of profiles (i.e. fills in the +// TW_PROFILES structure for each profile) +// 3. Application loops through the returned list until it finds the +// desired English profile name (use szEnglish because this will +// always be consistent no matter what the language of the driver +// is; where szName will be based on the driver's current +// language, which may be different then the last time the list +// was returned) OR ID. The application should use szEnglish name +// if they want to always find a specific profile (i.e. Black and +// White Doc) OR use ID when it doesn't care about specific names, +// but wants to use unique IDs to get the same profile even if the +// user renames it. +// 4. Application uses the ProfilesValue of the desired profile as +// the setting for CAP_PROFILES. This means the ProfilesValue +// will be one of the TWPO_* defines (e.g. TWPO_FILE01). +// +// Unless otherwise specified, start with a structure set to all zeros +// (i.e. memset to 0), then fill in all required fields, and then fill +// in any optional fields as desired +// +// To create a new profile (version 10.x+): +// ----------------------------------------------------------------- +// - Application calls DG_CONTROL / DAT_PROFILES / MSG_PROFILECREATE +// - Required: +// szName - Name of the new profile +// - Optional: +// szFilename - Graphic filename associate with a new profile +// - Errors: +// If the new profile name is already existed then the driver +// driver will return TWCC_BADVALUE +// +// To save the current driver settings (version 10.x+): +// ----------------------------------------------------------------- +// - Application calls DG_CONTROL / DAT_PROFILES / MSG_PROFILESAVE +// - Required: (none) +// - Optional: (none) +// - Errors: (none) +// +// To delete the current profile (version 10.x+): +// ----------------------------------------------------------------- +// - Application calls DG_CONTROL / DAT_PROFILES / MSG_PROFILEDELETE +// - Required: (none) +// - Optional: +// szEnglish - English name of profile that will be selected +// after deletion. If szEnglish is not specified, +// the driver will determine which profile to +// select. If you are deleting the last profile, +// then szEnglish should be blank +// - Error: +// If the profile is readonly or the profile state is +// TWPRF_PROFILESTATE_MODIFIED, the driver will return TWCC_DENIED +// +// To rename the current profile (version 10.x+): +// ----------------------------------------------------------------- +// - Application calls DG_CONTROL / DAT_PROFILES / MSG_PROFILERENAME +// - Required: At least specify one of the option below +// - Optional: (can specify szCurrent or szFilename or both) +// szName - Name of the profile; if not supplied, the name +// will not be changed +// szFilename - Graphic filename associate with a new profile; +// if not supplied, the graphic will not be changed +// - Error: +// If the profile is readonly or the profile state is +// TWPRF_PROFILESTATE_MODIFIED, the driver will return TWCC_DENIED +// +// To restore all the supplied profiles to what was installed (v10.x+): +// ----------------------------------------------------------------- +// - Application calls DG_CONTROL / DAT_PROFILES / MSG_PROFILERESTORE +// - Required: +// blSharedSettings - Include settings shared across profiles +// (e.g. Power Saver) +// - Optional: (none) +// - Error: +// If profile state is TWPRF_PROFILESTATE_MODIFIED for one of the +// profiles, the driver will return TWCC_DENIED +// +// To export profiles (version 10.x+): +// ----------------------------------------------------------------- +// - Application calls DG_CONTROL / DAT_PROFILES / MSG_PROFILEEXPORT +// - Required: +// szFilename - Name of the file to export +// - Optional: (none) +// - Error: +// If profile state is TWPRF_PROFILESTATE_MODIFIED for one of the +// profiles, the driver will return TWCC_DENIED +// +// To import profiles (version 10.x+): +// ----------------------------------------------------------------- +// - Application calls DG_CONTROL / DAT_PROFILES / MSG_PROFILEIMPORT +// This will remove all profiles that have been configured and +// replace them with the imported profiles. +// - Required: +// szFilename - Name of the file to import +// - Optional: (none) +// - Error: +// If profile state is TWPRF_PROFILESTATE_MODIFIED for one of the +// profiles, the driver will return TWCC_DENIED +// +// To set current profile (version 10.x+): +// ----------------------------------------------------------------- +// - Application calls DG_CONTROL / DAT_PROFILES / MSG_PROFILESET +// - Required: +// szEnglish - English name of the profile to be selected +// - Optional: (none) +// - Error: (none) +// +#define DAT_PROFILES 0x8007 +typedef struct +{ + TW_UINT16 ProfilesValue; // CAP_PROFILES TWPO_* value + TW_STR255 szFamily; // Deprecated TWAIN 10.x+ + TW_STR255 szId; // unique profile ID + TW_STR255 szEnglish; // profile name in English + TW_STR255 szCurrent; // Deprecated TWAIN 10.x+ + TW_UINT32 Group; // group type (see TWPRF_GROUP_*) + TW_BOOL Readonly; // cannot be modifed or deleted? + TW_BOOL Default; // a default profile? + TW_UINT32 DriverVersion; // Deprecated TWAIN 10.x+ + TW_STR255 szMethod; // Deprecated TWAIN 10.x+ + + // the following are valid version 10.x+ + + TW_STR255 szName; // profile name in the current language. + // Uses the Ansi code page. The + // language is based on CAP_LANGUAGE + + TW_STR255 szFilename; // Full path and filename to a file + // The filename is either graphic filename + // or profile filename based on the MSG + // See the description above for more details + + TW_BOOL blSharedSettings; // Indicates whether the shared profile + // settings are to be reset as well. + TW_UINT16 ProfileState; // Profile state (see TWPRF_PROFILESTATE_*) + + TW_UINT8 Reserved[508]; // Room for more stuff, always set to 0. + +} TW_PROFILES, *pTW_PROFILES; + + +// group types for TW_PROFILES +#define TWPRF_GROUP_ALL 0 + + +// The profile state. There can only be one profile in the +// profile list that is not normal. +#define TWPRF_PROFILESTATE_NORMAL 0 // Not selected or modified +#define TWPRF_PROFILESTATE_CURRENT 1 // Currently selected profile +#define TWPRF_PROFILESTATE_MODIFIED 2 // Currently selected and has been modified + + +// Notes: This operation is used by the application to +// DG_CONTROL / DAT_QUERYSUPPORT/ MSG_GET or MSG_GETCURRENT or +// MSG_GETDEFAULT. This allows the application to find out if the DAT +// capability is supported or not. +#define DAT_QUERYSUPPORT 0x800B + +typedef struct { + TW_UINT32 DG; + TW_UINT16 DAT; + TW_UINT16 MSG[64]; //Return the array of supported MSG +}TW_QUERYSUPPORT, FAR *pTW_QUERYSUPPORT; + + +// +// Gemini/Viper RAW Status (DG_CONTROL)... +// Notes: This command may be issued at any time. It reports +// the raw data for the last error status reported by +// the scanner. These are device dependent values +// which may be reported for servicing issues, but +// should not be used to drive code... +// +#define DAT_STATUSRAW 0x8001 +typedef struct +{ + TW_INT32 LastToolkitStatus; + TW_INT32 LastSenseData[3]; + TW_STR255 LastText; + TW_INT32 CurrentState; + TW_INT32 LastKDSStatus; +} TW_STATUSRAW, *pTW_STATUSRAW; + + +// +// Window Management +// Notes: Use this structure to add and remove windows. +// A window is an index to a set of cameras, such +// as front_bitonal, front_color, etc... +// +#define DAT_WINDOW 0x8008 +typedef struct +{ + TW_UINT16 WindowCamera; // CAP_WINDOWCAMERA value + TW_UINT8 Reserved[1024]; // Room for more stuff +} TW_WINDOW, *pTW_WINDOW; + + +#define TWTY_FRAMEANGLE 0x8001 +typedef struct { + TW_FIX32 Left; // same as TW_FRAME.Left + TW_FIX32 Top; // same as TW_FRAME.Top + TW_FIX32 Right; // same as TW_FRAME.Right + TW_FIX32 Bottom; // same as TW_FRAME.Bottom + TW_INT32 Angle; // -3600000 to +3600000 +} TW_FRAMEANGLE, FAR * pTW_FRAMEANGLE; + + + +//////////////////////////////////////////////////////////////////////////////// +// MSG Section +//////////////////////////////////////////////////////////////////////////////// + + + +// +// All Disable/Enable UI... +// Notes: This message is added to DG_CONTROL / DAT_USERINTERFACE +// to allow the application to temporarily disable access +// to the Source's GUI. +// +#define MSG_DISABLEUI 0x8003 +#define MSG_ENABLEUI 0x8004 + + +// +// All Enable Scanner... +// Notes: This message is added to DG_CONTROL / DAT_USERINTERFACE +// to allow the user to enable the scanner. The main use +// for this command is to allow a filter writer to split +// a MSG_ENABLEDS into a MSG_SETUPDS followed by a +// MSG_ENABLESCANNER, allowing the filter to interrogate +// the scanner about its current setting before moving paper. +// This command is only permitted in State 4, and if ShowUI +// is set to FALSE... +// +#define MSG_ENABLESCANNER 0x8006 + + +// +// All Special Get... +// Notes: Used to get data out of sequence with the specification. +// The only example at this time is use with DG_IMAGE / +// DAT_EXTIMAGEINFO... +// +#define MSG_GETSPECIAL 0x8005 + + +// +// Profile messages... +// Notes: Use these with DG_CONTROL / DAT_PROFILES. +// +#define MSG_SAVEPROFILE 0x8008 // Deprecated TWAIN 10.x+ +#define MSG_DELETEPROFILE 0x8009 // Deprecated TWAIN 10.x+ +#define MSG_PROFILECREATE 0x8015 +#define MSG_PROFILEDELETE 0x8016 +#define MSG_PROFILESAVE 0x8017 +#define MSG_PROFILERENAME 0x8018 +#define MSG_PROFILERESTORE 0x8019 +#define MSG_PROFILEEXPORT 0x801A +#define MSG_PROFILEIMPORT 0x801B +#define MSG_PROFILESET 0x801C + + +// +// All Setup DS... +// Notes: This message is added to DG_CONTROL / DAT_USERINTERFACE +// to allow the user download the current settings without +// initiating a scanning session. The state remains at 4, +// no matter what the outcome of the command. +// To select the current settings see CAP_PROFILES or CUSTOMDSDATA +// +#define MSG_SETUPDS 0x8002 + + +// +// Window messages... +// Notes: Use these with DG_CONTROL / DAT_WINDOW. +// +#define MSG_ADDWINDOW 0x8011 +#define MSG_DELETEWINDOW 0x8012 + + +// OBS_JPEGQUALITY +// Notes: Same as standard ICAP_JPEGQUALITY, do not use. +#define OBS_JPEGQUALITY 0x8040 + + +// +// All Stop Feeder... +// Notes: This message is added to DG_CONTROL / DAT_PENDINGXFERS +// to allow the user to turn off the transport. +// Do not use this message, use MSG_STOPFEEDER... +// +#define OBS_STOPFEEDER 0x8001 + + + +//////////////////////////////////////////////////////////////////////////////// +// TW Section +//////////////////////////////////////////////////////////////////////////////// + + + +// Filter... +#define TWRC_FILTER_CONTINUE 0x8010 + + +// +// Prism/Wildfire Patchcode extensions... +// Notes: This section extends the patch codes to match those +// supported by the Prism/Wildfire scanner family. Note that +// a transfer patch is interpreted to be a level 2 or +// a level three, so even though it can be set, a +// transfer patch is never received as part of the +// extended image info data... +// +#define TWPCH_PATCHT2 0x8001 +#define TWPCH_PATCHT3 0x8002 +#define TWEJ_PATCHT2 0x8001 +#define TWEJ_PATCHT3 0x8002 + + +// +// QuerySupport extensions... +// +#define TWQC_MACHINE 0x1000 +#define TWQC_BITONAL 0x2000 +#define TWQC_COLOR 0x4000 +#define TWQC_WINDOW 0x8000 + + +// Device Events +// +// The following are the device event supported by all drivers +// prior to version 9.3: TWDE_PAPERDOUBLEFEED and TWDE_PAPERJAM +// +// For version 9.3 drivers and up, the following is a custom +// CAP_DEVICEEVENT the application can ask the driver to send +// it when the lamps need to warmup prior to scanning. This +// event will be issued after a MSG_ENABLEDS if the lamps +// are not warmed up. The number of seconds before the lamps +// are ready will be in the TimeBeforeFirstCapture field of +// the TW_DEVICEVENT structure. +// +// NOTE: The number of seconds may be longer than what it +// actually take. This could happen because an error +// occurred (e.g. opening cover, cancelling) or for +// models that do not have an accurate warmup value. +// Because of this, if your application is displaying +// a “please wait” message for the user, the message +// needs to be closed when MSG_XFERREADY is received. +#define TWDE_LAMPWARMUP 0x8002 + + +// TWEI_HDR_BINARIZATIONQUALITY +// +// This conveys the quality level of the binarized image +// Some binarization methods can detect if the binarization +// resulted in a noisy (or otherwise suspect) output. +// For those binarization method that don't detect this, +// 'normal' is returned. +#define TWBQ_NORMAL 0 +#define TWBQ_NOISY 1 + + +//////////////////////////////////////////////////////////////////////////////// +// EXTIMAGEINFO Section +//////////////////////////////////////////////////////////////////////////////// + + + +// +// Gemini/Inferno/Phoenix/Prism/Viper/Wildfire Custom TWEI_ fields for DAT_EXTIMAGEINFO... +// Notes: These fields return custom image information +// taken from the image header (or footer)... +// +#define TWEI_HDR_PAGESIDE 0x8001 // 0-front 1-rear +#define TWEI_HDR_DOCUMENTCOUNT 0x8002 // Count of pages (seeded by user) +#define TWEI_HDR_LENGTH 0x8003 // Number of bytes of image data +#define TWEI_HDR_LEVEL 0x8004 // Image Address Level +#define TWEI_HDR_MODE 0x8005 // Gemini Mode (1-18) +#define TWEI_HDR_LINELENGTH 0x8006 // Width +#define TWEI_HDR_PAGELENGTH 0x8007 // Height +#define TWEI_HDR_COMPRESSION 0x8008 // ICAP_COMPRESSION TWCP_* value +#define TWEI_HDR_DATE 0x8009 // YY/MM/DD +#define TWEI_HDR_TIME 0x800A // HH/MM/00 +#define TWEI_HDR_ROLL 0x800B // Imagelink 990 Film Roll Number +#define TWEI_HDR_RESOLUTION 0x800C // Dots Per Inch (DPI) +#define TWEI_HDR_BITORDER 0x800D // Bit order in a byte +#define TWEI_HDR_SKEW 0x800E // (obsolete) +#define TWEI_HDR_MOMENTARYFLAG 0x800F // Gemini Momentary +#define TWEI_HDR_LATCHEDFLAG 0x8010 // Gemini Latched +#define TWEI_HDR_BARCODE 0x8011 // Gemini Barcode(s) +#define TWEI_HDR_DESKEW 0x8012 // Deskew status +#define TWEI_HDR_DESKEWANGLE 0x8013 // Deskew angle +#define TWEI_HDR_POLARITY 0x8014 // ICAP_PIXELFLAVOR TWPF_* value +#define TWEI_HDR_PRINTERSTRING 0x8015 // Viper/Prism/Wildfire printed string +#define TWEI_HDR_PRINTERINDEX 0x8016 // Kinda like the document count +#define TWEI_HDR_IMAGENUMBER 0x8017 // Count images this session +#define TWEI_HDR_PAGENUMBER 0x8018 // Count sheets of paper this session +#define TWEI_HDR_PAGEIMAGENUMBER 0x8019 // Image count on a page (1 - 4) +#define TWEI_HDR_BOOKNAME_A 0x801A // Fixed field Gemini/Prism/Wildfire A +#define TWEI_HDR_BOOKNAME_B 0x801B // Fixed field Prism/Wildfire B +#define TWEI_HDR_BOOKNAME_C 0x801C // Fixed field Prism/Wildfire C +#define TWEI_HDR_BOOKNAME_D 0x801D // Fixed field Prism/Wildfire D +#define TWEI_HDR_IMAGEADDRESSSTRING 0x801E // Prism/Wildfire image address string +#define TWEI_HDR_XOFFSET 0x801F // Left cropping offset +#define TWEI_HDR_YOFFSET 0x8020 // Right cropping offset +#define TWEI_HDR_FEATUREPATCH 0x8021 // Feature patch (only image with patch: i200/i600) +#define TWEI_HDR_IMAGEADDRESSDEFS 0x8022 // Image Address field definitions +#define TWEI_HDR_PCARD_HEADER 0x8023 // Personality-Card Header +#define TWEI_HDR_PCARD_FOOTER 0x8024 // Personality-Card Footer +#define TWEI_HDR_TOKEN_COUNT 0x8025 // Alien token flag +#define TWEI_HDR_REGENERATION 0x8026 // Alien retry count +#define TWEI_HDR_IMAGESTATUS 0x8027 // Alien image status +#define TWEI_HDR_DITHER 0x8028 // Bitonal dithering algorithm used +#define TWEI_HDR_PATCHDETECTED 0x8029 // Patch was found on the document +#define TWEI_HDR_FOLDEDCORNERPERCENTAGE 0x802A // Phoenix folded corner percentage +#define TWEI_HDR_DESKEWCONFIDENCEFACTOR 0x802B // Phoenix deskew confidence factor +#define TWEI_HDR_BITONALCONTRASTPERCENTAGE 0x802C // Phoenix bitonal contrast percentage +#define TWEI_HDR_BITONALCONTRAST 0x802D // Phoenix bitonal contrast +#define TWEI_HDR_BITONALTHRESHOLD 0x802E // Phoenix bitonal threshold +#define TWEI_HDR_SUMHISTOGRAM 0x802F // Phoenix sum historgram +#define TWEI_HDR_DIFFERENCEHISTOGRAM 0x8030 // Phoenix difference histogram +#define TWEI_HDR_GAMMATABLE 0x8031 // Phoenix gamma table +#define TWEI_HDR_MULTIFEED 0x8032 // Multifeed detected +#define TWEI_HDR_DESKEWANGLEACTUAL 0x8033 // Signed deskew angle to scanner precision +#define TWEI_HDR_RAWIMAGEHEADER 0x8034 // Raw image header from scanner +#define TWEI_HDR_LONGPAPERSEGMENT 0x8035 // Long paper segment number +#define TWEI_HDR_LONGPAPERLASTSEGMENT 0x8036 // Long pager last segment +#define TWEI_HDR_AUTOCOLORDETECTED 0x8037 // Auto color detected +#define TWEI_HDR_AUTOCOLORAMOUNT 0x8038 // Auto color amount +#define TWEI_HDR_AUTOCOLORTHRESHOLD 0x8039 // Auto color threshold +#define TWEI_HDR_XML 0x803A // data in XML format (see sample at end of file) +#define TWEI_HDR_DROPOUTSTATUS 0x803B // ECDO Algorithm Status +#define TWEI_HDR_PROCESSINGSTATUS 0x803C // Processing Status +#define TWEI_HDR_BINARIZATIONQUALITY 0x803D // Conveys the quality level of the binarized image +#define TWEI_HDR_DUALSTACKINGSTACK 0x803E // Which output tray a document was dropped into (i5000 only) + // Only valid if dual stacking is enabled; legal values are 1 and 2 + + + +//////////////////////////////////////////////////////////////////////////////// +// List of custom capabilities in numeric order +//////////////////////////////////////////////////////////////////////////////// + + +/* +CAP_FEEDERKEEPALIVE 0x8001 +CAP_PAGESIZELIMIT 0x8002 +CAP_TRANSPORTTIMEOUT 0x8003 +CAP_WINDOWPOSITION 0x8004 +ICAP_LAMPSAVER 0x8005 +ICAP_OVERSCANX 0x8006 +ICAP_OVERSCANY 0x8007 +ICAP_FORCECOMPRESSION 0x8008 +CAP_PRINTERWRITESEQUENCESTRING 0x8009 +CAP_PRINTERWRITESEQUENCESPACE 0x800A +CAP_PRINTERWRITESEQUENCESPACESTRING 0x800B +CAP_PRINTERWRITESEQUENCEMESSAGE1 0x800C +CAP_PRINTERWRITESEQUENCEMESSAGE2 0x800D +CAP_PRINTERWRITESEQUENCEMESSAGE3 0x800E +CAP_PRINTERWRITESEQUENCEMESSAGE4 0x800F +CAP_PRINTERWRITESEQUENCEMESSAGE5 0x8010 +CAP_PRINTERWRITESEQUENCEMESSAGE6 0x8011 +CAP_PRINTERWRITESEQUENCEMESSAGE7 0x8012 +CAP_PRINTERWRITESEQUENCEMESSAGE8 0x8013 +CAP_PRINTERWRITESEQUENCEMESSAGE9 0x8014 +CAP_IMAGEADDRESS 0x8015 +CAP_IMAGEADDRESSENABLED 0x8016 +CAP_DOCUMENTCOUNT 0x8017 +CAP_DOCUMENTCOUNTENABLED 0x8018 +CAP_MODE 0x8019 +CAP_PRINTERINDEXFORMAT 0x801A +CAP_PRINTERINDEXDIGITS 0x801B +CAP_PRINTERDATEDELIMITER 0x801C +CAP_CAMERAENABLE 0x801D +CAP_CAMERAORDER 0x801E +ICAP_HALFTONESQUALITY 0x801F +ICAP_COLORTABLE 0x8020 +ICAP_VERTICALBLACKLINEREMOVAL 0x8021 +ICAP_CROPPINGMODE 0x8022 +ICAP_ADDBORDER 0x8023 +ICAP_FILTERENUM 0x8024 +ICAP_FILTERTHRESHOLD 0x8025 +ICAP_FILTERBACKGROUND 0x8026 +CAP_ULTRASONICSENSITIVITY 0x8027 +CAP_TRANSPORTTIMEOUTRESPONSE 0x8028 +CAP_TRANSPORTAUTOSTART 0x8029 +ICAP_LAMPTIMEOUT 0x802A +CAP_BATCHCOUNT 0x802B +CAP_PAPERSOURCE 0x802C +CAP_MULTIFEEDSOUND 0x802D +ICAP_GRAYSCALE 0x802E +CAP_ENERGYSTAR 0x802F +CAP_BINARIZATION 0x8030 +CAP_PAGECOUNT 0x8031 +CAP_NOWAIT 0x8032 +CAP_PRINTERDATEFORMAT 0x8033 +CAP_PRINTERWRITESEQUENCEMESSAGE10 0x8034 +CAP_PRINTERWRITESEQUENCEMESSAGE11 0x8035 +CAP_PRINTERWRITESEQUENCEMESSAGE12 0x8036 +CAP_FUNCTIONKEY1 0x8037 +CAP_FUNCTIONKEY2 0x8038 +CAP_FUNCTIONKEY3 0x8039 +CAP_FUNCTIONKEY4 0x803A +CAP_LEVELTOFOLLOW1 0x803B +CAP_LEVELTOFOLLOW2 0x803C +CAP_LEVELTOFOLLOW3 0x803D +CAP_IMAGEADDRESSTEMPLATES 0x803E +CAP_BATCHSTARTFUNCTION 0x803F +OBS_JPEGQUALITY 0x8040 +ICAP_COLORSHARPENING 0x8041 +ICAP_FRAMELENGTHCONTROL 0x8042 +ICAP_FLIPBACKGROUNDCOLOR 0x8043 +CAP_PRINTERFONT 0x8044 +CAP_PRINTERIMAGEADDRESSFORMAT 0x8045 +CAP_PRINTERPOSITION 0x8046 +CAP_PRINTERIMAGEADDRESSLEVEL 0x8047 +CAP_PRINTERWRITESEQUENCEINDEX 0x8048 +CAP_PRINTERWRITESEQUENCE 0x8049 +CAP_IMAGEADDRESS_A 0x804A +CAP_IMAGEADDRESS_B 0x804B +CAP_IMAGEADDRESS_C 0x804C +CAP_IMAGEADDRESS_D 0x804D +CAP_BATCHLEVEL 0x804E +CAP_BATCHENDFUNCTION 0x804F +// Reserved 0x8050 - 0x8053 +CAP_ENABLECOLORPATCHCODE 0x8054 +CAP_FIXEDDOCUMENTSIZE 0x8055 +CAP_DOUBLEFEEDSTOP 0x8056 +CAP_MULTIFEEDTHICKNESSDETECTION 0x8057 +// Reserved 0x8058 - 0x8069 +CAP_PCARDENABLED 0x806A +CAP_IMAGEMAGNIFICATIONFACTOR 0x806B +CAP_INDICATORSWARMUP 0x806C +CAP_TOGGLEPATCH 0x806D +CAP_DOUBLEFEEDENDJOB 0x806E +CAP_FEEDERMODE 0x806F +CAP_FOLDEDCORNER 0x8070 +CAP_FOLDEDCORNERSENSITIVITY 0x8071 +ICAP_GAMMAENABLED 0x8074 +CAP_EASYSTACKING 0x8075 +// Reserved 0x8076 - 0x8085 +CAP_MULTIFEEDCOUNT 0x8086 +CAP_PATCHCOUNT 0x8087 +ICAP_FILTERPROCESSING 0x8088 +CAP_BACKGROUND 0x8089 +CAP_PRINTERWRITESEQUENCEMESSAGEINDEX 0x808A +CAP_CHECKDIGIT 0x808B +CAP_BACKGROUNDFRONT 0x808C +CAP_BACKGROUNDREAR 0x808D +CAP_BACKGROUNDPLATEN 0x808E +CAP_ULTRASONICSENSORCENTER 0x808F +CAP_ULTRASONICSENSORLEFT 0x8090 +CAP_ULTRASONICSENSORRIGHT 0x8091 +ICAP_AUTOCOLORAMOUNT 0x8092 +ICAP_AUTOCOLORCONTENT 0x8093 +ICAP_AUTOCOLORTHRESHOLD 0x8094 +ICAP_IMAGEEDGEFILL 0x8095 +ICAP_IMAGEEDGELEFT 0x8096 +ICAP_IMAGEEDGERIGHT 0x8097 +ICAP_IMAGEEDGETOP 0x8098 +ICAP_IMAGEEDGEBOTTOM 0x8099 +CAP_BLANKPAGE 0x809A +CAP_BLANKPAGEMODE 0x809B +CAP_BLANKPAGECOMPSIZEBW 0x809C +CAP_BLANKPAGECOMPSIZEGRAY 0x809D +CAP_BLANKPAGECOMPSIZERGB 0x809E +CAP_PROFILES 0x809F +ICAP_ANSELBRIGHTNESS 0x80A0 +ICAP_ANSELCONTRAST 0x80A1 +ICAP_ANSELHIGHLIGHT 0x80A2 +ICAP_ANSELMIDTONE 0x80A3 +ICAP_ANSELREMOVEREDEYE 0x80A4 +ICAP_ANSELRESTORECOLOR 0x80A5 +ICAP_ANSELSATURATECOLORS 0x80A6 +ICAP_ANSELSHADOW 0x80A7 +ICAP_ANSELSHARPENIMAGE 0x80A8 +ICAP_ANSELSHASTA 0x80A9 +ICAP_PADDING 0x80AA +ICAP_NEWWINDOWSIZE 0x80AB +ICAP_DOCUMENTTYPE 0x80AC +CAP_WINDOW 0x80AD +ICAP_BACKGROUNDADJUSTMODE 0x80AE +ICAP_BACKGROUNDADJUSTAPPLYTO 0x80AF +ICAP_BACKGROUNDADJUSTAGGRESSIVENESS 0x80B0 +ICAP_COLORBALANCEBLUE 0x80B1 +ICAP_COLORBALANCEGREEN 0x80B2 +ICAP_COLORBALANCERED 0x80B3 +CAP_WINDOWCAMERA 0x80B4 +ICAP_SKEWANGLE 0x80B5 +ICAP_MEDIATYPE 0x80B6 +CAP_SIDESDIFFERENT 0x80B7 +ICAP_ECDO 0x80B8 +ICAP_IMAGEEDGEFILLALLSIDES 0x80B9 +CAP_MULTIFEEDRESPONSE 0x80BA +ICAP_FRAMESANGLE 0x80BB +CAP_PRINTERDATE 0x80BC +CAP_PRINTERTIME 0x80BD +CAP_PRINTERFONTFORMAT 0x80BE +CAP_PATCHHEAD1 0x80BF +CAP_PATCHHEAD2 0x80C0 +CAP_PATCHHEAD3 0x80C1 +CAP_PATCHHEAD4 0x80C2 +ICAP_ECDOTREATASCOLOR 0x80C3 +CAP_BLANKPAGECONTENT 0x80C4 +CAP_IMAGEMERGE 0x80C5 +ICAP_STREAKREMOVALENABLED 0x80C6 +ICAP_STREAKREMOVALAGGRESSIVENESS 0x80C7 +// Reserved 0x80C8 - 0x80FF +CAP_IMAGESDIFFERENT 0x8100 +ICAP_PHYSICALHEIGHTADJUST 0x8101 +ICAP_COLORSHARPEN 0x8102 +ICAP_ECDOAGGRESSIVENESS 0x8103 +ICAP_HOLEFILLENABLED 0x8104 +CAP_ULTRASONICSENSORLEFTCENTER 0x8105 +CAP_ULTRASONICSENSORRIGHTCENTER 0x8106 +CAP_ULTRASONICSENSORZONEHEIGHT 0x8107 +ICAP_COLORBRIGHTNESSMODE 0x8108 +ICAP_COLORBALANCEMODE 0x8109 +ICAP_COLORBALANCEAUTOMATICAGGRESSIVENESS 0x810A +CAP_SIMULATING 0x810B +CAP_POWEROFFTIMEOUT 0x810C +CAP_INTELLIGENTDOCUMENTPROTECTION 0x810D +ICAP_FOREGROUNDBOLDNESSAGGRESSIVENESS 0x810E +ICAP_FOREGROUNDBOLDNESSMODE 0x810F +CAP_DUALSTACKINGENABLED 0x8110 +CAP_DUALSTACKINGLENGTHMODE 0x8111 +CAP_DUALSTACKINGLENGTH1 0x8112 +CAP_DUALSTACKINGLENGTH2 0x8113 +CAP_DUALSTACKINGMULTIFEED 0x8114 +CAP_DUALSTACKINGPATCHTRANSFER 0x8115 +CAP_DUALSTACKINGPATCHTYPE1 0x8116 +CAP_DUALSTACKINGPATCHTYPE2 0x8117 +CAP_DUALSTACKINGPATCHTYPE3 0x8118 +CAP_DUALSTACKINGPATCHTYPE4 0x8119 +CAP_DUALSTACKINGPATCHTYPE6 0x811A +CAP_DUALSTACKINGSTACK 0x811B +*/ + +/* +DAT_STATUSRAW 0x8001 +DAT_PCARD 0x8002 +DAT_COLORTABLEMAP 0x8003 +DAT_DEVICEINFO 0x8005 +DAT_AUTOCOLORLEARN 0x8006 +DAT_PROFILES 0x8007 +DAT_WINDOW 0x8008 +DAT_CUSTOMDSDATAGROUP 0x8009 +DAT_ECDO 0x800A +DAT_QUERYSUPPORT 0x800B +DAT_LOG 0x800C +DAT_UTC 0x800D +DAT_OCPBUTTONS 0x800E +*/ + +/* +OBS_STOPFEEDER 0x8001 +MSG_SETUPDS 0x8002 +MSG_DISABLEUI 0x8003 +MSG_ENABLEUI 0x8004 +MSG_GETSPECIAL 0x8005 +MSG_ENABLESCANNER 0x8006 +MSG_SAVEPROFILE 0x8008 // Deprecated TWAIN 10.x+ +MSG_DELETEPROFILE 0x8009 // Deprecated TWAIN 10.x+ +// Reserved 0x8007, 0x800A - 0x8010, 0x8013 - 0x8014 +MSG_ADDWINDOW 0x8011 +MSG_DELETEWINDOW 0x8012 +MSG_PROFILECREATE 0x8015 +MSG_PROFILEDELETE 0x8016 +MSG_PROFILESAVE 0x8017 +MSG_PROFILERENAME 0x8018 +MSG_PROFILERESTORE 0x8019 +MSG_PROFILEEXPORT 0x801A +MSG_PROFILEIMPORT 0x801B +MSG_PROFILESET 0x801C + + +*/ + +/* +TWRC_BUSY 0x8001 +TWRC_PCARD_CHECKSTATUS 0x8002 +TWRC_PCARD_FATAL 0x8003 +TWRC_PCARD_RETRYIMAGE 0x8004 +TWRC_PCARD_NOCARD 0x8005 +TWRC_FILTER_CONTINUE 0x8010 +*/ + +/* +This is a sample of the kind of data that comes back from + DG_IMAGE / DAT_EXTIMAGEINFO / MSG_GET +when asking for TWEI_HDR_XML... + +Results will vary depending on the kind of scanning session, +this example is from MSG_ENABLEDS... + + + + success + + + front + front + window_002 + 000001A.1 + false + 1 + 20 + none + success + C:\ProgramData\kds_kodak\kds_i2900\twain\log.20120622172913994\hippo\tmp\hip631C.tmp + bw + 324 + 1404 + 10296 + 13170 + 471925 + 200_dpi + 2197 + false + normal + -1 + + 324 + 1404 + 10296 + 13170 + 2197 + 0_degrees + + + + + + + 1 + 1 + 1 + + + +*/ + +#endif // KDSCUST_H diff --git a/Spec/Kodak/links.htm b/Spec/Kodak/links.htm new file mode 100644 index 0000000..8a2ab43 --- /dev/null +++ b/Spec/Kodak/links.htm @@ -0,0 +1,719 @@ + + + + + + + + +This file contains useful support links + + + + + + + + + + +
+ +

This file contains useful support links.

+ +

 

+ +

 

+ +

Kodak Document Imaging:  http://www.kodak.com/go/scanners

+ +

This is the scanner product page for Document Imaging.  To +get to the driver downloads and user publications, select your scanner. If your +scanner is not listed, click "Support Center" to find it.

+ +

 

+ +

 

+ +

TWAIN Working Group:  http://www.twain.org/

+ +

This is the main page for the TWAIN Working Group.  +Go here to get the latest Specifications and White Papers.  TWAIN also +puts out a newsletter detailing the latest information about the standard, and +provides a mailing list to monitor activity and to facilitate community +assistance on TWAIN issues.

+ +

 

+ +

You can also go here to access the TWAIN Forum, an online +discussion platform where you can exchange ideas with the TWAIN community.

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/readme.htm b/Spec/Kodak/readme.htm new file mode 100644 index 0000000..a736ce5 --- /dev/null +++ b/Spec/Kodak/readme.htm @@ -0,0 +1,241 @@ + + + + + +The contents of this directory provide information about the custom +features of the Kodak TWAIN driver + + + + + + + +
+ +

KODAK Directory

+ +

Readme File

+ +

02-August-2006

+ +

 

+ +

 

+ +

The contents of this directory provide information about +the custom features of the Kodak TWAIN driver.

+ +

 

+ +

GettingStarted.htm

+ +

Some hints for new application writers.  The +information here technically belongs in the FAQ, but we’re pulling it out to +help jumpstart the development process for someone who is new to the Kodak +Document Scanners, TWAIN or both.

+ +

 

+ +

links.htm

+ +

A list of links pointing to Kodak and TWAIN driver +support resources on the net.

+ +

 

+ +

faq.htm

+ +

A list of hints, help and Frequently Asked Questions +concerning the Kodak TWAIN driver; integrators are strongly encouraged to look +through this file when looking for information about how the driver works, how +to integrate it, and some of the configuration tweaks and tricks that can be +applied to help it work better in specific situations.

+ +

 

+ +

kdscust.h

+ +

This is the C/C++ header file containing (and describing) +all the custom TWAIN capabilities and operations supported by the driver. For +more detail see TWAIN_Features.htm.

+ +

 

+ +

debugging.htm

+ +

This describes the logging system for the Kodak TWAIN +driver, though it also discusses a couple other diagnostic tools.  This is +probably the most important document to read if you are attempting to diagnose +a problem using the driver.  Note that it can be used to analyze the +behavior of the application and the scanner too.

+ +

 

+ +

simulator.htm

+ +

The Kodak TWAIN driver supports a simulation mode that +allows integrators to test scanner models without a physical scanner.  +This document provides information on how to use the simulator.

+ +

 

+ +

TWAIN_DualStream.htm

+ +

This document is a bit of a mix between the current Kodak +DualStream functionality and a proposed Single Document Multiple Images +proposal for the TWAIN Working Group.

+ +

 

+ +

TWAIN_ExtImageInfo.htm

+ +

Applications maximize their flexibility when they collect +the meta-data associated with each image captured by the scanner.  For simple +applications DAT_IMAGEINFO is often enough information.  More complex +applications will want to use DAT_EXTIMAGEINFO.  This document goes into +some detail about how best to use the call, and what information it offers per +image.

+ +

 

+ +

TWAIN_FileSystem.htm

+ +

There’s a bit of source code in here to help uses who +need to negotiate the rear cameras separately from the front cameras (this most +often occurs when trying to set up simultaneous bitonal/color or +bitonal/grayscale scanning using the custom CAP_CAMERAENABLE capability).

+ +

 

+ +

TWAIN_ProgrammaticControl.htm

+ +

This document describes how all TWAIN and custom +capabilities work for each scanner.

+ +

 

+ +

TWAIN_ProgrammaticPrinting.htm

+ +

This document describes how to programmatically drive the +scanner printing functionality through the TWAIN interface, (as opposed to +doing it through the driver GUI).

+ +

 

+ +

TWAIN_ScannerIdentification.htm

+ +

In an ideal world an application should never have to +know the exact model number (save maybe to show the value to a user).  +This is our concession to reality.

+ +

 

+ +

TWAIN_Internationalization.htm

+ +

This section details the various ways that an application +or user can select the language used by the driver.

+ +

 

+ +
+ + + + diff --git a/Spec/Kodak/simulator.htm b/Spec/Kodak/simulator.htm new file mode 100644 index 0000000..b477343 --- /dev/null +++ b/Spec/Kodak/simulator.htm @@ -0,0 +1,1808 @@ + + + + + + + + +Kodak KDS TWAIN Driver + + + + + + + + + + + +
+ +

Kodak KDS TWAIN Driver

+ +

Simulator for Virtual Integration

+ +

21-June-2012

+ +

 

+ +

 

+ +

Contents

+ +

1.     Overview...................................................................................................................... +3

+ +

2.     Glossary +of Terms......................................................................................................... +4

+ +

3.     Simulate +Setting............................................................................................................. +5

+ +

3.1.      Version 2/3/4 TWAIN Drivers.................................................................................. +6

+ +

3.2.      Version 5+ TWAIN Drivers...................................................................................... +7

+ +

3.2.      Version 9.x+ +TWAIN Drivers................................................................................... +8

+ +

4.     RAMSCAN.TXT +File................................................................................................... +9

+ +

4.1.      Command +Format..................................................................................................... +10

+ +

4.2.      @check.................................................................................................................... +11

+ +

4.3.      @delay................................................................................................................... +13

+ +

4.4.      @image.................................................................................................................. +14

+ +

4.5.      @init....................................................................................................................... +16

+ +

4.6.      @jam...................................................................................................................... +17

+ +

4.7.      @multifeed.............................................................................................................. +18

+ +

4.8.      @nodata................................................................................................................. +19

+ +

4.9.      @patch................................................................................................................... +20

+ +

4.9.1.       @patch +#............................................................................................................ +21

+ +

4.9.2.       @patch toggle..................................................................................................... +22

+ +

4.10.        @repeat label count............................................................................................ +23

+ +

4.11.        @restart.............................................................................................................. +24

+ +

4.12.        @stop................................................................................................................. +25

+ +

 

+ +

 

+ +

 

+ +

1.   Overview

+ +

The session simulator mimics events that occur in a real +session with a Kodak Document Scanner.  It allows the logging system to +record the exact commands that would be sent to a physical scanner, and as a +result of this allows an application to get a good feeling for how a physical +scanner behaves; especially during the negotiation phase prior to scanning.

+ +

 

+ +

The simulator is appropriate as a tool to exercise +developing applications without a physical scanner, especially if the +application writer is interested in testing against several models.  Using +the simulator frees the programmer from the bulk of a physical scanner in the +early phases of development.  We always recommend full testing with a +physical scanner, but believe that the integration time will be shorter and the +process more smooth when the simulator is used.

+ +

 

+ +

The simulator also serves as a diagnostic tool.  It can +be used to precisely recreate specific conditions (like errors) that may be +hard to duplicate with a physical scanner.  When combined with the +debugging features of the driver it becomes possible to easily analyze most +situations.

+ +

 

+ +

 

+ +

2.   Glossary of Terms

+ +

Here are some terms used in the document.

+ +

 

+ +

            +A2O2 +              +- Family name for the i1400 scanners 

+ +

            +Gemini              +- Family name for the 500/900/923/990/55xx/75xx/95xx scanners

+ +

            +Viper                +- Family name for the 35xx/4500 scanners

+ +

            +Phoenix             +- Family name for the i6xx scanners

+ +

            +Inferno              +- Family name for the i7xx scanners

+ +

            +Prism                +- Family name for the i8xx scanners

+ +

            +Alien                + - Family name for the i2xx scanners

+ +

            +Mustang            - +Family name for the i30/i40/i50/i60 scanners

+ +

            +Fosters              +- Family name for the i1100 scanners  

+ +

            +Piranha              +- Family name for the i1200/i1300 scanners 

+ +

            +Wildfire             +- Family name for the i1800 scanners 

+ +

            +Panther             +- Family name for the i4000 scanners

+ +

            +Piranha2           - Family +name for the i2000 scanners  

+ +

            +Blaze                +- Family name for the i5000 scanners 

+ +

            +Rufous              +- Family name for the i900 scanners 

+ +

            +Falcon               +- Family name for the i2900 (FalconA4) and i3000 (FalconA3) scanners 

+ +

 

+ +

3.   Simulate Setting

+ +

 

+ +

3.1.                  +Version 2/3/4 +TWAIN Drivers

+ +

In the ramscan.txt file, set simulate +to the desired value (ex: simulate i280).

+ +

The simulator is activated by +going into the ramscan.txt file, and changing the simulate value to the full +model name of the desired scanner.  The default value is 0.  Valid +values are found in the ramscan.txt file.  Each driver is only intended to +support certain kinds of scanners.  The name of the TWAIN directory is a +good clue about what is supported.  For instance, if the directory path to +the TWAIN driver is %windir%\twain_32\kodak\kds_i800, then the supported scanners +are: i810, i820, i830 and i840.

+ +

 

+ +

 

+ +

3.2.                  +Version 5+ TWAIN +Drivers

+ +

In the const.ini file, under [dsIdentity], set simulate to the desired value (ex: +simulate i660).

+ +

The simulator is activated by +going into the const.ini file, and changing the simulate value to the model +name of the desired scanner.  The default value is 0.  Valid values +are found in the ramscan.txt file.  Each driver is only capable of +supporting certain kinds of scanners.  The name of the TWAIN directory is +a good clue about what is supported.  For instance, if the directory path +to the TWAIN driver is %windir%\twain_32\kodak\kds_i800, then the support +scanners are: i810, i820, i830 and i840.  The ramscan.txt file is the +final authority on what is supported in simulation mode.

+ +

 

+ +

 

+ +

3.3.                  +Version 9.x+ +TWAIN Drivers

+ +

In the const.ini file, under [Simulation], +set simulation to true to enable simulation. Set simmodel to the desired ADF scanner +model (ex: i2900).Set simflatbed +to the desired flatbed accessory (ex: i2000legal).

+ +

 

+ +

For example to simulate a FalconA3 +scanner with attached KODAK Legal Size Flatbed Accessory:

+ +

[Simulation]

+ +

simulation=true

+ +

simmodel=i3000

+ +

simflatbed=i2000legal

+ +

 

+ +

 

+ +

4.   RAMSCAN.TXT File

+ +

 

+ +

This file owns the configurations that describe the +supported scanners.  For instance, if a user wants to simulate an i260 +without a printer, they can go into this file, find the setting for the printer +accessory and turn it off.  The simulator will then run like an i260 that +has no printer.  By default the virtual scanners are simulated with all +available accessories.

+ +

 

+ +

The ramscan.txt is also able to simulate a wide range of +scanning behavior, which is accomplished via the @-commands at the end of the +file.  For example:

+ +

 

+ +

@init

+ +

@image

+ +

@image

+ +

@stop

+ +

 

+ +

This sequence initializes the simulator and allows two +‘images’ to be captured before ending the session.  The word ‘image’ isn’t +ideal, it actually corresponds to a side of a sheet of paper, so if this +particular sequence was used with dualstream settings +(simultaneous output of bitonal/color on the front +and rear) then we’d get four images in total from the two @image commands.

+ +

 

+ +

 

+ +

4.1.                  +Command Format

+ +

The format of any given command is +as follows:

+ +

 

+ +

      @command.platform arguments

+ +

 

+ +

Where

+ +

      @command +is the command to be issued.

+ +

      .platform +is an optional specifier for one of the following:

+ +

                  +Gemini, Viper, Prism, Alien

+ +

      arguments +are any data for the command

+ +

 

+ +

For example:

+ +

 

+ +

      +@image

+ +

      +@jam.Prism

+ +

@stop

+ +

 

+ +

The full list of available +commands follow:

+ +

 

+ +

 

+ +

4.2.                  +@check

+ +

This command generates an error +during a session.  Typically the value is dotted with the targeted command.  +If a dot isn’t specified, then the check is applied to any command.  +@check is platform dependent, meaning that the error codes have meaning for +particular platforms.  For instance, this is the list of jam conditions +for all the scanner platforms.

+ +

 

+ +

@check.ReadHeader.Gemini +F0 00 04 00 00 00 00 0A 00 00 00 +09 82 00

+ +

@check.ReadHeader.Viper +F0 00 04 00 00 00 00 0A 00 00 00 +09 3B 05

+ +

@check.ReadHeader.Prism +F0 00 04 00 00 00 00 0A 00 00 00 +09 3B 05

+ +

@check.ReadHeader.Alien +F0 00 04 00 00 00 00 0A 00 00 00 +09 3B 05

+ +

 

+ +

The underlined values are the only +ones that have any meaning for the simulator.  All numbers are +hexadecimal.  If necessary, an SRB status can be added as an extra number +at the end of the list to simulate errors from the SCSI/SBP2 Class +Drivers.  A list of these codes are wire/protocol specific, and can be +found in ASPI’s wnaspi.h file or SCSISCAN’s scsiscan.h file.  The check codes come from the SCSI +Interface Spec for each of the supported scanner models, usually they will be obtained +from a KDS.LOG.

+ +

 

+ +

@check has become increasingly +sophisticated as time has gone on.  Most users will not need this +additional behavior, but here it is anyway.

+ +

 

+ +

@check without a specifier is applied to any attempt to get an image (the +@image command) and is position sensitive in the simulation.  @check with +a specifier is used to target a specific scanner +command and is NOT position specific within the simulation.  We’ll use +examples to illustrate this.

+ +

 

+ +

; +Jam with one image in the scanner buffer

+ +

@init

+ +

@image

+ +

@jam

+ +

@image

+ +

@stop

+ +

 

+ +

; +Jam with one image in the scanner buffer

+ +

@init

+ +

@image

+ +

@check +F0 00 04 00 00 00 00 0A 00 00 00 +09 3B 05

+ +

@image

+ +

@stop

+ +

 

+ +

; +Jam with two images in the scanner buffer

+ +

@init

+ +

@image

+ +

@check.ReadHeader F0 00 04 00 00 00 00 0A 00 00 +00 09 3B 05

+ +

@image

+ +

@stop

+ +

 

+ +

Note that the third example will +throw its jam message before reading any images from the scanner.  If we +want to target a specific occurrence of a command, then we have to get somewhat +fancy.  The following example will give us the result we want.  We’ve +moved the check conditions to the top, since it doesn’t matter where they are +located.

+ +

 

+ +

; +Jam with two images in the scanner buffer

+ +

@init

+ +

@check.ReadHeader 00 00 00 00 00 +00 00 00 +00 00 00 +00 00 00

+ +

@check.ReadHeader F0 00 04 +00 00 00 00 0A 00 00 00 +09 3B 05

+ +

@image

+ +

@image

+ +

@stop

+ +

     

+ +

The simulator ignores any check +condition that is all zeros.  Here is a list of the current supported +commands that can be checked.

+ +

 

+ +

@check                                  +- @image command

+ +

@check.Enable                     +- Enable scanner

+ +

@check.GetWindow           +- SCSI Get Window

+ +

@check.SetWindow            +- SCSI Define Window

+ +

@check.ReadHeader           +- Gemini Read Header

+ +

@check.ReadImage             +- Read Image

+ +

@check.ReadLength           +- Viper Read Length

+ +

@check.ReadBitdepth        +- Viper Read Bitdepth

+ +

@check.ReadSide                +- Viper Read Side (not currently used)

+ +

@check.XX                           +- XX == scanner unique command, like SC for Scan Configuration

+ +

 

+ +

Not all commands are supported, +but many of them are.  Note that the text is case sensitive, and the +simulator isn’t very tolerate of whitespace, so only use single spaces to +separate items.

+ +

 

+ +

 

+ +

4.3.                  +@delay

+ +

Pauses the driver for the +specified number of milliseconds; for example:

+ +

 

+ +

              +@delay 1000

+ +

 

+ +

 

+ +

4.4.                  +@image

+ +

Generates or specifies an image to +the simulator.  This command comes in several forms:

+ +

 

+ +

       @image

+ +

@image 1280 1692  1 0 250 +c:\twain\bitonal.tif

+ +

@image  640  848 24 +6   0 c:\twain\color.jpg

+ +

@image 1280 1692 1 0 250 +c:\twain\bitonal.tif 640 848 24 6 0 c:\twain\color.jpg

+ +

 

+ +

The first form is the easiest to +use.  The simulator will generate an image meeting the following +characteristics of the negotiated session:  cropping, compression, +polarity (if appropriate) and pixel type.  The image is largely blank with +a horizontal line at the top and the bottom, and with a counting image number +in each of the four corners.  The line is always black.  The first +three digits of the number (reading left to right) should always be +red/green/blue if the image is in color.

+ +

 

+ +

The second and third forms show +how to use an image file from disk.  The arguments are, in order:

+ +

 

+ +

                +width                      +- in pixels

+ +

                +height                     +- in pixels

+ +

                +bitdepth                 +- 1=bitonal, 8=grayscale, 24=color

+ +

                +compression         - 0=none, 2=Group +31D, 4=Group 32D, 5=Group 4, 6=JPEG

+ +

                +offset                      +- byte offset to the raw image data

+ +

                +filename                 +- the full path to the image

+ +

 

+ +

      +The offset is always 0 for JPEG/JFIF images.  It corresponds to the StripByteOffset for TIFF images, and skips over the file +header, bitmap header, and color table (if any) for bitmap images.  Any +image format is permissible, provided that the data can be handled by the +simulator as a single block for data.  Stripped TIFF images are not +supported.  If for any reason the @image requested doesn’t match the image +values negotiated with the driver (for example, if the file is uncompressed, +but ICAP_COMPRESSION is TWCP_JPEG), then the simulator falls back to the first +form, discarding the file info.  The version 4+ drivers report the reason +for the failure in the KDS.LOG file (though it may be necessary to set Debug=1 +to get the information).

+ +

 

+ +

      +The third form is a combination of bitonal and color, +and can be used to provide two images for dualstream +scanning for i600/i800/i1800.  The order of the images in the @image does +not matter; the simulator will grab the appropriate one needed to match the +requirements of the CAP_CAMERAORDER capability.

+ +

 

+ +

Note that dualstream +for the 3590/4500/i30/i40/i200 scanners always comes from a single (or +grayscale) color image generated by the scanner.

+ +

 

+ +

One final note, for most of the +scanners it is possible to generate the input images used by the simulator in a +variety of ways: using image editing packages or scanning them in from other +scanner models.  For instance, it is possible to scan JPEG images on a +Kodak 4500 Scanner and use them in simulations for a Kodak i840 Scanner.  +This is not true for the Kodak i200 Scanners, these devices output image data +in YCC411 format, the simulator must receive the data in this same format to +perform properly.  Likewise the Kodak i600/i1800 Scanners output +uncompressed color in YCC444 format.  In both cases the best way to +generate the needed images is to capture data from an existing scanner.  +The Scanner Validation Tool (SVT) has a raw dump feature on the Dump tab (which +only appears if you have a Level-1 or higher License); it is also possible to +get this tab through the CONST.INI file, please contact Kodak for information +about how to do this.  This dump is capable of generating the needed +images along with a fragment of a ramscan.txt file to help set up the +simulation.

+ +

 

+ +

 

+ +

4.5.                  +@init

+ +

This has to be the first command +in any sequence of @-commands in the ramscan.txt file.  The simulator uses +it as the reset point so that it is possible to run multiple scanning sessions +without exiting from the application.

+ +

 

+ +

 

+ +

4.6.                  +@jam

+ +

Indicates that a paper jam check +condition is to be thrown before the next command is read, this command is +position sensitive, so the following two lists will throw the check condition +at different points in the simulation.

+ +

 

+ +

; +Jam with two images still in the scanner buffer.

+ +

@init

+ +

@jam

+ +

@image

+ +

@image

+ +

@stop

+ +

                            +

+ +

; +Jam with no images in the scanner buffer.

+ +

@init

+ +

@image

+ +

@image

+ +

@jam

+ +

@stop

+ +

 

+ +

 

+ +

4.7.                  +@multifeed

+ +

Indicates that a multifeed check condition is to be thrown before the next command +is read, this command is position sensitive, so the following two lists will +throw the check condition at different points in the simulation.  Note +that the inclusion of @multifeed will result in the +generation of the check condition no matter what the current settings are on +the TWAIN Multifeed tab.

+ +

 

+ +

; Multifeed with two images still in the scanner buffer.

+ +

@init

+ +

@multifeed

+ +

@image

+ +

@image

+ +

@stop

+ +

                            +

+ +

; Multifeed with no images in the scanner buffer.

+ +

@init

+ +

@jam

+ +

@image

+ +

@image

+ +

@multifeed

+ +

@stop

+ +

 

+ +

 

+ +

4.8.                  +@nodata

+ +

The 5000/7000/9000 scanners do not +support a clear buffer command, so the only way to guarantee that the buffers +are empty prior to scanning is to read out any images from the buffers and +discard them.  The i200 requires a test to make sure the camera is +homed.  And the i600/i1800 needs a way to wait until the elevator is +homed.  We use @nodata.Gemini or @nodata.Prism to consume these read image instruction so +that the @image commands are not accidentally included.

+ +

 

+ +

 

+ +

4.9.                  +@patch

+ +

The patch page command causes the +simulator to behave as if a patch has been seen by the scanner.

+ +

 

+ +

 

+ +

4.9.1.                     +@patch #

+ +

For the 5000/7000/900/i800 this +command causes the scanner to report the presence of a patch page (1 – +6).  Since the image address simulation isn’t very sophisticated, this +part of the simulation is most useful when trying to generate feature patches +that the application has to handle.

+ +

 

+ +

 

+ +

4.9.2.                     +@patch toggle

+ +

For the +3590/4500/i200/i600/i800/i1800 this command tells the simulator to toggle back +and forth between bitonal and grayscale/color output.

+ +

 

+ +

@init

+ +

@image

+ +

@patch toggle

+ +

@image

+ +

@stop

+ +

 

+ +

 

+ +

4.10.            +@repeat label +count

+ +

This command is only available for +Version 4+ of the TWAIN driver.  There are times when it is desirable to +repeat a sequence of commands many times.  The typical case is scanning +several hundred or several thousand images.  This command allows the +construction of a repeat loop.

+ +

 

+ +

@init

+ +

@:label

+ +

@image

+ +

@repeat label 5

+ +

@stop

+ +

     

+ +

This loop will generate five +@image commands to the simulator.  Note the use of the colon ( : ) before +“label” to mark the topmost point in the loop.  Repeat loops can be +nested.

+ +

 

+ +

 

+ +

4.11.            +@restart

+ +

This is the command that preceded +@repeat.  All it does is move the simulation reader back to the top of the +file.  Version 2/3 drivers can use it, newer ones should not.

+ +

 

+ +

 

+ +

4.12.            +@stop

+ +

This command indicates the End-Of-Job +condition (for 5000/7000/9000/i30/i40/i200/i600/i800/i1800) and the transport +timeout / disabled state for 3000/4000.  It must be at the end of any +sequence of @image commands.

+ +

 

+ +
+ + + +