This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, March 25, 2007 9:17:35 PM(UTC)
Groups: Registered
Posts: 2
Hi,
I download LEADTOOLS Raster Imaging Pro for .Net EVAL 14.5 from your web site and try to use it. But I encounter a problem. I can not generate the image file. Can you help me? the following code is:
string buffer;
bool twainAvailable = TwainSession.IsAvailable(this);
if (!twainAvailable)
{
MessageBox.Show("Scaner is not available.");
return;
}
TwainSession twainSession = new TwainSession();
try
{
twainSession.Startup(this, "manufacturer", "productFamily", "version", "application");
TwainSourceInformation[] srcInfo = twainSession.SourceInformation;
for (int i = 0; i < srcInfo.Length; i++)
{
buffer = String.Format("Source Name = {0}\nProduct Family Name = {1}\nManufacturer Name = {2}\n",
srcInfo[i].Name, srcInfo[i].ProductFamily, srcInfo[i].Manufacturer);
if (srcInfo[i].Name.ToLower().IndexOf("fujitsu") == -1)
{
continue;
}
twainSession.SetAcquireSourceName(srcInfo[i].Name);
TwainTransferMechanism transferMode = TwainTransferMechanism.File;
RasterImageFormat format = RasterImageFormat.Bmp;
string baseFileName = @"c\test.jpg";
bool multiPage = false;
twainSession.FastTransferMechanism = transferMode;
twainSession.FastImageFormat = format;
twainSession.FastBitsPerPixel = 1;
twainSession.FastBufferSize = 0;
twainSession.FastUsePreferredBufferSize = true;
twainSession.EnableAcquireMultiPageEvent = false;
twainSession.AcquireFast(baseFileName, TwainFastUserInterfaceFlags.None, multiPage);
MessageBox.Show("Process Completed");
break;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
twainSession.Shutdown();
}
#2
Posted
:
Wednesday, March 28, 2007 12:38:35 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
If you run the C# Twain Capabilities and Fast Twain
Demo that is shipped with the toolkit, does it work?
Please note that although Fast Twain features work
in the evaluation edition, if you decide to purchase the toolkit they will only
work if you buy the Document Imaging toolkit since they are not part of the
Raster Imaging Pro toolkit.
The Raster Pro toolkit contains all Twain features
except the Fast Twain.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.