VB.NET: Generate Barcode on Document & Images

How to create barcodes on document image using VB.NET
Yiigo provides .NET barcode reading support included in Yiigo.Image for .NET, which can be easily added to your document imaging applications with fully-automated, dynamic, and feature-packed barcode creating & writing functionalities. Find more barcode generating information on Yiigo.Imaging for .NET Barcode Generation Plugin.
Yiigo.Imaging for .NET Barcode Writing Plugin has those following functionalities:
  • Encode, write linear 1D barcode symbologies in an image
  • Generate, print QR Code, Data Matrix, PDF-417
  • Show human-readable barcodes
  • Change barcode size, color, resolution, etc.
  • Rotate barcodes with 0, 90, 180, 270 degrees
  • Create checksum, supplement data, and functions values for barcodes
For VB.NET developers, Yiigo provides online tutorials to create, write linear, postal & 2D barcodes on documents and images using Yiigo.Image for .NET and .NET Barcode Generation Plugin in details. Find more barcode generating tutorials on Barcode Generating Support for Visual C#.NET, Web Imaging Viewer Barcode Creating Support and Generate Barcodes in .NET Winforms.
Create Barcodes with VB.NET Sample Code

Requirements

Before creating barcodes in VB.NET, make sure that you have installed.

Start to Create Barcode

  • 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 "YiigoImagingBarcodeGenerateVBNET";
  • 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 and Yiigo.Imaging.Net.Barcode.Generate.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.BarcodeGenerate

' Create a barcode
Dim barcode As New YiigoBarCode()
barcode.Symbology = Symbology.Code128
barcode.CodeToEncode = "978123456789"
barcode.ChecksumEnabled = True
barcode.DisplayChecksum = True
barcode.BarcodeUnit = BarcodeUnit.Pixel
barcode.DPI = 72
barcode.X = 3
barcode.Y = 60
barcode.LeftMargin = 0
barcode.RightMargin = 0
barcode.TopMargin = 0
barcode.BottomMargin = 0
Orientation = Orientation.Degree180
barcode.DisplayText = True
barcode.TextFont = New Font("Arial", 10F, FontStyle.Regular)
barcode.TextMargin = 6
barcode.ImageFormat = ImageFormat.Png

' Render a Given String
Public Sub CheckCode128String(s As String)
Dim bc As New BarcodeGenerator(BarcodeStyle.Code128)
If Not bc.Validate(s, False) Then
Console.WriteLine("Invalid barcode string: " + s)
Else
Console.WriteLine("Barcode string accepted.")
End If
End Sub
Products
Other Plugins
Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner