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:
c# asp.net sharepoint document viewer: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
asp.net pdf editor using c#: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net open pdf password using c#: ASP.NET PDF Password Edit Control: online add, remove, update PDF file open password using C#
asp.net doc file viewer: ASP.NET Office Word Document Viewer: view MS Office Word files online using C# in ASP.NET web applications
asp.net webforms pdf editor using c#: ASP.NET WebForms PDF Editor: create, view, edit, annotate, redact PDF file in ASP.NET WebForms application
c# asp.net powerpoint document viewer: ASP.NET PowerPoint Document Viewer Control: view pptx files online in C# using ASP.NET
asp.net annotate pdf using c#: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#




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