C#: Online Guide
How To: Barcode Generator
Codabar
Codabar
  |  
Home ›› XImage.Barcode Generator ›› VB Barcode Generator: Codabar

VB.NET Imaging - VB Codabar Generator


How to Generate Linear Codabar Barcode on Images and Documents in VB Class




VB Codabar Image Generator Overview



RasterEdge barcode generating SDK in VB.NET creates both linear and 2D barcode graphics with accuracy and high speed. The barcodes generated are printable and scannable with our barcode scanner application or any other barcode reading software. Codabar is one of barcode symbologies which can be encoded by our VB.NET barcode generating component. In case developers and users need barcode scanner for reading and decoding, RasterEdge Image SDK for VB.NET provides you Codabar Reader Add-on. And for developers interested in C# project, please refer to C# Codabar Barcode Generator and C# Codabar Barcode Reader. RasterEdge DocImage SDK for .NET provides professional and accurate Codabar generating component to quickly and easily write Codabar on images and documents, including image formats GIF, BMP, PNG, JPEG, and PDF, (Multi-page) TIFF, and Microsoft Office Word, Excel and PowerPoint documents. As long as you are using .NET 2.0 or above, and you have installed Visual Studio 2005 or later, you can easily draw and add readable Codabar in Visual VB Class Library, ASP.NET web and Windows applications. vb.net compress pdf file size, edit pdf c#, vb.net print form to pdf, itextsharp split pdf vb.net, convert pdf to jpg c# codeproject, convert pdf to text vb.net, vb.net extract image from pdf.


Related .net document control helps:
asp.net powerpoint viewer: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET
asp.net annotate pdf: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
asp.net document viewer c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
asp.net dicom document viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net pdf viewer: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net sharepoint document viewer: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint




Why Choose Codabar Barcode in VB.NET Project



Codabar barcode symbology is the oldest barcode, commonly used in libraries, blood banks, shipping industries and other information processing applications. It allows 16 digits, 10 numeric digits(o-9), 6 special non alpha characters and 4 start/stop variable characters. And it holds more information compared with other barcode types. Codabar bar code does not require a check digit compulsorily, however, we may need Codabar check digit for high-quality barcode scanning in some cases. Considerately, our VB.NET Codabar generator designs optional check digit function for user's security consideration.

pdf preview in asp.net c#, asp.net pdf viewer user control, asp net core mvc pdf viewer free, open word file in asp.net c#, asp.net image thumbnail viewer, asp.net pdf editor control, asp.net tiff viewer.




Why Pick RasterEdge VB Codabar Generator



RasterEdge Codabar barcode writer is easy to be integrated into VB.NET project. It draws Codabar barcode on images and documents on defined area quickly and accurately. Image formats supported include PNG, BMP, JPEG, GIF, etc. And this barcode generator SDK also creates Codabar bar code on PDF, WORD, TIFF, etc. More features can be found below:


Support preview before saving to a variety of image formats


Generate Codabar barcodes in a few seconds with VB Codabar generating SDK


Able to adjust parameter settings before encoding, like rotation angle, width, height , text font


Print high and low resolution Codabar barcodes


Compatible with the latest Codabar barcode specification


Compliant with all Microsoft Windows platforms




VB Code for Customizing Codabar Barcode Generation



You can easily generator Codabar barcode and save it  to image files/object using this VB.NET barcode generator control. The following steps will show how to create a Codabar type barcode encoding numeric data text "112233445566" into the image object with XImage.Barcode.Creator.


Add References


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XImage.BarcodeCreator.dll


  System.Drawing.dll


Using Namespaces


  using System.Drawing;


  using RasterEdge.XImage.BarcodeCreator;


Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:

       

       If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.

       

       If using x86, the platform target should be x86.


Please copy the sample code as follow to generator a Codabar barcode.




'create a barcode
Dim barcode As Linear = New Linear()
'select barcode type
barcode.Type = BarcodeType.CODABAR
'set barcode data
barcode.Data = "112233445566"
'set x
barcode.X = 1.0F
'set y
barcode.Y = 60.0F
'set resolution
barcode.Resolution = 96
'set rotation
barcode.Rotate = Rotate.Rotate0
barcode.BarcodeWidth = 200
barcode.BarcodeHeight = 200
barcode.AutoResize = true

'convert barcode to a bitmap and save it to image file
'Dim bmp As Bitmap = barcode.ToImage()
'bmp.Save(@"C:\barcode.bmp")





Create Codabar Barcode on VB Image



The following VB sample code will guide you to create a linear Codabar on a local png image demo. Other supported image formats include BMP, PNG, GIF and JPEG. Besides you can also customize barcode location on images by changing the horizontal & vertical coordinates.


To adjust barcode dimensions and other settings, please view details in the property table of last section.




Dim image As REImage  = New REImage("C:\\Sample.png")
barcode.DrawBarcode(image, 150F, 150F)
image.Save(ImageType.PNG, "C:\\Sample_Barcode.png")





Create Codabar on VB Document Page



