using (RasterCodecs codecs = new RasterCodecs()) { codecs.Options.RasterizeDocument.Load.XResolution = 300; codecs.Options.RasterizeDocument.Load.YResolution = 300; RasterImage image = codecs.Load(inputFile); using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Professional, false)) { ocrEngine.Startup(null, null, null, @"C:\LEADTOOLS 19\Bin\Common\OcrProfessionalRuntime64"); using (IOcrDocument document = ocrEngine.DocumentManager.CreateDocument()) { document.Pages.AddPage(image, null); document.Pages[0].Recognize(null); IOcrPageCharacters pageCharacters = document.Pages[0].GetRecognizedCharacters(); for (int i = 0; i < document.Pages[0].Zones.Count; i++) { IOcrZoneCharacters zoneCharacters = pageCharacters.FindZoneCharacters(i); if (zoneCharacters != null) { foreach (var ocrCharacter in zoneCharacters) { OcrCharacterPosition position; position = ocrCharacter.Position; if ((position & OcrCharacterPosition.EndOfLine) == OcrCharacterPosition.EndOfLine) { Console.Write(ocrCharacter.Code + "\n"); } else { Console.Write(ocrCharacter.Code); } } } } } } }
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
DWObject.OpenSource(); DWObject.IfShowUI = false; DWObject.IfDisableSourceAfterAcquire = true; DWObject.PixelType = EnumDWT_PixelType.TWPT_BW; //Black - White image : EnumDWT_PixelType.TWPT_BW, GRAY image: EnumDWT_PixelType.TWPT_GRAY, RGB image: EnumDWT_PixelType.TWPT_RGB DWObject.AcquireImage();
function BeginScan(){ DWObject.OpenSource(); DWObject.IfShowUI = false; //set without user interface DWObject.IfDisableSourceAfterAcquire = true; DWObject.AcquireImage(); } function DWObject_OnPostTransfer(){ DWObject.SaveAsBMP("C:\\temp.bmp",0); }
DWObject.SelectSource(); DWObject.OpenSource(); DWObject.IfShowUI = false; //Set Image Layout DWObject.Unit = EnumDWT_UnitType.TWUN_INCHES; DWObject.SetImageLayout(0, 0, 5, 5); DWObject.AcquireImage();
DWObject.OpenSourceManager(); for(i = 0, i<=DWObject.SourceCount - 1,i++){ if (DWObject.GetSourceNameItems(i) == "Specified device name") DWObject.SelectSourceByIndex (i); } //if can't find the specified source, it'll select default source DWObject.AcquireImage();
DWObject.IfShowUI = false; DWObject.IfDisableSourceAfterAcquire = true; DWObject.OpenSource(); DWObject.IfShowIndicator = false; DWObject.AcquireImage();
DWObject.SelectSource(); DWObject.OpenSource(); //Set XRESOLUTION current value. DWObject.Capability = 0x1118; //ICAP_XRESOLUTION DWObject.CapType = 5; //TWON_ONEVALUE DWObject.CapValue = 300; if (DWObject.CapSet == false){ alert( "Failed to set the x-resolution. " + DWObject.ErrorString); } //Set YRESOLUTION current value. DWObject.Capability = 0x1119; //ICAP_YRESOLUTION DWObject.CapType = 5; //TWON_ONEVALUE DWObject.CapValue = 200; if (DWObject.CapSet == false){ alert( "Failed to set the y-resolution." + DWObject.ErrorString); } DWObject.AcquireImage();
DWObject = document.getElementById("dwtcontrolContainer"); //dwtcontrolContainer is the id of the Dynamic Web TWAIN on the page (An object or an embed). function btnScan_onclick() { DWObject.SelectSource(); DWObject.OpenSource(); DWObject.AcquireImage(); } function btnUpload_onclick() { var strActionPage; var strHostIP; var CurrentPathName = unescape(location.pathname); // get current PathName in plain ASCII var CurrentPath = CurrentPathName.substring(0, CurrentPathName.lastIndexOf("/") + 1); strActionPage = CurrentPath + "SaveToFile.aspx"; //the ActionPage's file path strHostIP = "localhost"; //The host's IP or name DWObject.HTTPPort = 80; DWObject.HTTPUploadThroughPost(strHostIP,0,strActionPage,"imageData.tif"); if (DWObject.ErrorCode != 0) alert(DWObject.ErrorString); else //succeed alert("Image Uploaded successfully"); }
var iDocumentCounter =0; function BeginScan(){ DWObject.OpenSource(); DWObject.IfShowUI = false; DWObject.IfDisableSourceAfterAcquire = true; if(DWObject.Duplex != TWDX_NONE) DWObject.IfDuplexEnabled = true; //enable duplex DWObject.IfFeederEnabled = true; if (DWObject.IfFeederEnabled == true){ DWObject.XferCount = -1; if(DWObject.IfFeederLoaded == True) DWObject.AcquireImage(); } } function DWObject_OnPosttransfer(){ iDocumentCounter = iDocumentCounter + 1; if(DWObject.SaveAsBMP("C:\\Image\\" + iDocumentCounter + ".bmp", 0) == false) alert( DWObject.ErrorString); }
function btnUpload_onclick() { DWObject.HTTPPort = 80; DWObject.IfSSL = false; // if 80 is the port number of non-secure port /* DWObject.HTTPPort = 443; DWObject.IfSSL = true; // if 443 is the port number of secure port */ DWObject.HTTPUploadThroughPost("127.0.0.1", 0, "/SaveToFile.php", "imageData.jpg"); if (DWObject.ErrorCode != 0) alert(DWObject.ErrorString); else //succeed alert("Successful"); }
function Scan_Click(){ DWObject.AcquireImage(); } function DWObject_OnPostTransfer(){ DWObject.CloseSource(); DWObject.IfTiffMultiPage = true; DWObject.SaveAsTIFF("SaveAsTIFF.tif", 0); if (DWObject.ErrorCode != 0) alert (DWObject.ErrorString); else //succeed alert ("Successful"); }
function NextImage_Click(){ if (DWObject.HowManyImagesInBuffer == 0) alert ("There is no image in buffer"); DWObject.CurrentImageIndexInBuffer += 1; } 13.如何进行双面扫描? function DuplexScan_Click(){ DWObject.SelectSource(); DWObject.OpenSource(); DWObject.IfShowUI = false; DWObject.IfDuplexEnabled = true; //enable duplex DWObject.AcquireImage(); }
Dynamic Web TWAIN是一个专为Web应用程序设计的TWAIN扫描识别控件,本文给大家分享几个有关Dynamic Web TWAIN的常见问题,欢迎收藏!
慧都十四周年狂欢开启,Dynamic Web TWAIN终极让利7折特惠
限时一个月,马上咨询>>>
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
Public Class Form1 Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click If Dialog1.ShowDialog() Then If Dialog1.GetChooseType() = 1 Then AxEDOffice1.CreateNew("Word.Application") ElseIf Dialog1.GetChooseType() = 2 Then AxEDOffice1.CreateNew("Excel.Application") ElseIf Dialog1.GetChooseType() = 3 Then AxEDOffice1.CreateNew("PowerPoint.Application") ElseIf Dialog1.GetChooseType() = 4 Then AxEDOffice1.CreateNew("Visio.Application") ElseIf Dialog1.GetChooseType() = 5 Then AxEDOffice1.CreateNew("MSProject.Application") End If End If End Sub Private Sub btnOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpen.Click AxEDOffice1.OpenFileDialog() End Sub Private Sub btnSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveAs.Click AxEDOffice1.SaveFileDialog() End Sub Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click AxEDOffice1.CloseDoc() End Sub Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click AxEDOffice1.PrintDialog() End Sub Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreview.Click AxEDOffice1.PrintPreview() End Sub Private Sub btnToolbars_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnToolbars.Click If AxEDOffice1.Toolbars = True Then AxEDOffice1.Toolbars = False Else AxEDOffice1.Toolbars = True End If End Sub Private Sub btnAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbout.Click AxEDOffice1.AboutBox() End Sub End Class |
public void Open() { axEDOffice1.Open(sPath,“Excel.Application”); axEDOffice1.Open(sPath,“PowerPoint.Application”); axEDOffice1.Open(sPath,“Visio.Application”); axEDOffice1.Open(sPath,“MSProject.Application”); } |
Imports Microsoft.Office.Interop.Word Private Sub Automating_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handle Automating.Click Dim word = AxEDOffice1.GetApplication() word.Visible = True Dim doc As Document = AxEDOffice1.ActiveDocument() Dim range As Range = doc.Range range.InsertAfter(“Range1”+ vbCrLf) range.Collapse(WdCollapseDirection.wdCollapseEnd) doc.Bookmarks.Add(“MijnBookmark”,range) range.InsertAfter(“Range2”+ vbCrLf) Dim bookmark As Bookmark = doc。书签(1) range = bookmark.Range range.Text =“Bookmark”+ vbCrLf range.Font.Color = WdColor.wdColorBlue End Sub |
CAD.NET是一个在.NET环境中提供解决方案的库, 它支持AutoCAD®DWG,DXF,PLT及其它CAD格式。 | |
CADViewX一款能让应用程序 具有强大CAD图像浏览和打印 功能的图像处理工具。 | ABViewer是一款高质量的2D/3D文档查看器, 可提供专业的浏览、编辑和转换功能, 支持30多种光栅和矢量图形格式。 |
CAD EditorX提供易用 的API和大量的示例方便开发者快速集成。 | CAD VCL Enterprise是一个 高品质多功能且含源码的控件。 |
用于通过Internet、Intranet、 Sharepoint、Office 365 及其他在线 HTML5 启用技术查看DWG和其他CAD文件。 | CAD DLL是一个为开发者打造的 新版本CAD库,可在支持动态链接 库技术的语言中添加CAD功能到应用程序中。 |
首款专门用于LOB应用开发的JavaScript框架点击下载>>>
为了模糊技术和艺术之间的界限,Sandpit库使用JavaScript和Canvas 2D元素进行创意编程。
通过GitHub或NPM并内置在ECMAScript 6中,Sandpit仍然使用着一个可能会在1.0版本之前更改的API进行开发。“Sandpit的目标是规范和简化创建编码的过程,利用代码来做漂亮的东西,”文档介绍里提到。“不管是在2D还是3D中,通常都会绘制到Canvas元素中。”Sandpit使用dat.GUI(一个改变JavaScript中的变量的轻量级GUI)来管理设置。