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. [1] 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 [2] [3] application, OMR application, package tracking [4] [5] application or even augmented reality [6] [7] application.
The first Barcode SDKs were not implemented as software libraries but as standalone applications for DOS and Windows [8] [9] [10] and as Barcode fonts. [11] At that time barcodes were used mostly in retail and for internal corporation needs, thus barcode users looked for all-inclusive hardware solutions [12] 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 [13] or ISO specifications. [14] 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. [15] 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 [16] or other solutions. [17] [18]
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 [19] [20] to improve recognition quality for 1D and 2D barcodes.
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:
Barcode libraries and or Barcode SDKs can be split in different types, which is based on their functionality:
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 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:
Name | Company | License | Type | Languages | Platforms | Library abilities | Supported barcode types |
---|---|---|---|---|---|---|---|
Aspose.Barcode [29] | 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 [30] barcode types |
Barcode Writer in Pure PostScript [31] | 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 [32] barcode types |
Barcode4J [33] | SourceForge | Apache 2.0 | Write | Java | Java | Barcode4J library can generate barcode images in 5 image formats. The project is outdated. | 15 [34] barcode types |
BarcodeLib [35] | 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 [36] | Placeholder 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 | 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 [37] | 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 [38] | 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 [39] | 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 [40] | 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 [41] | 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 [42] | Dynamsoft | Proprietary, Per Computer | Read | C++; Objective-C; Native API Wrapper: .NET, PHP, Java; JavaScript via WebAssembly | Windows, Linux, Android via Xamarin, iOS via Xamarin, Browser | Dynamsoft Barcode Reader SDK can read barcodes from more than 5 image formats and recognize barcodes from camera | more than 30 barcode types |
GdPicture.NET Barcode SDK [43] | ORPALIS | Proprietary, Royalty-free | Full | .NET | .NET | Library can write and read barcodes from almost 90 image and document formats [44] | more than 30 barcode types |
GNU Barcode [45] | 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 [46] | 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 [47] | 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 [48] barcode types |
KeepDynamic Barcode SDK [49] | 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 [50] | 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 [51] | Google API [52] | Read | Java, Objective-C, Swift | Android, iOS | ML Kit Barcode Scanning API can recognize barcodes from mobile camera | 13 barcode types | |
Neodynamic Barcode Professional [53] | 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 [54] barcode types / read: 12 [55] 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 [56] | 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 [57] | 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 [58] | 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 [59] | 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 [60] | 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 [61] | TechnoRiver | Proprietary, Royalty-free | Write | .NET | .NET | SmartCodeDeveloper SDK can write barcodes in 7 image formats | more than 30 barcode types |
Spire.Barcode [62] | 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 [63] 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 [64] | 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 [65] barcode types |
VintaSoft Barcode .NET SDK [66] | 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 [67] documents. | more than 60 barcode types |
Viziotix Barcode Decoder SDK [68] | 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 [69] |
VSBarcodeReader [70] | 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 [71] | 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 [72] | None | Public domain | Write | .NET | .NET | Zen Barcode Rendering Framework can write barcodes in 7 image formats | 9 barcode types |
Zint [73] | SourceForge | Apache 2.0, BSD, GNU GPLv3 | Write | C, .NET via ZintNET [74] port, Java via Okapi Barcode [75] port | Linux/Unix, Windows, Java, .NET | Can generate barcodes in 6 image formats [76] (depends on port) | more than 50 [77] barcode types |
ZXing [78] | 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 |
Barcodes is the way of adding machine reading tags to any object [79] 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 [80] [81]
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. [82]
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 [83] [84]
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. [85] 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. [86] [87] 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 [88] or PDF417, which can have difference width to height more than 64 times.
The Universal Product Code is a barcode symbology that is used worldwide for tracking trade items in stores.
A barcode or bar code is a method of representing data in a visual, machine-readable form. Initially, barcodes represented data by varying the widths, spacings and sizes of parallel lines. These barcodes, now commonly referred to as linear or one-dimensional (1D), can be scanned by special optical scanners, called barcode readers, of which there are several types.
A barcode reader or barcode scanner is an optical scanner that can read printed barcodes and send the data they contain to computer. Like a flatbed scanner, it consists of a light source, a lens, and a light sensor for translating optical impulses into electrical signals. Additionally, nearly all barcode readers contain decoder circuitry that can analyse the barcode's image data provided by the sensor and send the barcode's content to the scanner's output port.
PDF417 is a stacked linear barcode format used in a variety of applications such as transport, identification cards, and inventory management. "PDF" stands for Portable Data File. The "417" signifies that each pattern in the code consists of 4 bars and spaces in a pattern that is 17 units (modules) long. The PDF417 symbology was invented by Dr. Ynjiun P. Wang at Symbol Technologies in 1991. It is defined in ISO 15438.
Code 128 is a high-density linear barcode symbology defined in ISO/IEC 15417:2007. It is used for alphanumeric or numeric-only barcodes. It can encode all 128 characters of ASCII and, by use of an extension symbol (FNC4), the Latin-1 characters defined in ISO/IEC 8859-1. It generally results in more compact barcodes compared to other methods like Code 39, especially when the texts contain mostly digits. Code 128 was developed by the Computer Identics Corporation in 1981.
A QR code is a type of two-dimensional matrix barcode, invented in 1994, by Japanese company Denso Wave for labelling automobile parts. It features black squares on a white background with fiducial markers, readable by imaging devices like cameras, and processed using Reed–Solomon error correction until the image can be appropriately interpreted. The required data is then extracted from patterns that are present in both the horizontal and the vertical components of the QR image.
A Data Matrix is a two-dimensional code consisting of black and white "cells" or dots arranged in either a square or rectangular pattern, also known as a matrix. The information to be encoded can be text or numeric data. Usual data size is from a few bytes up to 1556 bytes. The length of the encoded data depends on the number of cells in the matrix. Error correction codes are often used to increase reliability: even if one or more cells are damaged so it is unreadable, the message can still be read. A Data Matrix symbol can store up to 2,335 alphanumeric characters.
GS1 is a not-for-profit, international organization developing and maintaining its own standards for barcodes and the corresponding issue company prefixes. The best known of these standards is the barcode, a symbol printed on products that can be scanned electronically.
The International Article Number is a standard describing a barcode symbology and numbering system used in global trade to identify a specific retail product type, in a specific packaging configuration, from a specific manufacturer. The standard has been subsumed in the Global Trade Item Number standard from the GS1 organization; the same numbers can be referred to as GTINs and can be encoded in other barcode symbologies, defined by GS1. EAN barcodes are used worldwide for lookup at retail point of sale, but can also be used as numbers for other purposes such as wholesale ordering or accounting. These barcodes only represent the digits 0–9, unlike some other barcode symbologies which can represent additional characters.
Mobile tagging is the process of providing data read from tags for display on mobile devices, commonly encoded in a two-dimensional barcode, using the camera of a camera phone as the reader device. The contents of the tag code is usually a URL for information addressed and accessible through Internet.
The GS1 Databar Coupon code has been in use in retail industry since the mid-1980s. At first, it was a UPC with system ID 5. Since UPCs cannot hold more than 12 digits, it required another barcode to hold additional information like offer code, expiration date and household ID numbers. Therefore, the code was often extended with an additional UCC/EAN 128 barcode. EAN 13 was sometimes used instead of UPC, and because it starts with 99, it was called the EAN 99 coupon barcode, and subsequently GS1 DataBar. After more than 20 years in use, there is now a need to encode more data for complex coupons, and to accommodate longer company IDs, so the traditional coupon code has become less efficient and sometimes not usable at all.
ZBar is an open-source C barcode reading library with C++, Python, Perl, and Ruby bindings. It is also implemented on Linux and Microsoft Windows as a command-line application, and as an iPhone application.
The application Barcode Scanner is an Android app, from the open-source project ZXing, that allows an Android device with imaging hardware to scan barcodes or 2D barcodes and retrieve the data encoded. Information encoded often includes web addresses, geographical coordinates, and small pieces of text, in addition to commercial product codes. This Android-based system has similar functionality to a hardware barcode reader.
Industrial 2 of 5. is a variable length, discrete, two width symbology. Industrial 2 of 5 is a subset of two-out-of-five codes.
Codablock is a family of stacked 1D barcodes which was invented in Identcode Systeme GmbH in Germany in 1989 by Heinrich Oehlmann. Codablock barcodes are based on stacked Code 39 and Code 128 symbologies and have some advantages of 2D barcodes.
Matrix 2 of 5 is a variable length, discrete, two width symbology. Matrix 2 of 5 is a subset of two-out-of-five codes. Unlike Industrial 2 of 5 code, Matrix 2 of 5 can encode data not only with black bars but with white spaces.
MicroPDF417 is two-dimensional (2D) stacked barcode symbology invented in 1996, by Frederick Schuessler, Kevin Hunter, Sundeep Kumar and Cary Chu from Symbol Technologies company. MicroPDF417 consists from specially encoded Row Address Patterns (RAP) columns and aligned to them Data columns encoded in "417" sequence which was invented in 1990. In 2006, the standard was registered as ISO/IEC 24728:2006.
Han Xin code is two-dimensional (2D) matrix barcode symbology invented in 2007 by Chinese company The Article Numbering Center of China to break monopoly of QR code. As QR code, Han Xin code consists of black squares and white square spaces arranged in a square grid on a white background. It has four finder patterns and other markers which allow to recognize it with camera-based readers. Han Xin code contains Reed–Solomon error correction with ability to read corrupted images. At this time, it is issued as ISO/IEC 20830:2021.
DotCode is two-dimensional (2D) matrix barcode invented in 2008 by Hand Held Products company to replace outdated Code 128. At this time, it is issued by Association for Automatic Identification and Mobility (AIM) as “ISS DotCode Symbology Specification 4.0”. DotCode consists of sparse black round dots and white spaces on white background. In case of black background round dots, creating barcode, can be white. DotCode was developed to use with high-speed industrial printers where printing accuracy can be low. Because DotCode by the standard does not require complicated elements like continuous lines or special shapes it can be applied with laser engraving or industrial drills.
Rectangular Micro QR Code is two-dimensional (2D) matrix barcode invented and standardized in 2022 by Denso Wave as ISO/IEC 23941. rMQR Code is designed as a rectangular variation of QR code and has the same parameters and applications as original QR code. But rMQR Code is more suitable for the rectangular areas and has difference between width and height up to 19 in R7x139 version. In this way it can be used in places where 1D barcodes are used. rMQR Code can replace Code 128 and Code 39 barcodes with more effective data encoding.