C#: Online Guide
How To: Barcode Generator
Install, Deploy and Distribute
  |  
Home ›› XImage.Barcode Generator ›› C# Barcode Generator: Install, Deploy and Distribution

C# Imaging - Install, Deploy and Distribute XImage.Barcode Generator


Online C# Guide for XImage.Barcode Generator Installation, Deployment and Distribution




There are two parts on this page, including system requirements for using XImage.Barcode Generator, and how to install XImage.Barcode Generator into visual studio C# .NET Applications.


Related .net document control helps:
asp.net edit pdf text using c#: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
c# asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net pdf document viewer c#: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
c# asp.net word document viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
asp.net edit pdf image using c#: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
asp.net mvc pdf editor using c#: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
c# asp.net dicom viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET




System Requirements



Windows XP SP3 or later


Microsoft .NET Framework 2.0 or later




Install XImage.Barcode Generator in C# Project



Add necessary references to your C#.NET project. Right-click the project and select "Add Reference..." to locate and add the following DLLs as project references;


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.XImage.BarcodeCreator.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.XDoc.PDF.dll


Use corresponding namespaces;


  using RasterEdge.XDoc.PDF;


  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.


Add the following C# demo code to your project (create Code 128 on PDF Document demo).




String inputFilePath = @"D:\MyProj\RasterEdgeImagingTest\Demo\Temp\1.pdf";
String outputFilePath = @"D:\MyProj\RasterEdgeImagingTest\Demo\Temp\output.pdf";

//  open the document
PDFDocument doc = new PDFDocument(inputFilePath);
PDFPage page = (PDFPage)doc.GetPage(0);

//  Construct a linear barcode
Linear barcode = new Linear();
//  set type to CODE128
barcode.Type = BarcodeType.CODE128;
//  set module width to 1 pixel
barcode.X = 1;
//  set module height to 60 pixel
barcode.Y = 60;
//  set data
barcode.Data = "1234567";
//  draw barcode at point (20, 20)
barcode.DrawBarcode(page, 20F, 20F);

//  output the new document
doc.Save(outputFilePath);