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

How to C#: Install, Deploy and Distribute XImage.Barcode Reader


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




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


Related .net document control helps:
asp.net pdf viewer: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net dnn document viewer: DNN Document Viewer Control: view, annotate, redact, convert documents in dotnetnuke ASP.NET
asp.net sharepoint pdf editor: ASP.NET SharePoint PDF Editor Control: view, edit, annotate, redact PDF document in SharePoint sites
asp.net dicom document viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: view, annotate, redact Adobe PDF files online in ASP.NET
asp.net create pdf: ASP.NET Create PDF Document Control: create, convert PDF file from Word, Excel, Tiff file formats in C# ASP.NET
asp.net powerpoint document viewer: ASP.NET PowerPoint Document Viewer Control: view pptx files online in C# using ASP.NET




System Requirements



Windows XP SP3 or later


Microsoft .NET Framework 2.0 or later




Install XImage.Barcode Reader 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.XImage.BarcodeScanner.dll


Use corresponding namespaces;


  using RasterEdge.XImage.BarcodeScanner;


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 (scan DataMatrix barcode from png image).




            Bitmap bmp = new Bitmap(inputDirectory + "Sample_Barcode.png");
            //  config reader setting
            ReaderSettings settings = new ReaderSettings();
            //  define the type of barcode to scan
            settings.AddTypesToRead(BarcodeType.DataMatrix);

            //  read all barcodes in the document
            Barcode[] barcodes = BarcodeReader.ReadBarcodes(settings, bmp);

            foreach (Barcode barcode in barcodes)
            {
                Console.WriteLine("Data: " + barcode.DataString);
            }