Hitachi HT-4139-28 Instruction Manual

HT-4139-28/48 Scanner TWAIN Driver
Developer's Guide


1
Preface
Thank you very much for using our TWAIN Driver.
This manual explains the specification and the function of the triplet needed when the
TWAIN driver is controlled from the application.
Read this manual carefully to use the TWAIN Driver properly.

2
Notes
In this manual following shortened forms are used.
- Hitachi scanner TWAIN driver (Hereinafter “TWAIN driver”)
- User interface of Hitachi scanner TWAIN driver (Hereinafter “User interface of TWAIN
driver”)
Indication of non-Hitachi trademarks
Windows XP, Windows Vista,Windows7, Visual C++, and Visual Basic are registered
trademarks of Microsoft Corporation in the United States and other countries.
Feb 2008 (First edition)
July 2009 HT-4134 connected with same PC
Jan 2010 Patchcode function
Mar 2010 Add Ean128 BarCode
• It is strictly prohibited to reprint or copy part or all of this manual
without our permission.
• The content of this manual is subject to change without prior notice
due to improvement.

3
Read Prior to Operation
This manual does not describe about the TWAIN standard,
It is necessary to understand the TWAIN standard to develop / test application programs.
Read “HT-4139-28/48 Scanner TWAIN Driver User’s Guide” first.
This manual does not describe about the TWAIN driver user interface.
(1) How to scan
There are 3 ways to scan images with this driver.
1) Displaying the user interface of the TWAIN driver and setting parameter to scan images.
With this screen, multiple parameter setting can be saved in a parameter file.
2) Without displaying the user interface of the TWAIN driver, scan images using the
parameters set by 1).
3) Without displaying the user interface of the TWAIN driver, set Capabilities by a triplet
and scan images.
Please switch the parameter file referring to Chapter 2 when operating it by the method
of 2)
The application that can display TWAIN driver's user interface because it sets the
parameter in method of 3) is necessary.

4
(2)Stacker
There are Hitachi scanners that equip a dual stacker.
Stacker for sheet ejection will be selectable by using a custom triplet.
(3) Imprinting (Numbering)
Hitachi scanners support an imprinting function that can be used for scanning check.
Contents of Imprinting can be modified before printing by using a custom triplet.

5
Precautions for Use
Continuous scanning
If the application program does not support the continuous scanning, performance may
become lower than expectation.
If sheets are too thin, copy papers, with glue, or mixed sizes, multiple feeding error might
occur. Using options and/or the sheet check function, try to scan them correctly.
Scanned images
To confirm if the scanned data satisfy the level of customer’s accuracy and quality, check
the gradation and density of scanned images.
This TWAIN driver does not support pre-view function.
Scanned data
This device can detect sheet sizes and multiple feeding but it might fail to catch multiple
feeding depending on conditions.
Inspect all scanned image data after scanning sheets and make sure that all sheets are
scanned correctly.
Extra attention is required when check will not performed or sheets will be discarded.
Imprinting (Numbering)
The imprinting is conducted after scanning but in some cases there might be imprinting
without image depends on operation of the application program.
There might be imprinting on wrong sheet due to multiple feeding error, etc.
Compare the original sheet and scanned data and ensure there are no missing images.

6
Note for System Set up
Keep followings in your mind when you set up systems with the TWAIN driver.
When you use the driver first time, a dialog of “Precaution statement” will be displayed
without displaying the TWAIN driver user interface.
Understand the contents and check mark Agree to “Precaution statement” and click the
“OK” button. This dialog will not be shown later once you agree.(If you delete this program
and reset it later, you will see this dialog again.)

7
When you will version up a driver from a previous version that you have not agreed,
it will be displayed.
Default is set without function. Add needed functions for operation. And make sure they are
installed correctly.
Hitachi scanners can check scanning status with the multiple feeding error detection and
the imprinting function but it is not always perfect. Set up systems so that it can check if
images in sheets are the same as scanned ones.
Scanning without displaying the TWAIN driver user interface and you do not use the
parameter files, the sheet checking will not be performed except a device equips a
ultrasonic sensor
Scanning without displaying the TWAIN driver user interface and using the parameter files,
setting of Capabilities by the triplet will be ignored.
Items that can be set are shown in the table below.

