VB.NET: Recognize, Process Forms on Document

How to recognize, process Forms on document image using VB.NET
Yiigo provides .NET forms recognition & processing support included in Yiigo.Image for .NET, which can be easily added to your document imaging applications with fully-automated, dynamic, and feature-packed forms recognition & processing functionalities. Find more Forms information on Yiigo.Imaging for .NET Forms Plugin.
Yiigo.Imaging for .NET Forms Plugin has those following functionalities:
  • Full page and zonal forms recognition
  • Extract text detail from scanned forms
  • Cleanup forms with deskew, despeckle, shading removal, line removal, etc.
  • Define OMR, ICR and OMR text and image on each form
  • Store the results in a database
For VB.NET developers, Yiigo provides online tutorials to recognize, process forms on document & images using Yiigo.Image for .NET and .NET Forms Plugin in details. Find more Forms recognition and processing tutorials on Forms Support for Visual C#.NET, Web Imaging Viewer Forms Support and Forms Recognition in .NET Winforms.
Recognize & Process Forms with VB.NET Sample Code

Requirements

Before starting forms recognition and processing in VB.NET, make sure that you have installed.

Start to OCR

  • Start your Microsoft Visual Studio;
  • Choose "Project" in "File-New" from the menu;
  • In "New Project" dialog box, choose "Visual Basic Projects";
  • Choose "Windows Application" in the "Templates" List and name it "YiigoImagingFormsVBNET";
  • In the "Solution Explorer" window from the context menu, right-click on the "References" folder, and select "Add Reference...";
  • In the "Add Reference" dialog box, select the ".NET" tab and browse to Yiigo.Imaging.Net.dll library, Yiigo.Imaging.Net.Forms.Recognition.dll and Yiigo.Imaging.Net.Forms.Processing.dll;
  • Add it to your VB.NET applications;
  • Import Yiigo .NET Image Namespace & copy those following codes:
Imports System.IO
Imports System.Drawing.Printing
Imports Yiigo.Imaging
Imports Yiigo.Imaging.Processing
Imports Yiigo.Imaging.Forms.Recognition
Imports Yiigo.Imaging.Forms.Processing

' Initialize Forms
'Create engine instance
Dim FormsRecognition As New FormsRecognition()


'Load Forms Template
Dim forms As FormsTemplateDoc = forms.Load("C:\sample.Forms")

'Load Document on which to perform forms
Dim imageSource As New FileSystemImageSource("C:\sample.tif", True)


'Perform Forms
Dim results As FormsDocument = FormsRecognition.RecognizeDocument(imageSource, docTemplate)

' Process forms
Dim formPage As New FormDocPage(2, 100, 100)
Dim field As New FormTextField()
field.Name = "11"
field.Bounds = New LogicalRectangle(42, 150, 102, 40, LogicalUnit.Pixel)
formPage.Add(field)
field = New FormTextField()
field.Name = "Address"
field.Bounds = New LogicalRectangle(196, 496, 892, 35, LogicalUnit.Pixel)
formPage.Add(field)
FormsRecognition.Pages.Add(formPage)


'Parse Results
For Each page As FormsPage In results.Pages

For Each group As FormsGroup In page.Groups
For Each mark As FormsMark In group.Marks
Dim markString As String = [String].Format("Mark {0}: {1}", mark.Template.Name, mark.IsMarked)
System.Console.WriteLine(markString)
Next
Next
Next


' Create a Searchable PDF
Dim FormsRecognition As New FormsRecognition()
Dim PDFGenerator As New PDFGenerator()
PDFGenerator.Save = "C:\forms1.pdf"
Products
Other Plugins
Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner