Guide for VB.NET
Scan Document into TIFF File
Core Document Formats
Additional Features

VB.NET Imaging - Scan Doc into TIFF in VB

How to Scan Document into TIFF File Through VB.NET Programming

VB.NET
Home > .NET Imaging SDK > VB.NET > Tutorial: Scan Document into TIFF
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

VB.NET Doc Scanning into TIFF Overview
It is a common task that captures single-page or multi-page document from a scanner in the document imaging world. Our VB.NET Web Document Viewer is designed to help you finish this task quickly and easily. Here is a detailed guide for scanning document into TIFF file using VB.NET code.
Related .net document control helps:
asp.net edit pdf image control: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
asp.net mvc display tiff: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net annotate pdf control: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
asp.net pdf viewer control free: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net sharepoint document viewer control: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
asp.net edit pdf page control: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net document viewer example: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS...
Capture is used to collect electronic files and information into a consistent structure for management. It is the first step for enterprise document management in VB.NET, which means obtaining document with a scanning client. This page will tell you how to capture and view document through scanning in VB.NET with the following sections. TIFF document is used for testing on this page and you can also use other document types for testing.
  • Create A WinForms Application in VB.NET
  • Modify User Interface of Application in VB.NET
  • Add Toolstrip Controls in VB.NET Application
  • Open A Multi-page Doc from File in VB.NET
  • Zoom and Scale Document Using VB Code
  • Save A Multi-paged Doc to File in VB.NET
  • Capture Doc from A Scanner in VB.NET Class
  • Choose A Scanner for Doc Capturing in VB.NET
How to Capture and View Document in VB.NET

Create A WinForms Application in VB.NET

This tutorial for capturing and viewing document in VB.NET applications starts from WinForms project creation using VB.NET language. Our .NET Imaging Web Document Viewer Control is compatible with Visual Studio 2005 or later versions, so please make sure that you have installed the correct Visual Studio version.

Modify User Interface of Application in VB.NET

Developers are able to design and customize user interface of this VB.NET application. You can follow steps below to complete this work.
  1. Add the following dlls to your VB.NET Windows project references.
    • RasterEdge.Imaging.TWAIN.dll
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.WebViewer.dll
  2. Drag a ToolStrip from your Visual Studio Toolbox to the top of the form generated after project creation.
  3. Drag a DocumentViewer control from RasterEdge DocImage tab in the Visual Studio Toolbox.
  4. Select Fill from the Dock property which is located in the property window of the DocumentViewer control.
  5. Drag an Acquisition Component (which is used to obtain document from scanner) with the same method of DocumentViewer control dragging.

Add Toolstrip Controls in VB.NET Application

Users are able to interact with the application by adding ToolStrip control. There are two steps for creating the ToolStrip.
  1. Choose ComboBox which is needed for choosing a Scanner control from the Add ToolStripButton pull-down menu.
  2. Click the button to locate six new commands to the existing controls.

Open A Multi-page Doc from File in VB.NET

It is easy to open a multi-page document in VB.NET. See details below:
  1. Go to your Visual Studio Toolbox and drag an OpenFileDialog to the form.
  2. Double click the open button and copy VB sample code to your project.
  3. Run your VB.NET project.

AutoZoom and Document Scaling Using VB Code

You just need to add two buttons to your project. The first button is used to set AutoZoom property to FitToWidth so as to make the whole document width visible to the Document Viewer. And the second button is used to set AutoZoom property to None and the Zoom property to 1.0. You can use VB.NET demo code below to configure the two buttons.
     Private Sub tsbFitToWidth_Click(sender As Object, e As EventArgs)
documentViewer1.ImageControl.AutoZoom =
RasterEdge.Imaging.WebControls.AutoZoomMode.FitToWidth
End Sub
Private Sub tsbFullSize_Click(sender As Object, e As EventArgs)
documentViewer1.ImageControl.AutoZoom =
RasterEdge.Imaging.WebControls.AutoZoomMode.None
documentViewer1.ImageControl.Zoom = 1.0
End Sub

Save A Multi-page Doc to File in VB.NET

Users are able to save a multi-page document into a file by dragging a SaveFileDialog to the form and copy the following VB sample code to your application.
     Private Sub tsbSave_Click(sender As Object, e As EventArgs)
If saveFileDialog1.ShowDialog(Me) = DialogResult.OK Then
documentViewer1.Save(saveFileDialog1.FileName, New TiffEncoder())
End If
End Sub

Capture Doc from A Scanner in VB.NET Class

.NET TWAIN Scanning Control is used to directly scan documents into the DocumentViewer control. Add the following VB.NET code to your project and you can initiate scanning.
     Private Sub acquisition1_ImageAcquired(sender As Object, e As AcquireEventArgs)
documentViewer1.Source.Add(RasterEdgeImage.FromBitmap(e.Image))
End Sub

Choose A Scanner for Doc Capturing in VB.NET

Users must populate the drop-down box with all the TWAIN drivers equipped on the current system so that users can select the device for document scanning. Please change the DropDownStyle property in the tcbChooseScanner control to DropDownList and use the VB.NET code below to choose the scanner needed for document capturing.
     Public Sub New()
InitializeComponent()
If acquisition1.SystemHasTwain Then
For Each dev As Device In acquisition1.Devices
tcbChooseScanner.Items.Add(dev.Identity.ProductName)
Next
If acquisition1.Devices.Count > 0 Then
tcbChooseScanner.SelectedItem = acquisition1.Devices.
[Default].Identity.ProductName
Else
tcbChooseScanner.Enabled = False
tsbScan.Enabled = False
End If
End If
End Sub


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com