8
No. Function Triplet
Set Capabilities
TWAIN User Interface
Or
Use parameter file
1 Standard size support support
2 Width support support
3 Height support support
4 Thickness no support
5 Scanning width no support
6
Sheet
setting
Unit support support
7 -Continuous scanning support support
8 Length check no support
9 Length check no support
10 Width check no support
11 Thickness check
(Transmitted light,
Roller displacement)
no Support(note1)
12 Thickness check
(Ultrasonic)
support(note2) support(note1)
13
Sheet
check
Skew check support support
14 Only surface side support support
15 Only back side no support
16 Surface + Back side support support
17 Multiple faces no support
18 Image check no support
19 Alternate process of
4-point detection
error
no support
20 Surface side barcode support support
21
Scannin
g image
setting
Back side barcode no support

9
No. Function Triplet
Set Capabilities
TWAIN User Interface
Or
Use parameter file
22 Image kind no support
23 Image setting Support
(note3) (note4)
support(note4)
24 Drop out Support support
25 Density(simple)Support support
26 Density(detail)No support
27 Resolution support(note5) support
28
Input
Expand definition
setting
no support
29 Rotation no support
30 Backgroud cropping specified size only support
31 Position correction no support
32 Skew correction no support
33 Gradation reverse no support
34 Output resolution
conversion
no support
35 Delete background no support
36
Edit
Bordering no support
37 Auto scanning no support
38 Ejection confirmation no support
39 Continuous feeding no support
40 Error processing no support
41 Scanning speed no support
42
Feedin
g
Hopper position no support
43 Imprint support(note6) support
44
Imprint゙
Erase imprint no support

10
(note1)Require scanner option
(note2)Require scanner option, default of ultrasonic sensor.
Disabled when [SCANOPTION]ULTRASONIC=NO of RxTwainMng.ini
(note 3)Color / gray require option. Some type of scanner does not support halftone.
(note 4)Not support half tone
(note 5)Not support for 240 DPI
(note 6)It is Only 1Place Printing. There is a limitation in the character that can be printed.

Contens
i
Contens
Preface···························································································································· 1
Notes······························································································································· 2
Read Prior to Operation ································································································· 3
Precautions for Use········································································································ 5
Note for System Set up·································································································· 6
Chapter 1. Application Development 1-1
1.1 Application Control································································································1-1
1.2 Event loop of application ··················································································1-2
1.3 Continuous Scanning························································································1-3
Chapter 2. Parameter Switching 2-1
2.1 Non-UI Mode Parameter Settings Dialog ····························································2-2
2.2 How to Start the TWAIN Default Setting Tool ·····················································2-3
2.3 File of Parameter Specification ············································································2-5
Chapter 3. Operation Triplets 3-1
3.1 List of Operation Triplets·······················································································3-1
3.2 Details of Operation Triplets ·················································································3-3
3.3 Data Structures ·····································································································3-3
3.4 Custom Triplets ·····································································································3-4
3.5 Details of Custom Triplets·····················································································3-5
Chapter 4. List of Functions 4-1
4.1 List of Supported Functions··················································································4-1
Appendix A-1
A-1 MSG_XFERREADY at Image Scanning ···················································· A-1
A-2 Error Message·································································································· A-2
A-3 Notes on File Output ······················································································· A-3
A-4 Notes on the Barcode ····················································································· A-4

1 Application Development
1-1
App
lication Develo
p
ment
1
Chapter 1. Application Development
When you develop an application program that controls a TWAIN scanner, it is necessary to understand
the TWAIN standard (TWAIN Release v1.9) fully.
1.1 Application Control
Followings should be prepared to start and control a session through the TWAIN application.
This TWAIN driver complies the TWAIN standard and consists of 7 protocol states.
State 1 - Pre-Session
State 2 - Source Manager Loaded
State 3 - Source Manager Open
State 4 - Source Open
State 5 - Source Enabled
State 6 - Transfer is Ready
State 7 - Transferring
Proceed application as follows.
Load the Source Manager and Get the DSM_Entry (State 1 to 2)
Open the Source Manager (State 2 to 3)
Select the Source (during State 3)
Open the Source (State 3 to 4)
Negotiate Capabilities with the Source (during State 4)
Request the Acquisition of Data from the Source (State 4 to 5)
Recognize that the Data Transfer is Ready (State 5 to 6)
Start and Perform the Transfer (State 6 to 7)
Conclude the Transfer (State 7 to 6 to 5)
Disconnect the TWAIN Session (State 5 to 1 in sequence)
Points to notice on control will be described from the next chapter.

