Click or drag to resize

Getting Started

Opait Barcoder API was developed to provide simple methods to create, detect and manage barcodes in .NET applications. You can use the library to automate the following functions:

  • Encode up to 30 1D and 2D barcode formats.

  • Encode up to 10 pre-defined QR-Code payloads.

  • Detect and decode barcodes present in images and PDF documents.

  • Generate and add barcodes to new or existing PDF documents.

Opait Barcoder API allows you to add all these functions, and many more, to your own programs.

In the sections that follow, you will learn how to download, install and start using the API in your development environment.

Download

Opait Barcoder is distributed as an MSI file. The included applications are compiled to run in 64-bit environments. The API can be used to create both 32-bit and 64-bit applications.

The following files are needed for development and should be copied to your development directories after installation:

  • Opait.Barcoder.dll is the main .NET class library.

  • x64\Pdfium.dll is the unmanaged Pdfium library for 64-bit platforms.

  • x86\Pdfium.dll is the unmanaged Pdfium library for 32-bit platforms.

The unmanaged Pdfium.dll is used to render PDF files when detecting barcodes. If you use PDF functionality, then you must make sure that the correct version of Pdfium.dll is loaded at runtime. Mismatching the versions of your platform and Pdfium.dll can produce runtime exceptions.

In addition to these files, you will need either a developer or trial license for using the API in your programs. The trial license has the same functionality as the full developer version except that it has an expiration date. The trial license is provided for evaluation only and should not be used for production or deployment.

Installation
  1. Download the Opait Barcoder MSI file and install it to your computer.

  2. The following components are installed:

    • Barcoder.exe is a console program with comprehensive command line options.

    • Decoder.exe is a Windows program to detect and decode barcodes in image and PDF documents.

    • BarcoderClient.exe is another Windows program with options to encode and decode barcodes and supports QR-Code payloads.

  3. Run one of the Windows programs above. You will be prompted for a product license. You have the option of installing your developer license file or activating a trial version of the product. The trial version has no limitations and is for evaluation purposes.

  4. In your .NET applications, reference Opait.Barcoder.dll located in the installation folder and use Opait.Barcoder.Api namespace.

  5. Refer to the code samples in this guide to start using the barcoder library in your own projects.

Support for 32-bit and 64-bit platforms

The class library itself is built for AnyCPU platform and can be used in x86, x64 or AnyCPU projects. The PDF rendering capability for detecting barcodes in PDF documents uses the unmanaged open source Pdfium library. The 32-bit/64-bit versions of pdfium are located under x86/x64 directories. You must make sure that the correct version of Pdfium is loaded at runtime if you use this functionality.

There are several ways to include Pdfium.dll in your application:

  1. The simplest way is to add the correct version as a reference to the project and make sure that it is copied to the output directory.

  2. If your project will run in both 32 and 64 bit platforms, then compile it with AnyCPU and copy both x86 and x64 directories to your output directory and place them under x86 and x64 directories, respectively. Opait Barcoder will search and load the correct version of Pdfium based on the runtime platform.

  3. You can use an environment variable named PdfiumDirectory that should point to the root of the directory where Pdfium.dll or the x86/x64 folders are located.

  4. Finally you might use AppDomain.CurrentDomain.RelativeSearchPath settings in the application configuration file to specify the directory for loading private assemblies. Please refer to Microsoft documentation for details.