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

VB Imaging - VB Code 93 Generator Tutorial


VB Tutorial for Code 93 Barcode Generating in Images and Documents




VB Imaging Code 93 Add-on Overview



RasterEdge .NET Imaging Barcode SDK is the most comprehensive and standard barcode toolkit on the market, which supports both reading and writing all the popular 1D and 2D barcode types and sub-types. Barcode Creator Add-on from RasterEdge DocImage SDK for .NET perfectly integrates Code 93 barcode generating functions into VB.NET image processing and document redacting applications. Using this Code 93 Barcode Creating toolkit, users are able to instantly draw and define Code 93 on variable image and document formats, like JPEG, BMP, GIF, PNG, TIFF, PDF and Word. Code 93 is a linear barcode symbology with a higher density and data security compared with Code 39. It encodes alphanumeric data (upper case letters and numeric digits) with a variable length.


Related .net document control helps:
asp.net multipage tiff viewer: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net dicom viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net mvc text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
asp.net pdf page: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net pdf viewer: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...


RasterEdge .NET Image Barcode Add-on supports integrating Code 93 barcode image into .NET Class Library, ASP.NET web application and WinForms program using Visual VB code. This control library is designed for Microsoft Visual .NET Framework 2.0, 3.0, 3.5 or later versions, and can be integrated with Visual Studio 2005 or above. Download the trial package for a test now to write and draw the best Code 93 barcode pictures in png, jpeg, gif, bmp, TIFF, PDF, Word, Excel and PowerPoint.


Detailed features are listed below:


Easy to be integrated into Visual Studio 2005+ and .NET Framework 2.0+ versions


Support 36 bit and 64 bit barcode Windows operating systems


Easy to write Code 93 barcode on multiple image formats in VB class


Able to create Code 93 barcode on a certain page of PDF or Word document in VB program


Full managed methods that are compatible in VB class allow users to adjust barcode angle randomly


Easy to use barcode relocation API solution to change barcode position within VB project


Save the created Code 39 image as independent graphics as you wish




VB Code for Customizing Code 93 Barcode Generation



You can easily generator Code93 barcode and save it  to image files/object using this VB.NET barcode generator control. The following steps will show how to create a Code93 type barcode encoding numeric data text "CODE93DATA" 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 Code93 barcode.




'create a barcode
Dimbarcode As Linear = New Linear()
'select barcode type
barcode.Type = BarcodeType.CODE93
'set barcode data
barcode.Data = "CODE93DATA"
'set x,y position
barcode.X = 1.0F
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")





Draw Code 93 Barcode on VB Image



RasterEdge enables VB developers to create Code 93 on popular image files, including BMP, GIF, JPEG and PNG formats. Demonstrated is an example to create a single Code 93 bar code image on a local png file using VB programming. Users can freely adjust the coordinates to change barcode location on the image, and also create batch Code 93 as well. For more barcode sizing details, please navigate to the property table below.




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





Create Code 93 on VB Document Page



Visual VB examples here for developers to create and write Code 93 linear barcode pictures on PDF documents, multi-page TIFF, Microsoft Office Word, Excel and PowerPoint. Please create a Windows application or ASP.NET web form and copy the VB sample code below to your .NET project for an evaluation.



Create Code 93 on PDF Document Page



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 Code 93 on Multi-page TIFF File 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 Code 93 on Office 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")




Create Code 93 on Office 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")




Create Code 93 on Office PowerPoint Document



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")





Create Code 93 on Image & Document in VB Code



Complete VB.NET sample code for Code 93 generation and customization on images & documents, including all the parameters listed above.




'create REImage on which you want to draw the barcode
Dim reImage As REImage = New REImage("c:/Sample.png")

'create a barcode
Dim barcode As Linear = New Linear()
'select barcode type
barcode.Type = BarcodeType.CODE93
'set barcode data 
barcode.Data = "CODE93DATA"

'Code 93 barcode size related
'set x,y position
barcode.X = 1.0F
barcode.Y = 60.0F
barcode.BarcodeHeight = 60
barcode.BarcodeWidth = 0
barcode.BottomMargin = 0
barcode.LeftMargin = 0
barcode.RightMargin = 0
barcode.BarAlignment = AlignmentHori.Left
'set resolution
barcode.Resolution = 96
'set rotation
barcode.Rotate = Rotate.Rotate0
barcode.ShowCheckSumChar = false
barcode.UOM = UnitOfMeasure.PIXEL

'Code 93 colors
barcode.BackColor = System.Drawing.Color.White
barcode.ForeColor = System.Drawing.Color.Black

'Code 93 font style
barcode.TextFont = New Font("Arial", 9f, FontStyle.Regular)
barcode.TextColor = System.Drawing.Color.Black
barcode.TextMargin = 6
barcode.ShowText = true

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

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