<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Custom scanning button in InfoPath Form</title><link>https://www.infopathdev.com:443/forums/thread/65052.aspx</link><pubDate>Thu, 10 Mar 2011 08:52:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65052</guid><dc:creator>jaliya.udagedara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65052.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=65052</wfw:commentRss><description>Hi all,

I am a SharePoint developer living in sri lanka. I am having a problem with Scanning from a InfoPath form. My requirement is, I need to put 3 buttons which will trigger a scanner. I have wrote C# code for scanning using Windows Image Acquisition library. Now when I previewed the form and when I clicked the first scan button, it will scan the document in the scanner and it will attach the scanned document into first file attachment control. When I clicked the second scan button it will again scan and attach the scanned document to second file attachment control. So everything is working smoothly.
 
Then I published the form and uploaded the created .xsn file as a form template in SharePoint. I have created a form library and added the form template using Add from existing site content types. In Advanced settings I have selected Opening Documents in the Browser to Open in the browser. 
 
Now the problem comes. When the form is opening in the browser when I click the scan button there is a box keep displaying &amp;#39;Sending data to server&amp;#39; and scanning is not starting. When I set Open in the client application and open the form in InfoPath, it is working nicely again. So I am very confused with what&amp;#39;s happening around. 
 
Please guys, I need to resolve this issue. I really want to understand what&amp;#39;s happening. I thought of a lot of possibilities. My possible reasons are from the browser, form cannot communicate with the client machine ports. Because I am pretty sure, button event is firing even it is running in the browser. Only the scanning is not initializing. And I am using CommonDialogClass in WIA to show the scanning process. Sometimes CommonDialogClass cannot be used within the browser. Please, I am awaiting your professional advice. I think we should be able to trigger a scanner from a InfoPath button running on server. There is a lot of scanning plugins available, but they does not provide the facility i am looking for.
 
Please help me on this.
 
Happy Coding.
Regards,
Jaliya</description></item></channel></rss>