C#: Online Guide
How To: Barcode Generator
EAN-8
EAN-8
  |  
Home ›› XImage.Barcode Generator ›› VB Barcode Generator: EAN-8

VB Imaging - EAN-8 Generating Tutorial


Generate & Output GS1-compatible EAN-8 Image Using VB.NET Barcoding Library




VB.NET EAN-8 Barcode Creator Add-on Overview



VB.NET Barcode Creator Add-on from RasterEdge DocImage SDK for .NET successfully combines advanced EAN-8 barcode generating technologies with mature image & document processing techniques. It helps VB.NET developers generate & insert EAN-8 barcode at specified area of the target file in VB.NET applications. EAN-8 is a numeric linear barcode symbology with a fixed length of 8 digits.

asp.net edit pdf, pdf preview in asp.net c#, mvc view to pdf itextsharp, asp.net open excel file on client, pdf viewer for asp.net web application, asp net replace text from pdf javascript, asp.net web image viewer.

RasterEdge .NET DocImage Barcode Add-on component enables Visual VB developers to create EAN-8 barcode image with best quality. All the EAN-8 barcodes generated with this .NET barcode control are compatible with the latest GS1 General Specification, with the last checksum digit character automatically added. There are only two project requirements: .NET Framework 2.0 or later version, and Microsoft Visual Studio 2005 or above. c# pdf stamper, how to crop a pdf in c#, vb.net convert pdf to word, vb.net print pdf to default printer, c# pdf to tiff pdfsharp, itextsharp convert pdf to image vb.net, vb.net save form as pdf.


Related .net document control helps:
document viewer asp.net c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
asp.net document viewer free: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS...
asp.net edit pdf page control: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net pdf editor component: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net edit pdf image control: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
document viewer asp.net c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
asp.net document viewer free: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS...


The supported image and document formats for EAN-8 barcode creating are JPEG, PNG, BMP, GIF, TIFF, PDF and MS Word. Our VB.NET EAN-8 Barcode Generator is so powerful and stable that can enable users to:


Use EAN-8 Barcode Inserting library in any Visual Studio and .NET Framework version


Insert and customize linear EAN-8 barcode on any designed document image area in VB.NET


Rotate linear EAN-8 barcode at 0, 90, 180 & 270 degrees during VB.NET EAN-8 barcode generation process


Customize and define EAN-8 properties including X, Y dimension, four margins size, font style, and many more


Compute EAN-8 barcode check digit without any external programming code


Dynamically create EAN-8 barcode image in high or low resolution and save to any designed route


Purchase perpetual & royalty free license of .NET barcode creating and writing SDK at reasonable price


Besides this VB barcoding guide, we also provide VB.NET Codabar solution for VB.NET programmers. Here is the detailed Codabar Generation in Visual Basic.NET Tutorial.




VB Code for Customizing EAN-8 Barcode Generation



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




'create a barcode
Dim barcode As Linear = New Linear()
'select barcode type
barcode.Type = BarcodeType.EAN8
'set barcode data
barcode.Data = "7777777"
'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")





Create EAN-8 Barcode on Image in VB.NET



Here is a VB example for developers to write and embed an EAN-8 barcode on a png image from the local disk C, with the detailed location specified by users with the X and Y coordinates. Besides the PNG image format, other supported common image formats are JPEG, BMP and GIF.




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





Generate EAN-8 on Document Page in VB.NET



Use following VB code to generate EAN-8 on defined page area of a PDF, multi-page TIFF, Microsoft Office Word (.docx), Excel(.xlsx) or PowerPoint(.pptx) document.



EAN-8 Image Creation on VB 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")




EAN-8 Image Creation on VB 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")




EAN-8 Image Creation on VB 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")




EAN-8 Image Creation on VB 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")




EAN-8 Image Creation on VB 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")





Generate EAN-8 on Image & Document in VB



RasterEdge supports EAN-8 barcode generation and customization on image and document in Visual VB.NET application.




'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.EAN8
'set barcode data 
barcode.Data = "7777777"

'EAN-8 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.AddCheckSum = false
barcode.UOM = UnitOfMeasure.PIXEL

'EAN-8 colors
barcode.BackColor = System.Drawing.Color.White
barcode.ForeColor = System.Drawing.Color.Black

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

'EAN-8 special
'barcode.SupData = ""
'barcode.SupHeight = 0.8f
'barcode.SupSpace = 15

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

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