Barcode library

Barcode library or Barcode SDK is a software library that can be used to add barcode features to desktop, web, mobile or embedded applications. Barcode library presents sets of subroutines or objects which allow to create barcode images and put them on surfaces or recognize machine-encoded text / data from scanned or captured by camera images with embedded barcodes. The library can support two modes: generation and recognition mode, some libraries support barcode reading and writing in the same way, but some libraries support only one mode.

At this time barcode technology allows to add machine reading tags or machine reading additional data to any object of real world with less than one cent cost. and use any of camera equipped device to identify additional data about an object. In this way, combination of barcode technology and barcode library allows to implement with low cost any automatic document processing application, OMR application, package tracking application or even augmented reality application.

History

The first Barcode SDKs were not implemented as software libraries but as standalone applications for MS-DOS and Windows and as Barcode fonts. At that time barcodes were used mostly in retail and for internal corporation needs, thus barcode users looked for all-inclusive hardware solutions to generate, print and recognize barcodes.

The situation changed when camera equipped devices (like mobile phones) and document scanners became common for everyday usage. Because barcodes could be scanned and recognized on common ordinary equipment and industrial and office users did not need to obtain expensive specialized one-function devices for barcode reading, the need for barcode writing and reading SDKs and libraries increased.

Barcode writing libraries already had been implemented as barcode fonts or standalone applications in projects like GNU Barcode or Zint. Implementation of a barcode writing library does not require hard Computer Science skills because it just need to follow AIM or ISO specifications. It does not have any difference from encoding data in special file format.

2D barcodes encoding is more difficult because 2D barcodes instead of 1D barcodes have additional encoding data like columns, rows, ECI or data correction options. Some 2D barcodes like MaxiCode or Pdf 417 also have special encoding fields like Post Address or metadata which convert these barcodes in multiple graphical files. These differences could not be solved by barcode fonts usage and required API with multiple parameters processing.

Barcode reading libraries are more complex, requiring Computer Vision techniques. However, they can be run on common camera or scanner equipped devices. The first libraries could recognize only 1D barcodes by laser scanners mode emulation. This mode captured the whole image but then library made some scan-lines with Bresenham's algorithm and tried to recognize data from these lines as hardware laser scanners did. The bright representation of these libraries is early ZXing project supported by Google, ZBar or other solutions.

For the recognition of 2D barcodes laser scanners mode emulation is not suitable. Moreover, this method has difficulty with barcode area detection, which causes problems with 1D angled barcode detection. More complicated methods from Computer Vision were implemented to improve recognition Quality for 1D and 2D barcodes.

Application

Barcode libraries have provided low cost automatic identification and data capture features to various fields of services and industry. This can be entertainment, healthcare, postal services, such as document processing or retail applications.

They can be used for:

  • Advertisement
  • Augmented reality implementation as quick identification of virtual objects
  • Automatic data identification in document processing
  • Automatically identified hyperlinks to internet pages
  • Automatically recognized payment bills
  • Creative usage of barcodes in design
  • Data entry for documents, like driver ID, receipt or passport
  • Encryption keys transfer and documents validation
  • Food and goods tracking in retail
  • Games in augmented reality
  • In airports, bus / railroad stations for automatic tickets and passenger documents identification
  • Internet of Things with linkage of physical object to virtual representation
  • Package tracking
  • Patient or medicine identification in healthcare services or industry
  • Quick information extraction from business cards
  • Tracking of rental cars, airline luggage and even nuclear wastes
  • Vehicles identification

Types

Barcode libraries and or Barcode SDKs can be split in different types, which is based on their functionality:

  • Barcode Fonts
  • Barcode Writing library
  • Barcode Reading library
  • Barcode Full support library

The first barcode libraries were fully transparent to user and used as simple printing text with specialized TrueType Fonts. This works well for 1D barcodes, because 1D barcode just the same as linear text, sometimes with checksum. Usage of Barcode Fonts with 2D barcodes also possible but it has problem with metadata processing like setting barcode row and columns and metadata. This is solved with predefined different metadata values in set of fonts for the same type of barcode.

Barcode libraries with API calls have more customization features in writing and reading modes. However, only part of libraries has full support of writing and reading modes. More than half of libraries supports only one mode.

Barcode library list

Barcode libraries can support different barcode formats and programming languages. Also, they have different support of reading and writing functionality. Most common barcode libraries and SDKs are represented in the following list:

Barcode library list:

Name

Company

License

Type

Languages

Platforms

