Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, March 25, 2007 9:17:35 PM(UTC)

idda  
idda

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();
            }

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, March 28, 2007 12:38:35 AM(UTC)

Qasem Lubani  
Guest

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.099 seconds.