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

VB Imaging - VB Code 11 Generator


Create Code 11 Barcodes on Jpeg, Png, Gif, Bmp, Tiff, PDF, Word, Excel and PPT




VB Imaging Code 11 Creator Overview



RasterEdge provides flexible and affordable barcode generating solution for integrating Code 11 barcode images into VB.NET project. This VB.NET Imaging Barcode Creator SDK can generate & save Code 11 barcode to gif, png, jpeg, and bmp image files using Visual VB coding in Microsoft Visual Studio 2005 and above.

pdf preview in asp.net c#, excel viewer asp.net c#, mvc show pdf in div, how to view pdf file in asp.net c#, asp.net add text to pdf file, asp.net pdf editor component, display image in gridview asp.net c#.

In addition, PDF, TIFF, MS Office Word, Excel and PowerPoint files are supported for Code 11 implementation as well. Different from other VB.NET barcode generator SDKs that can only be used to create an independent Code 11 barcode image, this VB.NET Code 11 barcode creator add-on provides mature APIs for VB.NET developers to create standard Code 11 barcode and insert it into defined area of source image or document file. Thus, this VB.NET Code 11 barcode creator add-on is often used in following two main sections. vb.net pdf reader control, vb.net convert pdf to image, c# extract image from pdf file, print pdf file in c# windows application, tesseract ocr pdf c#, c# generate pdf with images, vb.net convert pdf to bitmap.


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 word viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
asp.net pdf editor: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net edit pdf image: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#


Detailed features are listed below:


Draw Code 11 barcode image on png, jpeg, bmp, gif or tiff image file by VB.NET code


Write Code 11 barcode image on single-page or multi-page PDF, TIFF or Word document using VB.NET code


Print linear barcode Code 11 in Visual VB applications


Create and print Code 11 on images, TIFF, PDF, Word, Excel and PowerPoint with specific location


Easy to draw Code 11 bar code with fixed width and height using VB


Optional for users to either display or hide data text below Code 11 image


Automatically add margins on the left & right sides for scannable Code 11 creating


Flexible sizing dimensions and various parameters for customization




VB Code for Customizing Code11 Barcode Generation



You can easily generator Code11 barcode and save it  to image files/object using this VB.NET barcode generator control. The following steps will show how to create a Code11 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 Code11 barcode.




'create a barcode
Dim barcode As Linear = New Linear()
'select barcode type
barcode.Type = BarcodeType.CODE11
'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 Code 11 on VB Png, Jpeg, Gif, Bmp



RasterEdge allows Visual VB.NET developers to created Code 11 on popular image files, including BMP, GIF, JPEG, and PNG. Besides, users can print the Code 11 bar code on the image within any area, by simply defining the x and y coordinates to embed on image. Below is the Visual VB sample codes for printing Code 11 barcode on png image, encoding numeric data "0123456789-" with a default resolution of 96 DPI.




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





Create Code 11 on Document Page in VB



Developers can create Code 11 on certain PDF, TIFF, Word, Excel or PowerPoint document page with RasterEdge powerful .NET barcode generator SDK. All you need to do is simply copy the following VB demo code to your program for a test. You can make necessary modification for the barcode location on image, and adjust the Code 11 bar code dimensions as well.



Create Code 11 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 Code 11 on Certain 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 11 on Certain 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")




Generate Code 11 on Certain Excel Page



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




Add and Burn Code 11 on 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")





VB Code on Writing Code 11 on Image & Document



This is the Visual VB sample code to adjust the Code 11 bar code properties listed above. Use it in your .NET application to create Code 11 barcode on BMP, JPEG, PNG, GIF images and PDF, TIFF, Word, Excel, PowerPoint documents.




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

'Code 11 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;
barcode.Resolution = 96'set resolution
barcode.Rotate = Rotate.Rotate0'set rotation
barcode.AddCheckSum = true
barcode.UOM = RasterEdge.XImage.Barcode.Creator.UnitOfMeasure.PIXEL

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

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

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

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