1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | < title data-filtered = "filtered" >Hello World</ title > < script type = "text/javascript" src = "Resources/dynamsoft.webtwain.initiate.js" data-filtered = "filtered" > </ script > < script type = "text/javascript" src = "Resources/dynamsoft.webtwain.config.js" data-filtered = "filtered" > </ script > < input type = "button" value = "Scan" onclick = "AcquireImage();" > < div id = "dwtcontrolContainer" > </ div > < script type = "text/javascript" data-filtered = "filtered" > var DWObject; function Dynamsoft_OnReady(){ DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer'); } function AcquireImage(){ if(DWObject) { DWObject.IfDisableSourceAfterAcquire = true; DWObject.SelectSource(); DWObject.OpenSource(); DWObject.AcquireImage(); } } </ script > |
1 | Dynamsoft.WebTwainEnv.Containers = [{ContainerId:'dwtcontrolContainer',Width:270,Height:350}]; |
1 | Dynamsoft.WebTwainEnv.Containers = [{ContainerId:'dwtcontrolContainer',Width: '50%',Height:350}]; |
1 2 3 4 5 6 | .DYNLogo { background:url(logo.gif) left top no-repeat; width:159px; height:39px; } |
1 2 3 4 5 6 7 8 9 10 11 12 | function OnWebTwainNotFoundOnWindowsCallback(ProductName, InstallerUrl, bHTML5, bIE, bSafari, bSSL, strIEVersion) { } /* This callback is triggered when Dynamic Web TWAIN is not installed on a PC running Windows */ function OnWebTwainNotFoundOnMacCallback(ProductName, InstallerUrl, bHTML5, bIE, bSafari, bSSL, strIEVersion) { } /* This callback is triggered when Dynamic Web TWAIN is not installed on a MAC */ function OnWebTwainOldPluginNotAllowedCallback(ProductName) { } /* This callback is triggered when Dynamic Web TWAIN is disabled by a non-IE browser */ function OnWebTwainNeedUpgradeCallback(ProductName, InstallerUrl, bHTML5, bMac, bIE, bSafari, bSSL, strIEVersion) { } /* This callback is triggered when Dynamic Web TWAIN installed on the machine is older than the //one on the server and upgrade is needed */ |
本次教程到此结束,希望能对Dynamic Web TWAIN的用户带来帮助,接下来还会有更多的相关教程,敬请期待!
试用、下载、了解更多产品信息请点击"咨询在线客服"
C#: oMailer.Message.Attachments.Add(@"C:\Temp\report.doc"); oMailer.Message.Attachments.Add(@"C:\Temp\john_doe_photo.jpg", "pic2.jpg","<12s4a8a8932r$5664i1t1$iy671661@yljfmkqjghxu>", "image/gif", null, NewAttachmentOptions.Inline, MailTransferEncoding.Base64); |
VB.NET: oMailer.Message.Attachments.Add("C:\Temp\report.doc") oMailer.Message.Attachments.Add("C:\Temp\prices_2005.xls", "prs2005.xls") oMailer.Message.Attachments.Add("C:\Temp\my_photo.jpg", "pic1.jpg","<12s4a8a8778c$5664i1b1$ir671781@tlffmdqjobxj>") oMailer.Message.Attachments.Add("C:\Temp\john_doe_photo.jpg", "pic2.jpg", "<12s4a8a8932r$5664i1t1$iy671661@yljfmkqjghxu>", "image/gif", Nothing, NewAttachmentOptions.Inline, MailTransferEncoding.Base64) |
C#: msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml; |
VB.NET: msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml |
C#: msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink; |
VB.NET: msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink |
C#: msg.Parser.Apply(); |
VB.NET: msg.Parser.Apply() |
C#: webBrowser1.DocumentText = msg.BodyHtmlText; |
VB.NET: webBrowser1.DocumentText = msg.BodyHtmlText |
C#: using System; using MailBee; using MailBee.Pop3Mail; |
VB.NET: Imports System Imports MailBee Imports MailBee.Pop3Mail |
C#: Pop3 pop = new Pop3(); try { pop.Connect("mail.domain.com"); pop.Login("login", "password"); Console.WriteLine("Successfully logged in."); } catch(MailBeePop3LoginNegativeResponseException e) { Console.WriteLine("POP3 server replied with a negative response at login."); } MailMessage msg = pop.DownloadEntireMessage(pop.InboxMessageCount); msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml; msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink; msg.Parser.Apply(); WebBrowser1.Text = msg.BodyHtmlText; try { pop.Disconnect(); Console.WriteLine("Disconnected successfully."); } catch { Console.WriteLine("Disconnection failed."); } |
VB.NET: Dim pop As Pop3 = New Pop3() Try pop.Connect("mail.domain.com") pop.Login("login", "password") Console.WriteLine("Successfully logged in.") Catch e As MailBeePop3LoginNegativeResponseException Console.WriteLine("POP3 server replied with a negative response at login.") End Try Dim msg As MailMessage = pop.DownloadEntireMessage(pop.InboxMessageCount) msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink msg.Parser.Apply() WebBrowser1.Text = msg.BodyHtmlText Try pop.Disconnect() Console.WriteLine("Disconnected successfully.") Catch Console.WriteLine("Disconnection failed.") End Try |