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 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
+ ++ +
+ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
Single Document Multiple +Images
+ +25-Aug-2004
+Updated: 15-Aug-2006
+ ++
+
Table of Contents
++ ++ ++ ICAP_PIXELTYPE and + DAT_FILESYSTEM Overview
+ + ++ DAT_FILESYSTEM vs. ICAP_PIXELTYPE
++ CAP_CAMERAENABLE vs. CAP_DUPLEXENABLED
+ + + +
+ +
+ + + +
+ +
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 |
+ front | +color or grayscale | +
/Camera_Color_Bottom |
+ rear | +color or grayscale | +
/Camera_Color_Both |
+ front and rear | +color or grayscale | +
/Camera_Bitonal_Top |
+ front | +bitonal | +
/Camera_Bitonal_Bottom |
+ rear | +bitonal | +
/Camera_Bitonal_Both |
+ front and rear | +bitonal | +
+
Using a camera that ends in '_Both' means future settings +will be applied to both the front and rear images.
++ + +
+
+
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 + |
+
+ +
+ +
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
+ ++ +
+ +
+ +
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
+ ++ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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 + |
+
+ +
+ +
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);
+ +}
+ ++ +
+ +
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:
+ ++ +
The +possible logs (LogType) are:
+ ++ +
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:
+ ++ +
+ +
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.
+ +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);
+ +...
+ +Kodak KDS TWAIN Driver
+ +Internationalization
+ +06-Jun-2012
+ +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.
+ ++ +
+ +
+ +
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).
+ ++ +
+ +
+ +
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).
+ ++ +
+ +
+ +
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
+ ++
+ ++ +
+ +
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.
+ ++ +
Kodak KDS TWAIN Driver
+ +TWAIN interface
+ +21-January-2013
+ ++ +
+ +
Contents
+ + + + + + + + + + + ++ +
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/i1100: TWPU_ADF.
+ ++Allowed: i55/i65: TWPU_ADF, TWPU_AUTO, TWPU_PLATEN
+ +Allowed: i200/i1200/i1300/i1400/i2000: TWPU_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.
+ ++ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
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
+ ++ +
+ +
+ +
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.
+ ++ +
+ +
+ +
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.
+ ++ +
+ +
+ +
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.
+ ++ +
+ +
+ +
+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.
+ ++ +
+ +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
+ ++ +
+ +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.
+ ++ +
+ +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)
+ ++ +
+ +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)
+ ++ +
+ +
+ +
+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”
+ ++ +
+ +
+ +
+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”
+ ++ +
+ +
+ +
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”
+ ++ +
+ +
+ +
+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”
+ ++ +
+
+ ++ +
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
+
++ +
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)
+ ++ +
+ +
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.
+ ++ +
+ +
TWAIN Driver Frequently Asked Questions (FAQ)
+ +03-July-2012
+ ++ +
Contents
+ ++ + + + + +
1.2 +Installing Previous Versions
+ + + + + ++ + + +
2.1 +Application Cannot Find Source
+ +2.2 +Real-Time Display Problem
+ +2.3 +Application Hangs When Trying To Scan
+ + + +2.5 System +cannot find KDS.DLL
+ + + + + + + +2.9 ICAP_UNITS +Causing Problem
+ +2.10 +CAP_PRINTERINDEX Persistence
+ ++ +
+ + + + + + + + + + + + + + + + + +
3.8 Force +Version (3590 only, 1.x firmware)
+ +3.9 Force +Resolution (3590 only, 1.x firmware)
+ + + +3.11 Width +and Length Alignment
+ + + +3.13 +Feeder Keep Alive (3000/4000 Series)
+ +3.14 +Length Detection and Frames (3000/4000 Series)
+ +3.15 +MSG_STOPFEEDER Operation
+ + + +3.17 +Multiple Modes (5xxx/7xxx/9xxx series)
+ + + + + +3.20 Color +Dropout: Enhanced Processing
+ + + +3.22 +Displaying Scanner Operator/Info Log
+ ++ +
+ + + + + + + + + +
4.3 Fix +for Overscan (3xxx Series)
+ +4.4 +DEFAULTS button does not affect the following...
+ + + +4.6 +Scanner Does Not Always Report Jams (5xxx/7xxx/9xxx)
+ ++ + + + + +
5.2 +Picture Elements(tm) ChromaTHR(tm), 3590/4500, 4.x +only
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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."
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ + + +
This section contains details on features +that developers can use to help write applications using this Source.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
Please reference the TWAIN_ExtImageInfo.htm +found in the KODAK directory.
+ ++ + + +
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.
+ ++ + + +
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
+ ++ +
+ + + +
This section reports known issues with the +Source.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++ +
+ + + +
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.
+ ++
+ ++ +
+ + + +
This section acknowledges code used by other +vendors in the development of this TWAIN driver.
+ ++ +
+ + + +
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
+ ++ +
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.
+ ++ +
KODAK Directory
+ +Readme File
+ +02-August-2006
+ ++ +
+ +
The contents of this directory provide information about +the custom features of the Kodak TWAIN driver.
+ ++ + + +
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.
+ ++ + + +
A list of links pointing to Kodak and TWAIN driver +support resources on the net.
+ ++ + + +
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.
+ ++ + + +
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.
+ ++ + + +
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.
+ ++ + + +
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.
+ ++ + + +
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.
+ ++ + + +
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.
+ ++ + + +
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).
+ ++ + + +
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.
+ ++ +
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
+ ++ +
+ +
+ +
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.
+ ++ +
+ +
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
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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
+ ++ +
+ +
+ +
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.
+ ++ +
+ +
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:
+ ++ +
+ +
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.
+ ++ +
+ +
Pauses the driver for the +specified number of milliseconds; for example:
+ ++ +
+@delay 1000
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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
+ ++ +
+ +
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
+ ++ +
+ +
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.
+ ++ +
+ +
The patch page command causes the +simulator to behave as if a patch has been seen by the scanner.
+ ++ +
+ +
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.
+ ++ +
+ +
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
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +
+ +
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.
+ ++ +