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 : Wednesday, July 22, 2015 1:31:17 AM(UTC)

kfarza  
kfarza

Groups: Registered
Posts: 1


Hi,
Im trying de create an application using Leadtools twain fro scanning documents.

The application works fine with some scanners but i get an error with FUJITSU fj-6130 scanner

"2015-07-22 11:57:33.5982 ERROR Leadtools.RasterException: Invalid parameter passed
à Leadtools.Twain.TwainCapability.get_OneValueCapability()
à Automatic.Scan.UI.Custom.ScanForm._miFileAcquire_Click(Object sender, EventArgs e)
à System.Windows.Forms.Control.OnClick(EventArgs e)
à System.Windows.Forms.Button.OnClick(EventArgs e)
à System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.ButtonBase.WndProc(Message& m)
à System.Windows.Forms.Button.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)"

this is the code where the exception is detected :

" try
{
config.ConfigType = ConfigFileType.WindowsService;
_twainSession.AcquirePage += new EventHandler(_twain_AcquirePage);


//INST: Scan des images
//INST : Vérification si le scanner est branché ou non
isOnline = new TwainCapability();
isOnline = _twainSession.GetCapability(TwainCapabilityType.DeviceOnline, TwainGetCapabilityMode.GetValues);
_twainSession.EnableGetDeviceEvent = true;

//INST: Verfier si le scanner contient du papier ou non
feederLoaded = new TwainCapability();
feederLoaded = _twainSession.GetCapability(TwainCapabilityType.FeederLoaded, TwainGetCapabilityMode.GetValues);


online = (bool)isOnline.OneValueCapability.Value;
loaded = (bool)feederLoaded.OneValueCapability.Value;


if (online)
{
btnRestart.Enabled = true;
if (loaded)
{
_twainSession.Acquire(TwainUserInterfaceFlags.Show);
_sbMain.Text = "Opération terminée.";


}
else
{
MessageBox.Show(this, "Il n'y a pas de papier dans le scanner!");
_sbMain.Text = "Erreur d'acquisition!";
}
}
else
{
MessageBox.Show(this, "Le scanner n'est pas connecté!");
_sbMain.Text = "Erreur d'acquisition!";
}
//INST: Retrait de l'evenement acquire
_twainSession.AcquirePage -= new EventHandler(_twain_AcquirePage);

MessageBox.Show("Le nombre pages scannées est: " + _saveFilesCount.ToString());

Thread ProcessScannedThread = new Thread(() => SplitImages(tempFileNameTiff));
ProcessScannedThread.IsBackground = true;
ProcessScannedThread.Start();


}
catch (TwainException ex)
{
throw ex;
} "

Should i chage the driver of the scanner or change same code ?

Please HELP me

 

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, July 22, 2015 6:33:52 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


I sent you a reply regarding this issue in Ticket number 2015072210000239 . If you have questions or comments, please reply to that email.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
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-2019, Yet Another Forum.NET
This page was generated in 0.141 seconds.