Skip to main content

Microsoft Silverlight

Answered Question Silverlight and Scanning (Via TWAIN using Java Applet?)RSS Feed

(0)

kd100
kd100

Member

Member

0 points

2 Posts

Silverlight and Scanning (Via TWAIN using Java Applet?)

I am creating a Silverlight application that needs to communicate with a scanner (using TWAIN drivers).  I know Silverlight cannot do this directly, and I will need to use Java to interact with the scanner.  I don't want to use ActiveX because I need it to run on Macs and Linux machines.

So my question is, can I get a java applet to pass a scanned file to a Silverlight application?  Is this done using web services? javascript? Can anyone confirm that this is is possible and maybe point me at some information regarding how it could be done?

purplechap
purplechap

Member

Member

14 points

2 Posts

Re: Silverlight and Scanning (Via TWAIN using Java Applet?)

The Silverlight app can use WebClient to download the file. This is asynchronous. System.Net.WebClient wc = new System.Net.WebClient(); wc.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(wc_OpenReadCompleted); wc.OpenReadAsync(new Uri("http://localhost/filename.xxx")); void wc_OpenReadCompleted(object sender, System.Net.OpenReadCompletedEventArgs e) { // e.Result contains a Stream with the downloaded file. e.Result }

sl.ayer
sl.ayer

Participant

Participant

848 points

162 Posts

Answered Question

Re: Silverlight and Scanning (Via TWAIN using Java Applet?)

You might be able to pass data from Java applet to silverlight app using javascript as a bridge, but why go to such trouble? Why not just implement it all in Java?

kd100
kd100

Member

Member

0 points

2 Posts

Re: Silverlight and Scanning (Via TWAIN using Java Applet?)

Basically because our company doesn't have any java programmers, just .NET developers.  We were hoping to contract someone to do the scanning part in java. The scanning functionality is only a fraction of what our web application needs to do.

Anyway, I guess using javascript as a bridge sounds like an option.  I guess we just have to expose a method in our Silverlight application as Scriptable.

Kkou
Kkou

Member

Member

2 points

3 Posts

Re: Silverlight and Scanning (Via TWAIN using Java Applet?)

I also have this kind of problem.

I have a task to develop a java application using the driver twain.

I want someone to help me.

How can I do this!

If someone see this, please send me a email at myskynim@yahoo.com.

Thankyou!

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities