iiZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
No part of this publication may be reproduced or used in any form, or by any electrical or mechanical means,
without permission in writing from Zebra. This includes electronic or mechanical means, such as photocopying,
recording, or information storage and retrieval systems. The material in this manual is subject to change
without notice.
The software is provided strictly on an “as is” basis. All software, including firmware, furnished to the user is on
a licensed basis. Zebra grants to the user a non-transferable and non-exclusive license to use each software
or firmware program delivered hereunder (licensed program). Except as noted below, such license may not be
assigned, sublicensed, or otherwise transferred by the user without prior written consent of Zebra. No right to
copy a licensed program in whole or in part is granted, except as permitted under copyright law. The user shall
not modify, merge, or incorporate any form or portion of a licensed program with other program material, create
a derivative work from a licensed program, or use a licensed program in a network without written permission
from Zebra. The user agrees to maintain Zebra’s copyright notice on the licensed programs delivered
hereunder, and to include the same on any authorized copies it makes, in whole or in part. The user agrees not
to decompile, disassemble, decode, or reverse engineer any licensed program delivered to the user or any
portion thereof.
Zebra reserves the right to make changes to any software or product to improve reliability, function, or design.
Zebra does not assume any product liability arising out of, or in connection with, the application or use of any
product, circuit, or application described herein.
No license is granted, either expressly or by implication, estoppel, or otherwise under any Zebra Technologies
Corporation, intellectual property rights. An implied license only exists for equipment, circuits, and subsystems
contained in Zebra products.
Warranty
For the complete Zebra hardware product warranty statement, go to:
http://www.zebra.com/warranty.
Revision History
Changes to the original guide are listed below:
ChangeDateDescription
Rev. A4/2012Initial Release
Rev. A4/2015Zebra Rebranding
Rev. A4/2019Updated:
- File directory on pg. 2-1
- Registry key on pg. 2-3
- Copyright statement on the last page.
TABLE OF CONTENTS
Warranty ......................................................................................................................................... ii
Revision History .............................................................................................................................. ii
About This Guide
Introduction ..................................................................................................................................... v
Chapter Descriptions ...................................................................................................................... v
Notational Conventions................................................................................................................... vi
Related Documents ........................................................................................................................ vi
Service Information ......................................................................................................................... vi
ivZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
ABOUT THIS GUIDE
Introduction
This guide describes the Zebra TWAIN driver for Windows which enables an imaging scanner to capture and
transfer images to a TWAIN-compliant application.
Chapter Descriptions
Topics covered in this guide are as follows:
•
Chapter 1, TWAIN DRIVER OVERVIEW provides a description of the Zebra TWAIN Driver for Windows.
•
Chapter 2, INSTALLATION & CONFIGURATION describes installation instructions and settings to configure
the Zebra Scanner TWAIN driver on a host computer.
Chapter 4, GRAPHICAL USER INTERFACE provides information about the TWAIN sample application.
viZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
Notational Conventions
The followingconventions are used in this document:
•
Italics are used to highlight chapters and sections in this and related documents.
•
Bold text is used to highlight parameter names and options.
•
bullets (•) indicate:
• Action items
• Lists of alternatives
• Lists of required steps that are not necessarily sequential
•
Sequential lists (e.g., those that describe step-by-step procedures) appear as numbered lists.
NOTE This symbol indicates something of special interest or importance to the reader. Failure to read the note
will not result in physical harm to the reader, equipment or data.
CAUTION This symbol indicates that if this information is ignored, the possibility of data or material damage may
occur.
WARN I N G ! This symbol indicates that if this information is ignored the possibility that serious personal
Related Documents
The latest version of this guide and all guides, are available at: http://www.zebra.com/support.
Service Information
If you have a problem using the equipment, contact your facility's technical or systems support. If there is a
problem with the equipment, they will contact the Zebra Global Customer Support Center at:
http://www.zebra.com/support.
When contacting Zebra support, please have the following information available:
•
Serial number of the unit
•
Model number or product name
injury may occur.
•
Software type and version number
Zebra responds to calls by e-mail, telephone or fax within the time limits set forth in service agreements.
If your problem cannot be solved by Zebra support, you may need to return your equipment for servicing and
will be given specific directions. Zebra is not responsible for any damages incurred during shipment if the
approved shipping container is not used. Shipping the units improperly can possibly void the warranty.
If you purchased your business product from a Zebra business partner, please contact that business partner
for support.
CHAPTER 1 TWAIN DRIVER OVERVIEW
Introduction
The Zebra TWAIN Driver for Windows enables an imaging scanner to capture and transfer images to a
TWAIN-compliant application. This driver conforms to portions of the TWAIN specification version 2.1 and
provides an interface for querying and setting TWAIN capabilities.
The Zebra TWAIN driver provides two interfaces:
•
A programmatic (non Graphical User Interface [GUI]) interface that supports capabilities described in the
TWAIN version 2.1 specification in addition to custom TWAIN capabilities specific to Zebra imaging
scanners.
•
A GUI that is accessible through TWAIN-compliant applications (see Figure 1-1).
Figure 1-1
For more information, visit www.twain.org
GUI for the Zebra TWAIN Driver
.
1 - 2ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
CHAPTER 2 INSTALLATION &
CONFIGURATION
Overview
This chapter describes installation instructions and settings to configure the Zebra Scanner TWAIN driver on a
host computer.
For custom installation instructions, refer to the Zebra Scanner SDK Developer's Guide
(p/n 72E-149784-xx).
NOTE TWAIN components are installed by default with the standard Scanner SDK installation. If a custom
Scanner SDK installation is performed, the TWAIN option must be selected to install the TWAIN driver
components.
After a successful installation of the Zebra scanner TWAIN components, the Zebra TWAIN data source
(TWAIN.ds) is located in one of the following folders:
•
32-bit version: %SystemRoot%\twain_32\Zebra
•
64-bit version: %SystemRoot%\twain_64\Zebra
The required Zebra core scanner drivers are located in the folder:
2 - 2ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
Configuration
Scanner Configuration Bar Codes
Scan the Set All Defaults bar code below to return all parameters to the scanner's default values. Refer to the
scanner's Product Reference Guide for default values.
Set All Defaults
USB SNAPI Communication
IMPORTANTA Zebra image-capable scanner must be configured in USB SNAPI communication mode to be
accessible through the Zebra Scanner TWAIN driver. Scan the USB SNAPI bar code below to
configure the scanner for usage with the Zebra TWAIN driver.
USB SNAPI with Imaging
Enabling Logging in the Zebra TWAIN Driver
The Zebra TWAIN driver provides two logging mechanisms to assist with troubleshooting.
•
Application event logging viewable through the Windows Event Viewer under Windows Logs ->
Application.
•
File logging.
To enable logging, follow these steps:
1.Using the Regedit utility, go to the registry key:
2.To enable Windows application event logging, change the value of EventViewer from "0" to "1".
3.To enable file logging, change the value of Enable from "0" to "1" and provide a valid file path as the value
of LogFile. Ensure that the application has write permission to the location provided.
4.Restart the application.
HKEY_LOCAL_MACHINE Registry Key
2 - 4ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
CHAPTER 3 PROGRAMMATIC TWAIN
INTERFACE
Overview
The TWAIN driver's programmatic (non-GUI) interface supports 34 capabilities from the TWAIN specification
version 2.1 in addition to 10 other custom capabilities that are available with Zebra imaging scanners.
For additional information on standard TWAIN capabilities, please visit www.twain.org
See Table 3-2 on page 3-4t for the custom capabilities specific to Zebra imaging scanners.
.
3 - 2ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
Zebra Scanner TWAIN Driver Supported Capabilities
The Zebra TWAIN driver supports the standard TWAIN capabilities (shown in Table 3-1) through the
programmatic (non-GUI) interface.
Table 3-1
Standard TWAIN CapabilityTy peSupported Values (default in bold text)
CAP_SUPPORTEDCAPSTWTY_UINT16lists the supported capabilities
ICAP_XFERMECHTWTY_UINT16
ICAP_PIXELFLAVORTWTY_UINT16
ICAP_COMPRESSIONTWTY_UINT16
ICAP_PHYSICALWIDTHTWTY_FIX321024.00
ICAP_PHYSICALHEIGHTTWTY_FIX321280.00
ICAP_MINIMUMHEIGHTTWTY_FIX32320.00
ICAP_MINIMUMWIDTHTWTY_FIX32256.00
ICAP_UNITSTWTY_UINT16
CAP_DEVICEONLINETWTY_BOOL
ICAP_BRIGHTNESSTWTY_FIX32Range: -1000.00 to 1000.00, step 1.00, default = 0.00
ICAP_PIXELTYPETWTY_UINT16TWPT_BW,
ICAP_BITDEPTHTWTY_UINT164,
Supported Standard TWAIN Capabilities
TWSX_NATIVE,
TWPF_CHOCOLATE
TWCP_NONE
TWUN_PIXELS
TRUE
, FALSE
8
TWSX_FILE, TWSX_MEMORY
, TWCP_JPEG
TWPT_GRAY
ICAP_SUPPORTEDSIZESTWTY_UINT16
ICAP_XNATIVERESOLUTIONTWTY_FIX32512.00
ICAP_YNATIVERESOLUTIONTWTY_FIX32640.00
ICAP_XRESOLUTIONTWTY_FIX32
ICAP_YRESOLUTIONTWTY_FIX32
CAP_XFERCOUNTTWTY_INT16-1
ICAP_IMAGEFILEFORMATTWTY_UINT16TWFF_TIFF,
ICAP_ROTATIONTWTY_FIX32
CAP_UICONTROLLABLETWTY_BOOL
CAP_ENABLEDSUIONLYTWTY_BOOL
ICAP_LAMPSTATETWTY_BOOL
ICAP_EXTIMAGEINFOTWTY_BOOLTRUE,
CAP_REACQUIREALLOWEDTWTY_BOOLTRUE,
CAP_POWERSUPPLYTWTY_UINT16
ICAP_BITORDERTWTY_UINT16TWBO_LSBFIRST,
TWSS_USLETTER
1024.00
1280.00
0.00
TRUE
TRUE
TRUE
TWPS_EXTERNAL
, 512.00, 256.00
, 640.00, 320.00
TWFF_BMP,
, 90.00, 180.00, 270.00
, FALSE
, FALSE
, FALSE
FALSE
FALSE
TWFF_JFIF
TWBO_MSBFIRST
PROGRAMMATIC TWAIN INTERFACE3 - 3
Table 3-1
Standard TWAIN CapabilityTy peSupported Values (default in bold text)
ICAP_PLANARCHUNKYTWTY_UINT16
CAP_SERIALNUMBERTWTY_STR32Serial number of imaging scanner
CAP_CUSTOMDSDATATWTY_BOOLTRUE,
ICAP_IMAGEFILTERTWTY_UINT16
ICAP_ORIENTATIONTWTY_UINT16
ICAP_JPEGQUALITYTWTY_UINT16Range: 0 to 100, step 1, default = 65
Supported Standard TWAIN Capabilities
TWPC_CHUNKY
FALSE
TWIF_NONE
TWIF_HIGHPASS
TWOR_ROT0
, TWIF_LOWPASS, TWIF_BANDPASS,
, TWPC_PLANAR
3 - 4ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
Table 3-2 below shows the custom TWAIN capabilities specific to Zebra imaging scanners which are available through the Zebra TWAIN driver's
programmatic (non-GUI) interface. See Advanced Settings on page 4-4 for descriptions of advanced capabilities. For additional information on features,
consult the specific Zebra imaging scanner's Product Reference Guide available at:
3 - 6ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
CHAPTER 4 GRAPHICAL USER INTERFACE
Overview
The TWAIN driver's GUI provides an alternate method to access the supported TWAIN capabilities.
4 - 2ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
TWAIN Sample Application
A TWAIN sample application is provided with the default TWAIN driver installation and can be used to
demonstrate the TWAIN driver GUI interface.
Figure 4-1
TWAIN Sample Application Screen
TWAIN Configuration Screen
From the TWAIN Sample Application screen, select ZebraScanner and click Connect to Data Source to
display the TWAIN Configuration screen (Figure 4-2).
Figure 4-2
TWAIN Configuration Screen
GRAPHICAL USER INTERFACE4 - 3
The TWAIN Configuration screen lists the supported capabilities with their current values. A user can change a
value by double clicking the capability. Capabilities that are grayed out cannot be changed and are read-only,
NOTE The ICAP_BRIGHTNESS and ICAP_JPEGQUALITY capabilities can only be set graphically through the
advanced settings (see Advanced Settings on page 4-4).
TWAIN Configuration screen:
•
Image File Path button: Allows the user to browse to a folder in which the scanned image file can be
saved.
•
Show UI box: If checked, the basic GUI screen described below displays when the Scan button is
clicked.
•
Scan: Click this button to initiate an image capture.
•
UI Only: Click this button to display the Basic GUI screen without initiating an image capture.
•
Cancel: Click this button to close the TWAIN Configuration screen.
Basic GUI Screen
From the TWAIN Configuration screen (Figure 4-2 on page 4-2), click UI Only to display the basic GUI Scan
Settings screen.
Figure 4-3
GUI Scan Settings screen:
•
•
•
•
•
•
•
Zebra TWAIN Driver GUI - Basic Screen
Scanner drop-down list: Shows available sources.
Resolution drop-down list: Shows supported resolution values, and determines the pixel size of the
captured image.
Bit-Depth drop-down list: Shows supported bit depth values.
Preview: Click this button to capture an image, and display it in the GUI.
OK/Scan: Click this button to capture an image, and transfer it to the calling application.
NOTE On this screen, the OK button is renamed Scan if the Show UI box is checked in Figure 4-2.
Cancel: Click this button to close the GUI screen.
Show Advanced Settings: Click this button to open the Advanced Settings sections of the GUI
4 - 4ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE
Advanced Settings
When you click Show Advanced Settings from the GUI Scan Settings screen, the Advanced Settings section
extends. This displays the basic GUI Scan Settings screen plus advanced setting options.
Figure 4-4
Advanced Settings screen:
•
•
•
•
•
•
Zebra TWAIN Driver GUI - Advanced Settings Screen
Image Count: Corresponds to the CAP_XFERCOUNT capability in the range of 1 to 25 for the number of
image transfers the application transfers throughout the current session.
Image Enhancement: Sets the imaging scanner's ability to automatically enhance an image through a
combination of edge sharpening and contrast enhancement. Off disables automatic enhancement; Low,
Medium, and High perform those levels of image enhancement.
Rotate Image: Sets the degree of rotation of the captured image - 0, 90, 180, 270.
Enable Illumination: Enables the illumination banks on the scan engine. Check the box to enable
Illumination Bank Control.
Illumination Bank Control: Determines the operation of the illumination banks. Full enables both banks;
Auto switches the illumination system from left to right; Left enables the left bank; Right enables the right
bank.
Enable Auto Exposure: Enables the imaging scanner to automatically determine the gain and exposure
settings to best capture an image. Checking this box also enables the Gain Exposure Priority setting. If
Enable Auto Exposure is unchecked, the Fixed Exposure and Fixed Gain settings will be enabled
allowing the user to manually set those values.
GRAPHICAL USER INTERFACE4 - 5
•
Gain Exposure Priority: Sets the scanner's gain/exposure priority when the Auto Exposure setting is
enabled - Autodetect, Low Gain or Low Exposure. Low Gain priority sets the scanner to favor longer
exposure time over higher gain to capture an image. Low Exposure priority sets the scanner to favor
higher gain over exposure for image capture. Autodetect sets the priority based on the scanner's
configuration. For example, if the scanner is mounted in a magnetic switch read enabled stand, it uses
Low Gain priority. Refer to the imaging scanner's Product Reference Guide for more information on this
setting.
•
Fixed Exposure: The manual exposure setting in the range of 5 to 5000.
•
Fixed Gain: The manual gain setting in the range of 1 to 100.
•
Brightness: Sets the relative brightness of the captured image in the range of -1000 to 1000.
•
Image Crop: Enables Image Crop Control. The Left, Right, Top and Bottom Pixel values determine the
rectangular sub-region of the full size captured image that will be displayed or transferred.
•
Left Pixel: Sets the left pixel column used to crop a captured image. This value ranges from 0 to
(Xresolution - 2) depending on the selected resolution (image size).
•
Right Pixel: Sets the right pixel column used to crop a captured image. This value ranges from 0 to
(Xresolution - 1) depending on the selected resolution (image size).
•
Top Pixel: Sets the top pixel row used to crop a captured image. This value ranges from 0 to (Yresolution
- 2) depending on the selected resolution (image size).
•
Bottom Pixel: Sets the bottom pixel row used to crop a captured image. This value ranges from 0 to
(Yresolution - 1) depending on the selected resolution (image size).
4 - 6ZEBRA SCANNER TWAIN DRIVER FOR WINDOWS PROGRAMMER’S GUIDE