1 Application Development
1-2
1.2 Event loop of application
This driver reports followings when it is required to get data from a source, depending on the status of a
scanner.
MSG_XFERREADY:Completion of data transfer preparation
MSG_CLOSEDSREQ:Require to disable a source user interface
Event loop of application should be able to handle the report, MSG_NULL、MSG_XFERREADY、
MSG_CLOSEDSREQ.
(Note)
However it is possible to process only MSG_NULL、MSG_XFERREADY by following A-1 in the
appendix of this manual but it is not recommended.

1 Application Development
1-3
App
lication Develo
p
ment
1
1.3 Continuous Scanning
This driver can get multiple images by continuous scanning both side scanning, or single side scanning. In
this case, keep issuing DG_IMAGE/DAT_IMAGE***XFER/MSG_GET until
TW_PENDINGXFERS.Count=0.
If you want to suspend transferring image, issue DG_CONTROL/DAT_PENDINGXFERS/MSG_RESET
first.
Issue CAP_AUTOFEED for continuous scanning and use a document feeder.
It is possible to scan sheets on the feeder by issuing
DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS multiple times but every time a stacker
moves downward.
If a stacker moves downward every time, it would cause degradation of process efficiency and skew. Also
it would be a cause of noise and injury.

1 Application Development
1-4

2. Parameter Switching
2-1
Parameter Switchin
g
2
Chapter 2. Parameter Switching
It is necessary to save a parameter file by the TWAIN driver user interface for parameter
switching.
There are 3 ways to switch parameter files.
(1) Use a mode parameter specification tool (without UI)
(2) Rewrite parameter specification file
(3) Use a custom triplet
Process of (1) and (2) is the same, switch parameters by writing in the parameter specification
file.
Switching by the parameter specification file is inevitably applied when you use this TWAIN
driver.
Refer to 2.5.1 for the way of (3).
Notes for using parameter files
- Changes of Capabilities (size, etc.) by the application will be invalid.
- Not scanning automatically by parameter setting.
- Setting of continuous scanning is specified by CAP_AUTOFEED.
- When other scanners are used or the scanner option is changed, the parameter file cannot
be used.
Notes when HT-4139 Image scanner and HT-4134 Image scanner are
- Process of (1)and(2) becomes common setting of HT-4139 and HT-4134.
When the scanner used is switched, it is necessary to set it again.

2. Parameter Switching
2-2
2.1 Non-UI Mode Parameter Settings Dialog
In the mode without TWAIN user interface, the TWAIN driver operates according to the specified
values. With this tool, however, you can work with the parameters where the settings are already
saved.
Starting this tool displays the Non-UI Mode Parameter Settings Dialog as shown in Figure 2.1.
Figure 2.1 Non-UI Mode Parameter Settings Dialog
Table 2.1 Settings and Functions of the Non-UI Mode Parameter Settings Dialog
No. Item Description
1 Setting Parameter
Name
Displays the parameter name used in the mode without TWAIN
user interface.
Note: At starting, the parameter name set currently is displayed.
2 Set Sets the parameter name specified in the Parameter Name field
can be used in the mode without TWAIN user interface.
3 Delete Settings Deletes the parameter name setting.
4 Delete Parameter
File
Deletes the parameter file.
5 Close Terminates the operation.
Changing the size and other settings from the application is disabled.
It is fixed that no automatic scanning is executed in the parameter setting.
Continuous input follows the CAP_AUTOFEED specification.

2. Parameter Switching
2-3
Parameter Switchin
g
2
2.2 How to Start the TWAIN Default Setting Tool
(1) When starting from the HT-4139 Image Scanner folder
• HT-4139 Image Scanner
1 Select the “HT-4139 ImageScanner
“folder.
Twain Defalt Parameter Setting
2 Double-click the “Twain Defalt Parameter
Setting” icon in the “HT-4139
ImageScanner” folder.
This starts the Non-UI Mode Parameter
Settings Tool.
Other manuals for HT-4139-28
2
This manual suits for next models
1
Table of contents
Other Hitachi Scanner manuals
Popular Scanner manuals by other brands

Fujitsu
Fujitsu ScanZen EK6 Consumable replacement and cleaning instructions

Panasonic
Panasonic KV-S7097 Safety guide

Lanier
Lanier Wide Format Color Scanner Specifications

Scan View
Scan View ScanmateF8+ Operator's manual

ZKTeco
ZKTeco K Series user manual

Brother
Brother ImageCenter ADS-1000w Specifications