Library abilities

Supported barcode types

Aspose.Barcode

Aspose

Proprietary, Royalty-free

Full

Java, .NET, C++, PHP, JavaScript, Python

Cross-platform(native), Java, .NET, Android, iOS and Tizen via .NET MAUI, Python via .NET and Java, Web

Aspose.Barcode library can write barcodes in 7 image formats and read barcodes from 5 image formats. Reading barcodes from MS Word documents and PDF files is also possible with Aspose.Words and Aspose.PDF components.

more than 80 barcode types

Barcode Writer in Pure PostScript

Terry Burton Consulting Ltd

MIT with commercial support

Write

PostScript

Cross-platform

Barcode Writer in Pure Postscript can generate all barcode formats entirely within PostScript.

more than 70 barcode types

Barcode4J

SourceForge

Apache 2.0

Write

Java

Java

Barcode4J library can generate barcode images in 5 image formats. The project is outdated.

15 barcode types

BarcodeLib

BarcodeLib.com

Proprietary, Royalty-free

Full

Java, .NET

Java, .NET

BarcodeLib library can write barcodes in 7 image formats and read barcodes from 5 image formats

11 types of 1D barcodes and 3 types of 2D barcodes

barKoder Barcode Scanner SDK

barKoder Ltd

Proprietary

Read

C, Java, Objective-C, Swift, Kotlin, JavaScript, C++, .NET, Dart, C#, TypeScript, Python

Android, iOS, Xamarin, Flutter, React Native, Linux, Cordova, .NET MAUI, Windows, Web, Browser, Cross-platform, NativeScript, Capacitor

The barKoder barcode scanner SDK supports barcode scanning both via images (5 formats) or through cameras of mobile devices

more than 30 barcode types

ByteScout BarCode SDK

ByteScout, Inc.

Proprietary, Royalty-free

Full

.NET; JavaScript via REST API; COM API: C++, Java, Delphi, PHP, VBScript

.NET, Windows, Web

ByteScout BarCode SDK libraries can write barcodes in 7 image formats and read barcodes from 5 image formats.

more than 20 barcode types

ClearImage Barcode Reader SDK

Inlite Research, Inc

Proprietary, per computer

Read

.NET; COM API: C++, Java, Delphi, PHP, VBScript

Windows

Barcode Reader library can read barcodes from 5 image formats and pdf files.

19 barcode types

Cognex Barcode Scanner SDK

Cognex

Proprietary, Royalty-free

Read

Java, .NET, Objective-C, Swift

Android, iOS

Cognex Barcode Scanner SDK can capture and recognize barcodes from mobile camera

17 barcode types

Docutain Barcode Scanner SDK

INFOSOFT Informations und Dokumentations systeme GmbH

Proprietary

Read

Java, JavaScript, .NET, Swift, Kotlin, Dart, C#

Android, iOS, Xamarin, Flutter, Cordova, Ionic, React Native, .NET MAUI

Docutain Barcode Scanner SDK can read 9 types of 1D barcodes and 4 different 2D formats with mobile apps.

13 barcode types

DTK Software Barcode Reader SDK

DTK Software

Proprietary

Read

Java, .NET

Java, .NET

DTK Barcode Reader SDK can read barcodes from 5 image formats

more than 30 barcode types

Dynamsoft Barcode Reader SDK

Dynamsoft

Proprietary, Per Device / Server / Application

Read

C; C++; .NET, Python; PHP, JavaScript; Objective-C; SWIFT; Kotlin; Dart

Windows, Linux, Android, iOS, Web (WASM); Flutter, React Native, Xamarin, .NET MAUI,

Dynamsoft Barcode Reader SDK can read barcodes from images (including PDF) and video streams. It supports multi-barcode decoding, DPM, and panoramic scanning.

more than 30 barcode types (1D, 2D, Postal)

GdPicture.NET Barcode SDK

ORPALIS

Proprietary, Royalty-free

Full

.NET

.NET

Library can write and read barcodes from almost 90 image and document formats

more than 30 barcode types

GNU Barcode

GNU Operating System

GPLv3

Write

PostScript

Cross-platform

GNU Barcode library can generate barcodes directly in document by Postscript language

10 barcode types

IBscanner for .NET

Inobix

Proprietary, Royalty-free

Read

.NET

.NET

IBscanner for .NET library can read barcodes from 5 image formats

12 types of 1D barcodes

IDAutomation Barcode Generator

IDAutomation.com, Inc.

