Disclaimer of Warranties and Limitation of Liabilities
Nothing contained herein modifies or alters in
Contents
Developer’s Guide
About This Guide
Purpose xiv
Prerequisites xiv
RelateAbout Th416.02 022 108 553.3197 Tm0.09 0.4 1 scn-0.0001 Tw(Ab)v9
Contents
Example 32
The Automation From Excel Project 32
v
Contents
Visible Property 52
WebToolBarVisible Property 53
Width Property 53
Zoom Property 53
Application Object Methods 54
CreateImageViewerObject Method 54
FitTo Method 54
vi
Contents
viii
Contents
Image Selection 106
Annotation Selection 106
Example 107
Copy Image Project 107
Printing An Image 110
Image Printing Defined 110
Example 110
Print Image Project 111
Scanning an Image Using a Template 117
Template Scanning Defined 117
Example 118
Template Scan Project 120
Managing an Image File Using Thumbnails 128
Thumbnails Defined 128.9(a)-5(n)3.1( )-6(Project)-4.3( )-6( 120)5 apgmage P6[(P
ix
Contents
Invoking the Standard Annotation
Tool Palette 213
xi
About This Guide
Purpose
The Developer’s Guide describes the features of eiStream Imaging
for Windows® and provides software developers and MIS
professionals with the infor
xiv
About This Guide
xv
About Imaging
Imaging Preview
Imaging Preview is a lean version of the Imaging application. It lets users
3
About Imaging
7
Chapter 1
Image Thumbnail control — The Image Thumbnail control displays
and manages thumbnail renditions of individual image pages.
Which to Use: Command-line Interface, OLE, Automation, or
8
About Imaging
time. Set the appropriate properties or provide end users with drag-and-
drop capability so they can select
9
About Imaging
11
Chapter 1
The code in each sample project is highly organized, heavily
commented, and written using Hungarian notation. The sample
applications show you how to:
■ Create an application that is similar to the standard Imaging
application.
■ Develop an application that prepares separator pages for scanning
several multipage documents in the Imaging Flow application.
■ Perform template scanning.
■ Use the Image Thumbnail control to create folder-based contact
sheets.
■ Print a selected portion of an image.
■ Use General and Page properties to analyze image files in folders.
12
About Imaging
What Imaging Lets Yodyn9 (ed1ynb12aETD2s20.93e3.942 c2.6[.9d
13
Chapter 1
What Is Document Imaging?
14
2
Chapter 2
20
Adding Imaging Using Automation
Chapter 2
PageRange Object
The PageRange object represents a range of consecutive pages within an
ImageFile object — starting at the
22
Adding Imaging Using Automation
Embedded Server Mode
Imaging for Windows has several Imaging Automation properties and
methods to manipulate an embedded image document object.
23
Chapter 2
To create the Application and Image File Objects
1 Declare the object variables that will contain references to the
Application and Image File objects.
2 Use the Set statement and the CreateObject function of Visual
24
Adding Imaging Using Automation
One Page
29
Chapter 2
Then, the
36
Adding Imaging Using Automation
41
Chapter 3
Automation Lexicon
45
Automation Lexicon
Remarks The DisplayScaleAlgorithm value can be specified before or after an image is displayed. The
47
Chapter 3
Height Property
Description Sets or returns the distance, in pixels, between the top and bottom edge of the Application
object’s window. This is a read/write property.
Usage ApplicationObject.Height [=value]
Data Type Long.
Remarks This property must be set prior to opening the ImageFile object. It only takes effect if the
Width
48
Chapter 3
Remarks The ToolBarVisible property settings are:
Top Property
Description
52
Automation Lexicon
Remarks The Visible property settings are:
WebToolBarVisible Property
Description Sets or returns the visibility of this Application object’s web toolbar. This is a read/write
53
Automation Lexicon
Remarks ZoomOption settings are:
Setting Description
1 Best fit
2 Fit to width
3 Fit to height
4 Actual size
Help Method
Description Displays the Imaging online Help table of contents.
Usage ApplicationObject.Help
Quit Method
Description Closes all open objects and exits the application. The Application object is no longer active
or available.
Usage ApplicationObject.Quit
55
Chapter 3
ImageFile Object
An ImageFile object represents an image file. An ImageFile object can have
■ One Page object, representing the currentl
56
Automation Lexicon
57
Automation Lexicon
59
Chapter 3
AppendExistingPages Method
Description Appends specified page(s) to the end of the current ImageFile object. If the page(s) being
60
Automation Lexicon
65
Chapter 3
66
Automation Lexicon
Remarks The CompressionType property settings are:
Example 'This example returns this page's compression type.
x = Img.Pages(1).CompressionType
Height Property
Description Returns this page’s height in pixels. This is a read-only property.
Usage PageObject.Height
Data Type Long.
Example 'This example returns this page's height in pixels.
x = Img.Pages(1).Height
ImageResolutionX Property
Description Sets or returns this page’s horizontal resolution, in dots-per-inch. An error occurs when a
value less than 20 or greater than 1200 dpi is specified. This is a read/write property.
Usage PageObject.
71
Chapter 3
Automation Lexicon
73
Chapter 3
Page Object Methods
The following table lists
74
Automation Lexicon
Chapter 3
76
Chapter 3
78
Chapter 4
Visual Basic
82
Chapter 4
84
Chapter 4
86
Adding Imaging Using ActiveX Controls
Visual C++
There are two ways to access the Imaging ActiveX Controls on-line help
87
Chapter 4
Demonstration Projects
This section demonstrates
how to add a variety of
Imaging functions to your
applications.
A wide-ranging discussion of
every Imaging function is
beyond the scope of this
90
Adding Imaging Using ActiveX Controls
91
Chapter 4
92
Chapter 4
Aesthetics aside, the most important consideration when selecting the
color type is file size. The greater the number of data bits per pixel, the
96
Adding Imaging Using ActiveX Controls
The following compression types are available.
CCITT Group 3 (1d) Fax — Should be used to compress black-and-
97
Chapter 4
Example
Users of your application may want to change the compression type to
save disk space.
Scenario
98
Chapter 4
100
Chapter 4
The ShowPageProperties method returns an integer that indicates
102
Chapter 4
Example
106
Chapter 4
108
Adding Imaging Using ActiveX Controls
Printing an Image File
111
Adding Imaging Using ActiveX Controls
113
Chapter 4
114
Chapter 4
116
Adding Imaging Using ActiveX Controls
117
Adding Imaging Using ActiveX Controls
Template Scan Project
119
Chapter 4
120
Adding Imaging Using ActiveX Controls
121
Chapter 4
122
Adding Imaging Using ActiveX Controls
■ Click Scan Options to apply compression. The
mnuCompressionOptions_Click() event in the
Main
123
Chapter 4
■ Click Select Scanner to select the scanner you want to use. The
mnuSelectScanner_Click() event in the
124
Chapter 4
Thumbnail Sorter Project
The Thumbnail Sorter project demonstrates using thumbnails to manage
an image file. Specifically, it allows you to:
128
Chapter 4
■ Sets the EnableDragDrop property of the Image Thumbnail
130
Chapter 4
Adding Imaging Using ActiveX Controls
■ Invokes the DeletePages method of the Image Admin control,
passing to it the:
− Number of the page to delete (from lngInsertPage).
− 1 (which specifies the number of pages to delete).
The
133
Chapter 4
134
Adding Imaging Using ActiveX Controls
135
Adding Imaging Using ActiveX Controls
■ Invokes the DeleteThumbs method of the Image Thumbnail
control, passing to it the:
− Number of the page to delete (from lngInsertPage).
− 1 (which specifies the number of pages to delete).
The DeleteThumbs method refreshes the control without the
unwanted page.
137
Chapter 4
Adding Imaging Using ActiveX Controls
139
Adding Imaging Using ActiveX Controls
Chapter 4
Unloading a Multipage Image File
The Unload demonstration project shows how to save the individual
pages of a multipage image file as a series of single-page files; in effect,
extracting — or unloading — the pages of a multipage image file. Before
walking through the demonstration proj
142
Chapter 4
144
Chapter 4
146
5
Developing Client/Server Applications
Chapter 5
160
Developing Client/Server Applications
The following sections explain each server option setting and related
property in detail.
File Location for Document Pages
(FileStgLoc1x Property)
When your program saves a server document page, it may have to create a
161
Chapter 5
Admin control. Each of these methods creates a new image file with a
162
Chapter 5
164
Chapter 5
Once users select the desired directory or folder, the area below the
Look in box lists the files or documents contained within it, as illustrated
in the following figure.
When users select the desired file or document and then click
168
Developing Client/Server Applications
171
Chapter 5
Once users select the desired direct
172
Chapter 5
You can also bypass the dialog box and simply pass the user name and
password as parameters to the LoginToServer method, most likely in
response to a user completing and closing a logon dialog box of your
own design.
174
Developing Client/Server Applications
Chapter 5
Annotations Defined
The Image Edit and Image Annotation Tool Button controls provide
several ways to add annotation functions to your image-enabled
applications. Using them you can:
■ Create an annotation tool palette of your own design.
■ Invoke a single method that displays a fully-functional, standard
annotation tool palette to your users.
■ Implement custom annotations programmatically.
The method you choose depends on the annotation 0.g 48e7(m)ta0 depend1cendl4 b(ancenh2no)5.6
178
Chapter 5
Users can save annotations separately
180
Developing Client/Server Applications
Image Edit Control
181
Chapter 5
182
Developing Client/Server Applications
183
Developing Client/Server Applications
187
Chapter 5
frm1xCDFD — Enables users to query an Imaging 1.x document
volume for documents by location, using the following hierarchy:
Cabinet\Drawer\Folder\Document
frm1xQuery — Enables users to query an Imaging 1.x document
volume for documents by name, creation date, modification date, or
keyword.
188
Developing Client/Server Applications
Developing Client/Server Applications
object variable into the Document Manager combo box
(cboDocManager).
The procedure ends the query by setting objResults to Nothing and
by invoking the ImgQueryEnd method. Both actions free system
resources associated with the query.
The procedure wraps up its work by:
■ Showing the 1.x Cabinet\Drawer\Folder\Document window.
■ Displaying the number of document manager databases found.
■ Giving focus to the Document Manager combo box.
195
Chapter 5
Private Sub Form_Load()
Dim objResults As Object
196
Developing Client/Server Applications
On the 1.x Cabinet\Drawer\Folder\Document window, click the
desired cabinet in the Cabinets combo box. The
cboCabinet_Click()
199
Chapter 5
Private Sub cboCabinet_Click()
Dim objResults As Object
Dim strSinglePlural As String
Dim vntItem As Variant
.
.
.
mstrDocManager = cboDocManager.Text
strD,TJanager = ,TJatr.
.
200
Developing Client/Server Applications
Chapter 5
Private Sub cboDrawer_Click()
Dim objResults As Object
Dim strSinglePlural As String
Dim vntItem As Variant
.
.
.
mstrDocManager = cboDocManager.Text
mstrCabinet = cboCabinet.Text
mstrDrawer = cboDrawer.Text
'----------------------------------------------------------
202
Developing Client/Server Applications
On the 1.x Cabinet\Drawer\Folder\Document
203
Developing Client/Server Applications
205
Chapter 5
The procedure wraps up its work by:
■ Showing the 1.x Query window.
■ Displaying the number of document manager databases found.
■ Giving focus to the
206
Chapter 5
On the 1.x Query window, click the desired document manager
database in the Document Managers combo box. The
cboDocManager_Click()
208
Chapter 5
Private Sub cmdFind_Click()
Dim objResults As Object
Dim vntItem As Variant
Dim strConvertedDate As String
lstResults.Clear
'------------------------------------------------------------
' Perform a query; store Doc names in the lstResults listbox.
'------------------------------------------------------------
If optQuery(0).Value = True Then 'Query by Document
mstrQuery = "finddocs document " & _
cboName.List(cboName.ListIndex) & " " & txtName.Text
ElseIf optQuery(1).Value = True Then 'Query by Date
strConvertedDate = ImgAdmin1.ConvertDate(txtDate.Text)
mstrQuery = "finddocs " & _
cboDateName.List(cboDateName.ListIndex) & " " & _
cboDate.List(cboDate.ListIndex) & " " & strConvertedDate
ElseIf optQuery(2).Value = True Then 'Query by Keyword
mstrQuery = "finddocs keyword " & _
cboKeyword.List(cboKeyword.ListIndex) & " " & txtKeyword.Text
End If
ImgAdmin1.ImgQuery Mid(mstrDocManager, 9), mstrQuery, objResults
For Each vntItem In objResults
If vntItem <> "" Then
lstResults.AddItem vntItem
End If
Next
'----------------------------------------------------------
' End the query.
'----------------------------------------------------------
Set objResults = Nothing
ImgAdmin1.ImgQueryEnd
'----------------------------------------------------------
' Display the number of documents found.
'----------------------------------------------------------
If lstResults.ListCount = 0 Then
lblResults.Caption = SELECT_NONE
ElseIf lstResults.ListCount = 1 Then
lblResults.Caption = SELECT_SINGULAR
Else
lblResults.Caption = SELECT_PLURAL1 & lstResults.ListCount &
SELECT_PLURAL2
End If
End Sub
210
A
Imaging ActiveX Sample Applications
This appendix describes the Imaging ActiveX sample applications that
are available on the media on which your software was distributed.
In This Appendix
Overview ................................................................................... 216
Appendix A
Overview
This section introduces you The Imaging ActiveX sample applications are relatively large Visual Basic
to the Imaging ActiveX projects that demonstrate how to use the Imaging ActiveX controls to
sample applications.
build comprehensive and useful, image-enabled applications.
It is beyond the scope of this appendix to walk you through each and
every application. eiStream WMS, Inc. suggests that you run each one
and analyze its code to determine whether you can use it:
■ Directly in your applications, or
■ As a guide to writing your own, related code.
Requirements
With the exception of the sample application, to compile and run the
Imaging ActiveX sample applications, you must use:
■ Microsoft Visual Basic 6.0.
■ Imaging for Windows.
To compile and run the sample application, you must use:
■ Microsoft Visual Basic 6.0 with Service Pack 3 or later.
■
216
Imaging ActiveX Sample Applications
The tracker consists of two functions:
219
Appendix A
In addition to the general, summary, and page property values, the
220
Appendix B
224
Imaging ActiveX Tips and Tricks
images appear in gray scale. Color images continue to appear in color
using this setting.
Catch errors properly when working with the
ShowFileDialog method
When invoked, the
225
Appendix B
228
Imaging ActiveX Tips and Tricks
229
Imaging ActiveX Tips and Tricks
entire image file, you must apply the BurnInAnnotations
231