With RasterEdge.Imaging.Barcode.Creator.dll and RasterEdge.Imaging.Basic.dll, developers can create Codabar on the certain documents page and area, including PDF, (Multi-Page) TIFF, and MS Word(.docx), Excel and PowerPoint documents.



Create Codabar on Certain PDF Document Area



Add References(Extra)


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XDoc.PDF.dll


Using Namespace(Extra)


  RasterEdge.XDoc.PDF;


  RasterEdge.Imaging.Basic;


  RasterEdge.Imaging.Raster.Core;



Dim  docx As PDFDocument = New PDFDocument("C:\\Sample.pdf")
Dim  page As PDFPage = docx.GetPage(0)
Dim  image As Bitmap = barcode.ToImage() 'Define on the above code
page.AddImage(image, New PointF(100F, 100F))
docx.Save("C:\\Sample_Barcode.pdf")




Create Codabar on Defined TIFF Document Page



Add References(Extra)


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XDoc.TIFF.dll


Using Namespace(Extra)


  RasterEdge.XDoc.TIFF;


  RasterEdge.Imaging.Basic;


  RasterEdge.Imaging.Raster.Core;




Dim  docx As TIFFDocument = New TIFFDocument("C:\\Sample.tif")
Dim page As BasePage = docx.GetPage(0)
Dim  image As REImage = New REImage(barcode.ToImage())
page.AddImage(image, New PointF(100F, 100F))
docx.Save("C:\\Sample_Barcode.tif")




Create Codabar on Microsoft Word Document



Add References(Extra)


  RasterEdge.XDoc.Word.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.XDoc.Office.Inner..Office03.dll


Using Namespace(Extra)


  RasterEdge.XDoc.Word;


  RasterEdge.Imaging.Basic;


  RasterEdge.Imaging.Raster.Core;




Dim  docx As DOCXDocument = New DOCXDocument("C:\\Sample.docx")
Dim page As BasePage = docx.GetPage(0)
Dim  image As REImage = New REImage(barcode.ToImage())
page.AddImage(image, New PointF(100F, 100F))
docx.Save("C:\\Sample_Barcode.docx")




VB Code to Add Codabar to Excel Document



Add References(Extra)


  RasterEdge.XDoc.Excel.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.XDoc.Office.Inner..Office03.dll


Using Namespace(Extra)


  RasterEdge.XDoc.Excel;


  RasterEdge.Imaging.Basic;


  RasterEdge.Imaging.Raster.Core;




Dim  docx As XLSXDocument = New XLSXDocument("C:\\Sample.xlsx")
Dim page As BasePage = docx.GetPage(0)
Dim  image As REImage = New REImage(barcode.ToImage())
page.AddImage(image, New PointF(100F, 100F))
docx.Save("C:\\Sample_Barcode.xlsx")




Draw Codabar on PowerPoint Page in VB.NET



Add References(Extra)


  RasterEdge.XDoc.PowerPoint.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.XDoc.Office.Inner..Office03.dll


Using Namespace(Extra)


  RasterEdge.XDoc.PowerPoint;


  RasterEdge.Imaging.Basic;


  RasterEdge.Imaging.Raster.Core;




Dim  docx As PPTXDocument = New PPTXDocument("C:\\Sample.pptx")
Dim page As BasePage = docx.GetPage(0)
Dim  image As REImage = New REImage(barcode.ToImage())
page.AddImage(image, New PointF(100F, 100F))
docx.Save("C:\\Sample_Barcode.pptx")





VB Code to Adjust Codabar Parameters



For all the above properties, we have demonstrated here the complete Visual VB sample codes. Developer can simply copy to your .NET program to print Codabar on your target images or documents.




// create REImage on which you want to draw the barcode
REImage reImage = new REImage("c:/Sample.png");

Linear barcode = new Linear();// create a barcode
barcode.Type = BarcodeType.CODABAR;// select barcode type
barcode.Data = "112233445566";// set barcode data 

// Codabar barcode size related
barcode.X = 1.0F;// set x
barcode.Y = 60.0F;// set y
barcode.BarcodeHeight = 60;
barcode.BarcodeWidth = 0;
barcode.BottomMargin = 0;
barcode.LeftMargin = 0;
barcode.RightMargin = 0;
barcode.BarAlignment = AlignmentHori.Left;
barcode.Resolution = 96;// set resolution
barcode.Rotate = Rotate.Rotate0;// set rotation
barcode.AddCheckSum = true;

// Codabar colors
barcode.BackColor = System.Drawing.Color.White;
barcode.ForeColor = System.Drawing.Color.Black;

// Codabar font style
barcode.TextFont = new Font("Arial", 9f, FontStyle.Regular);
barcode.TextColor = System.Drawing.Color.Black;
barcode.TextMargin = 0;
barcode.ShowText = true;

// Codabar special
barcode.CodabarStartChar = CodabarStartStopChar.A;
barcode.CodabarStopChar = CodabarStartStopChar.A;
barcode.N = 2.0f;

barcode.DrawBarcode(reImage, 0, 0);// draw barcode on REImage with location x and y

reImage.Save(ImageType.PNG, @"c:/barcode.png");