C#: Online Guide
How To: Barcode Reader
Quick to Start
Home ›› XImage.Barcode Reader ›› C# Barcode Reader: Quick to Start

How to C#: Quick to Start Using XImage.Barcode Reader

To Have a Quick Evaluation of XImage.Barcode Reader in Visual C# Console Application

As a leading professional third-party SDK supplier in the field of image and document management, RasterEdge has always been devoted to providing various effective and fully-functional imaging solutions for developers who are working on different .NET developing applications.

Related .net document control helps:
c# asp.net azure document viewer: ASP.NET Azure Document Viewer: view, annotate files online using ASP.NET Cloud Service
c# asp.net document viewer: ASP.NET Document Viewer Control in C#: View, Annotate, Redact web document files in ASP.NET using C#
c# asp.net text document viewer: C# HTML5 Viewer: Load, View, Convert, Annotate and Edit OpenOffice, CSV and Text file
asp.net mvc pdf editor using c#: ASP.NET MVC PDF Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
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 convert pdf using c#: ASP.NET Convert PDF Control: Convert, export PDF to Word, HTML, Tiff files in C# ASP.NET

This C#.NET barcode reading toolkit, RasterEdge XImage.Barcode Reader SDK for .NET is one of the most strongly-featured and mature document imaging library toolkits on the market, which is designed to help developers implement barcode-related tasks in their C#.NET applications.

Using this C#.NET barcode reading control, you can easily and quickly complete both 1d and 2d barcode scanning from images. tiff files, PDF documents, Word documents, Excel files and PPT files in any type of a 32-bit or 64-bit .NET application, including ASP.NET web service and Windows Forms for any .NET Framework version from 2.0 to 4.5.

As you know, there're various reliable barcode reading features that can be implemented in C#.NET programming. And you may want to have a quick testing on RasterEdge XImage.Barcode Reader after downloading its free trial package online.  To meet your requirement, on this quick to start page, we will tell how to create a C# console application, and read EAN-13 from PDF in C#.NET.

Create a C# Console Application

Open Visual Studio and click "New" from toolbar. Note, Visual Studio 2005 and above versions are available;

Choose "C# Language" and "Console Application" respectively to create a project.

Sample C# Code for Reading EAN-13 from PDF

By following steps below, your C# project are able to read EAN-13 from PDF document.

Choose "C# Language" and "Console Application" respectively to create a project.










Use corresponding namespaces;

  using RasterEdge.XImage.BarcodeScanner;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.XDoc.PDF;

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.

Copy of the following C# sample code to your application.

            // load PDF document
            PDFDocument doc = new PDFDocument(inputDirectory + "Sample_Barcode.pdf");

            // get the page you want to scan
            BasePage page = doc.GetPage(0);

            // set reader setting
            ReaderSettings setting = new ReaderSettings();

            // set type to read

            // read barcode from PDF page
            Barcode[] barcodes = BarcodeReader.ReadBarcodes(setting, page);

            foreach (Barcode barcode in barcodes)
                // print the loaction of barcode on image
                Console.WriteLine(barcode.BoundingRectangle.X + "  " + barcode.BoundingRectangle.Y);

                // output barcode data onto screen