Proprietary, Royalty-free

Write

Java, .NET, C++, PHP, JavaScript, VBA, TrueType Fonts

Java, .NET, Windows, Web

IDAutomation Barcode Generator library and TrueType Fonts can generate barcodes in various programming languages and applications which support TrueType Fonts

24 barcode types

KeepDynamic Barcode SDK

KeepDynamic.com

Proprietary, Royalty-free

Full

Java, .NET, VBA

Java, .NET, MS Office

KeepDynamic Barcode SDK can write barcodes in 7 image formats and read barcodes from 5 image formats.

9 types of 1D barcodes and 3 types of 2D barcodes

LEADTOOLS Barcode SDK

LEAD Technologies, Inc

Proprietary, Per Application

Full

Java, .NET, C++, Objective-C, Swift, JavaScript via REST API

Cross-platform(native), Java, .NET, Android, iOS, Web

LEADTOOLS Barcode SDK can write barcodes in various image formats and read barcodes from various image formats (depends on platform)

more than 50 barcode types

ML Kit Barcode Scanning API

Google

Google API

Read

Java, Objective-C, Swift

Android, iOS

ML Kit Barcode Scanning API can recognize barcodes from mobile camera

13 barcode types

Neodynamic Barcode Professional

Neodynamic SRL

Proprietary, Royalty-free

Full

.NET; JavaScript, PHP via REST API

.NET, Web

Neodynamic Barcode Professional can write more than 70 barcode types in 7 image formats and read 12 barcode types from 5 image formats.

write: more than 70 barcode types / read: 12 types of 1D barcodes

OnBarcode Barcode SDK

OnBarcode

Proprietary, Royalty-free

Full

Java, .NET, Objective-C

Java, .NET, Android, iOS

OnBarcode Barcode SDK can write barcodes in 7 image formats and read barcodes from 5 image formats (depends on platform)

more than 20 barcode types

OpenBarcodes

SourceForge

GPLv2

Write

TrueType Font

Cross-platform

OpenBarcodes TrueType Fonts can encode text to barcode in any rich text application

4 types of 1D barcodes and 3 types of 2D barcodes

pqScan Barcode SDK

pqScan

Proprietary, Royalty-free

Full

Java, .NET

Java, .NET

pqScan Barcode SDK can write barcodes in 7 image formats and read barcodes from 5 image formats

13 barcode types

Python Barcode Library

Game Maker 2k

BSD

Write

Python

Cross-platform

Python Barcode Library can generate barcode images with Python language

12 barcode types

Scanbot Barcode Scanner SDK

Scanbot SDK

Proprietary

Read

Java, Objective-C, Swift, Kotlin, Dart, JavaScript, C#, .NET

Android, iOS, Browser, Xamarin, Cordova, Ionic, Flutter, React Native

Scanbot Barcode Scanner SDK can read 9 types of 1D barcodes and 9 different 2D formats via apps and websites.

18 barcode types

SD-TOOLKIT Barcode SDK

SD-TOOLKIT

Proprietary, Royalty-free

Read

Java; .NET; C++(native); COM API: C++, Java, Delphi, VBScript; Objective-C

Java; .NET, Android, iOS, Windows

SD-TOOLKIT Barcode SDK can read barcodes from 5 image formats

15 types of 1D barcodes and 4 types of 2D barcodes

SmartCodeDeveloper SDK

TechnoRiver

Proprietary, Royalty-free

Write

.NET

.NET

SmartCodeDeveloper SDK can write barcodes in 7 image formats

more than 30 barcode types

Spire.Barcode

E-iceblue Co. Ltd.

Proprietary, Royalty-free

Full

Java, .NET

Java, .NET, Android via Xamarin, iOS via Xamarin

Spire.Barcode library can write barcodes in 7 image formats and read barcodes from 5 image formats

39 barcode types

Syncfusion.Barcode

Syncfusion

Proprietary

Write

.NET

.NET

Syncfusion.Barcode library generates barcodes as images or PDF documents. Also, provide UI controls to display the barcodes in UI.

10 types of 1D barcodes and 2 types of 2D barcodes

TBarCode SDK

TEC-IT Datenverarbeitung GmbH

Proprietary, Royalty-free

Write

.NET; C++; Delphi; PowerBuilder; COM API: C++, Delphi, VBScript; ABAP

Cross-platform(native), .NET, SAP

TBarCode SDK can write barcodes in 7 image formats (depends on platform)

more than 70 barcode types

VintaSoft Barcode .NET SDK

