If the FAQs below do not provide you with the information you
need, please visit our Capture, Transformation & VRS Products Knowledge Base to search for the information.
API Programming Issues
- How do I print Multi-Page
TIFF files with ImageControls?
Using ImageControls KPrnt control to print Multi-page TIFF files following the instructions below.
The source code shown here was written to take advantage of some
of the new features in Visual Basic 4.0 such as the 'With' statement.
Open a new Visual Basic project and add a Common Dialog control,
SSPanel control, KPrnt control to a form. Create a control array
of Command buttons as shown below.

In the Form's declaration section declare a couple of variables
for global use:
Dim g_FileName As String
Dim g_Counter As Integer
Open the Form QueryUnload event and enter the following code:
'***** Prevent exit of program if printer is busy
If KPrnt1.Busy = True Then
MsgBox "Cannot exit while printer is busy"
Cancel = True
End If
Open the Command1 Click event and add the following code:
Select Case Index
Case 0
With CommonDialog1
.DialogTitle = "Select a file to print"
.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly
.Filter = "TIFF (*.tif)|*.tif"
.CancelError = True
On Error Resume Next
.ShowOpen
'***** If Cancel is pressed then do nothing
If Err = 32755 Then
Exit Sub
End If
g_FileName = .filename
End With
SSPanel1.Caption = ""
KPrnt1.DeviceMethod = KPDEVICEMETHODBATCH
KPrnt1.Action = KPACTIONSTART
Case 1
KPrnt1.Action = KPACTIONSTOP
SSPanel1.Caption = "Action Stop initiated"
Case 2
Unload Me
End
End Select
Note the use of the 'With' statement above. Open the KPrnt1 BatchStart
event and initialize the page counter:
'***** Initialize the global page counter
g_Counter = 1
Finally, open the KPrnt1 PageStart event and enter the following
code:
KPrnt1.PSFileName = g_FileName
If g_Counter > KPrnt1.PSPageCount Then
KPrnt1.PSFileName = ""
SSPanel1.Caption = Str$(g_Counter - 1) & " Page(s)
printed"
Else
SSPanel1.Caption = "Page" & Str$(g_Counter)
KPrnt1.PSPage = g_Counter
End If
g_Counter = g_Counter + 1
DoEvents
When you run the program, you will first select a file to print.
The KPACTIONSTART is then initiated and images will be sent to
the printer until the last page in the file is printed.
- Why do I get the "Bad parameter in parameter list" error when resetting the board in ImageControls
2.x.
Here is a subroutine that will overcome this problem. Samples
are in both VB and V C++.
Visual Basic
Sub ReserveDevice()
On Error Goto errHandler
KScan1.Action = KSACTIONRESERVE
Exit Sub
errHandler:
If KScan1.DeviceReserved Then
KScan1.Action = KSACTIONUNRESERVE
End If
KScan1.Action = KSACTIONRESET
KScan1.Action = KSACTIONRESERVE
Resume Next
End Sub
Visual C++ simplified, of course
void ReserveDevice()
{
try
{
m_pkscanOcx->SetAction(KSACTIONRESERVE);
}
catch(...)
{
if(m_pkscanOcx->GetDeviceReserved)
m_pkscanOcx->SetAction(KSACTIONUNRESERVE);
m_pkscanOcx->SetAction(KSACTIONRESET);
m_pkscanOcx->SetAction(KSACTIONRESERVE);
}
}
Essentially, there is a small bug in ImageControls that requires
the call to the KSACTIONRESERVE Action and trapping the error
and calling the KSACTIONRESET and then KSACTIONRESERVE in that
order (before resetting, you need to check to make sure that
the device isn't already reserved). This sets some bit in the
drivers that allows the device to be reset.
- I can't get Auto Endorsing to
work with my Fujitsu 3099 scanner using ImageControls 3.0. What's
wrong?
Let's say you are using a Fujitsu 3099/A and Adrenaline 1700.
In order for AutoEndorse/Annotation to work, several properties must be set before starting the batch. Note that all
the necessary properties must be set or it will fail.
Using the following code in VC++ and VB5 you will be able to
Implement Auto Endorse and Auto Annotate.
C++
if ( VCKImgp.m_kimgpOcx.GetAutoEAEndorseCap() )
{
VCKImgp.m_kimgpOcx.SetAutoEAEndorse( true);
VCKImgp.m_kimgpOcx.SetAutoEATextPrefix( "Kofax");
VCKImgp.m_kimgpOcx.SetCounterIncMode( KICOUNTERINCONPAGE);
VCKImgp.m_kimgpOcx.SetCounterIncOnPage( 1); //Increment each
page
VCKImgp.m_kimgpOcx.SetCounterIncValue( 1); //Increment by
1
VCKImgp.m_kimgpOcx.SetCounterStartNumDigit( 6); //Number
of digits
}
VB
If frmAnalysis.KImgp1.AutoEAEndorseCap Then
frmAnalysis.KImgp1.AutoEAEndorse = True
frmAnalysis.KImgp1.AutoEATextPrefix = "Kofax"
frmAnalysis.KImgp1.CounterIncMode = KICOUNTERINCONPAGE
frmAnalysis.KImgp1.CounterIncOnPage = 1 'Increment each page
frmAnalysis!KImgp1.CounterIncValue = 1 'Increment by 1
frmAnalysis!KImgp1.CounterStartNumDigit = 6 'Number of digits
End If
If CounterIncMode was not set, it defaults to KICOUNTERINCOFF,
which may have been the cause of the problem. The Counter reset
mode can be enabled in a similar manner.
This code can be added to the VCDEMO or VBDEMO sample programs
in the StartJob() function to test the AutoEndorse feature.
It is not currently in the demo programs.
- I'm getting a 20039 error "Cannot
Display Image". Why?
This is because some GDI operation in DisplayImage failed.
Reasons for this include but are not limited to, image is too
large to fit in memory, palette errors. Some checks to check
include the color resolution, bit depth, etc.
Scanner Issues
Unfortunately, there is no way today to eliminate the delays
you are finding. Our current support for endorsing does not allow
us to 'seed' the endorser with a value that increments. We can
though send a string for each individual image to the scanner.
The act of sending the string to the scanner causes the scanner
to pause on each image.
We anticipate the next release of the Toolkit (ImageControls
3) will allow customers to endorse the way we do today (which
will allow you to have unique text strings per page, but can impact
performance), and will have support for a new auto endorsing mechanism
that will allow someone to download a text prefix that will remain
the same for each page followed by a counter value. The counter
value can be incremented based on several criteria which the developer
can specify ahead of time. The auto endorser feature should allow
scanners that support auto incrementing (like the Fujitsu &
Bell + Howell scanners) to endorse at rated speed. This sounds
like what you need.
In addition to the common list of black and white file formats
supported by ImageControls, ImageControls v2.0 provides support
for color and grayscale file formats. Support is provided for
JPEG, multi-bit TIFF, BMP and PCX color and grayscale file and
compression formats.
Color and grayscale are supported in the following controls:
- Scanning (software-based only): The ImageControls KScan control
provides support for black and white, grayscale and color scanning
when using SCSI scanners like the Fujitsu SP600c scanner. The
scanner must have an ISIS® driver available.
- Display: The ImageControls KView control provides support
for color and grayscale display, rotation, panning, scrolling
and scaling.
- Print: The ImageControls KPrnt control provides support for
color printers, as well as the ability to print color and grayscale
images on a black and white printer (thresholding).
All problems/behavior is common to both Ascent Capture v2.x
and ImageControls 2.1. The workaround is to configure M309x
EX scanners as M3097E (not M3097EX!), reload, and go off scanning.
Note that the CONTRAST setting on the Fujitsu scanners DOES
NOT require an IPC board.
Unfortunately we cannot do this with our drivers on these two
scanners. A B+H service technician can easily adjust the frame
size to align the scanner. Please call B+H for service.
- Why do some scanner models have Advanced Scanner Properties under the KScan control while others do not?
The KScan control supports a variety of scanner specific properties specifically designed for Bell+Howell, Fujitsu, Kodak, and Ricoh scanners.
This properties are only available with the EH-850/1700 controller. They are not available through any other Kofax controller or engine.
The EH-850/1700 use proprietary scanner drivers, while the scanners supported through the Adrenaline 450/650/650i, Adrenaline Image Processing Engine (AIPE) and VRS are controlled through the use of ISIS drivers. As a consequence, this support is only available through the Adrenaline EH-850/1700. Scanners supported through the Adrenaline 450/650/650i, Adrenaline Image Processing Engine (AIPE) and VirtualReScan (VRS) do not support this capability.
The ISIS drivers support a incredibly vast array of scanner make and models. Each scanner manufacturer implements how these scanners function, and features provided, in a different manner — this includes the different models by the same manufacturer. The developers of the ISIS drivers will implement their own dialog boxes for each and every scanner make and model. The developer of the driver may be Pixel Translations — the original developers of ISIS and the ISIS standard, the scanner manufacturer, or a third party. The variation of scanner specific-properties is so great that it is not practical to provide these properties that are available on each and every scanner model in the API for the KScan control.
As a consequence, these scanner specific properties are not directly available from the KScan API in Image Controls.
For these scanner-specific properties, a workaround is available through the Advanced Scanner Properties dialog box and the ISIS More dialog boxes which become available through it. The user can set the desired settings in these dialog boxes. Once the property has been set, and the user "OK"'s their way back through the dialog boxes, these settings will be saved as the default settings.
The KScan control has the ability to save and read INI files, saving the scanner settings being used including the settings in the ISIS More dialog boxes. These INI files can be used to save specific settings and call them back when needed.
Miscellaneous Issues
- Using VB5, the help system works oddly. When a project is loaded and a help file of one of
the Kofax controls is loaded, the Contents button opens the VB
Contents and the Search button opens the search dialog for VB,
not our controls. This behavior is not evident in VB4.
This is a VB5 bug, which can be fixed by installing VB5 service
pack 1 or the Visual Studio Service Pack 2.
In ImageControls 3.1, the control panel applets (KSMXXX.CPL
and KCMXXX.CPL) must be installed to your C:\winnt\system32
directory. These files no longer belong in the C:\imgctls\bin
directory because of path issues.
If you have trouble with these programs, please verify that
the .CPL files are in the right place.
- I get the message "Version of CTL3D32.DLL is designed for WinNT" after installing ImageControls in
my Win 95 system. Why?
We have an older version of CTL3D32.DLL for Win95 available
by contacting our support group. The file you need is part of
our patch 010 build and is dated 09-16-94.
We have identified the there are certain conditions that create
a memory leak. The results of this memory leak can manifest
it self in a gradual reduction of system memory, or may cause
systems error in the module imagstor.c. The patch file ahrt323ml.exe has been shown to correct this problem. This patch would apply
to runtime that are version 3.20, 3.22 and 3.23.
- For patch code detection in duplex mode, the ImageControls
3 Programmer's Guide and online help indicate, "If
a patch code is detected, the back side of the page is lost."
Is this true?
No. The statement in the documentation is incorrect and will
be removed for the next release.
- I have installed the Image Controls Run Time v3.20.04 and
when I try to run the VBDEM32P.EXE program, I get an "Unknown
Error" message and the demo does not come up. What can I
do?
Inadvertently the VBDEM32P.EXE application was compiled with
a newer version of the COMDLG32.OCX. Therefore, if a customer
does not have this newer version of COMDLG32.OCX on their computer,
the VBDEM32P.EXE fails to run. If you experience this problem,
you can download the newer COMDLG32.OCX from ftp://ftp.kofax.com/pub/KFHardware/comdlg32.ocx. Download
the file, open a DOS Window and rename the COMDLG32.OCX which
you have in your \\WINDOWS\SYSTEM directory (if you are using
Windows 95) or \\WINNT\SYSTEM32 directory (if you are using
Windows NT). Once you rename the original, copy the newer file
you downloaded from our site into the same directory.
Kofax ImageControls Toolkit Support
Kofax provides two types of support for the non-legacy Kofax ImageControls Toolkit product, described below.
Click here to place your Fee-Based Support order.
The Kofax ImageControls Toolkit developer support groups are skilled
in Visual Basic, Visual C++, and .NET languages. They have extensive
knowledge of programming practices and principles as well as extensive
knowledge of the Kofax ImageControls Toolkit and can assist developers
in building their custom imaging applications. Our engineers can
also point developers to source code samples on the Kofax Web
site.
For details regarding technical support available for all
Kofax products, please review the current Support
Overview & Options and Product
Support Eligibility Matrix Web pages.
|