Recently a user requested additional information on the steps involved in making this change.
The screenshots below show the kinds of exceptions you may see in the LEAD C# OCR Twain Scanning Demo,
and below that you will find the steps to resolve.
AND / OR
Please do the following
Download and install the "TWAIN sample Data Source and Application" from Sourceforge.
TWAIN sampleszip file name (twainapp.win3264.zip)
Extract and run the x64 .msi in the - twainapp.win3264 - folder:
"twainapp.win64.installer.msi"
Now download the
FreeImage library from here.
In the downloaded file folder check to make sure the file version of FreeImage.dll is 3.18.0.0.
\.\.\.\FreeImage3180Win32Win64\FreeImage\Dist\x64\FreeImage.dll
Make a copy of the FreeImage.dll and place it here:
C:\Windows\twain_64\sample2
Rename the old file in this location from "FreeImagex64.dll" to "FreeImagex64_Old.dll".
Then rename the new file from "FreeImage.dll" to "FreeImagex64.dll.
Once all of this is in place, run the TWAIN_APP_CMD32.exe project located here:
C:\Program Files (x86)\TWAIN Working Group\TWAIN 2.3 App Sample
use the following commands
>> cdsm - to connect
>> lds - to get a list of available scanners
>> cds# - to open source
With this still running, open the LEAD OcrTwainScanningDemo located here:
C:\LEADTOOLS22\Examples\OCR\DotNet\OcrTwainScanningDemo
Be sure to update the framework
>> properties >> Application tab >> Set "Target framework" to .NET Framework 4.8
Run the OcrTwainScanning Demo project
Once open select a source by:
>> Twain >> Select Source... >> choose the "TWAIN2 FreeImage Software Scanner" virtual scanner
update the output location to where you would like the output file to be placed.
Pressed [Scan...] at the bottom left of the form.
The secondary page of the profile is displayed and when [Scan...] is selected the pdf is created, placed in the specified location, and should automatically open in Adobe if it is a pdf.
At this point, you should have the saved image from the scan in your output location.Chris Thompson
Developer Support Engineer
LEAD Technologies, Inc.