VintaSoft

Proprietary, Royalty-free

Full

.NET

.NET, Android via Xamarin

VintaSoft Barcode .NET SDK can write barcodes in 7 image formats and read barcodes from 5 image formats. Also library can read images from embedded pdf documents.

more than 60 barcode types

Viziotix Barcode Decoder SDK

Viziotix

Proprietary Per Device

Read

C/C++, wrappers from C++ library: .NET, Python, Java, Swift

Windows, Linux, Android, iOS, CUDA

Viziotix Barcode Decoder SDK can read 28 barcode types from camera and most common image formats.

28 barcode types

VSBarcodeReader

Vision Smarts SPRL

Proprietary, Royalty-free

Read

Objective-C, Swift, Java, Kotlin

iOS, Android, Xamarin, Cordova, Ionic

Vision Smarts Barcode Scanner SDK reads barcodes using the camera of the mobile device. IT Works 100% offline.

18 types of 1D and 2D barcodes

ZBar

SourceForge

GNU LGPL 2.1

Read

Python, Perl, C++, C

Linux/Unix, Windows, iOS

ZBar library can capture image from video stream and recognize barcodes. The library works as linear scanner emulation.

7 types of 1D barcodes and QR code

Zen Barcode Rendering Framework

None

Public domain

Write

.NET

.NET

Zen Barcode Rendering Framework can write barcodes in 7 image formats

9 barcode types

Zint

SourceForge

Apache 2.0, BSD, GNU GPLv3

Write

C, .NET via ZintNET port, Java via Okapi Barcode port

Linux/Unix, Windows, Java, .NET

Can generate barcodes in 6 image formats (depends on port)

more than 50 barcode types

ZXing

ZXing Project

Apache 2.0

Full

Java, .NET, C++, Objective-C, JavaScript, PHP, Ruby, Python, TypeScript

Cross-platform(native), Java, .NET, Android, iOS, Web

ZXing library with ports can produce barcodes in various image formats (it depends from the source port) and read barcodes from image or from camera.

more than 20 barcode types

Recommendations and best practices

Barcodes is the way of adding machine reading tags to any object of real world with low cost. All other ways like RFID chips or object detection by image recognition are more expensive and difficult to implement. There are more than 200 barcode types and this makes choice of barcode type ambiguous. First barcode was standardized in 60th and there were two waves of barcode features development

The first wave of creation barcode standards was started in 60th and those were 1D barcodes. Main advantages of these barcodes were simple encoding and recognition with laser scanners for linear barcodes. All of these restrictions were tied to slow 8-bit processors, which were used at that time. This makes 1D barcodes have restricted symbol encoding like Code 11 or have restricted barcode length like EAN 13, UPCA, EAN 8 or be used even without checksum like Code 39 barcodes. In addition to this, informational density encoding of these barcode types is too low.

Moreover, all of these 1D barcodes have low quality checksum or even do not have any checksum which makes recognition process unpredictable on images with too low quality. Open source engines does not recognize 1D barcodes on images with low quality but barcode engines with advanced recognition algorithms can recognize these barcodes. Unfortunately, recognition of low quality images could produce some incorrect symbols in recognized text. Low-density encoding, encoding restrictions and weak checksum makes 1D barcode unsuitable to current requirements to informational systems and data processing. Using of 1D barcodes in The New applications is reasonable if only it is required by industrial standards

The second way of barcode standards implementation was started in 90th and it was development of 2D barcodes. Main advantages of 2D barcodes are high encoding density, which is 10 times more, no restrictions to text encoding and self-checked codes like Reed Solomon codes, which not only add confidence in correct recognition but also can restore some wiped or corrupted barcode data. Main disadvantage of 2D barcodes, they cannot be recognized by laser scanners, except PDF 417, for recognition they require photo scanners. Most of 2D barcodes can encode information in byte mode and this allows encoding both text in 8-bit national encoding charset and text in common Unicode charsets like UTF16 or UTF8 with ECI tag.

New projects should use 2D barcodes if industry standards permit. They do not have any restrictions to encoding text, they can be correctly restored on corrupted or low quality images and their recognition result is fully confidential. The informational density allows placing them on the same area or even lesser than 1D barcodes. The main question here could be requirement to marked area. Most common QR code can be only in square size, same Aztec or Datamatrix in some sizes. If someone has a long rectangular area with low height, they can use Datamatrix with rectangular sizes, see DMRE or PDF417, which can have difference width to height more than 64 times.