Chapter 24. Linear Barcodes (One Dimensional Barcodes)
| Part VI. Barcodes |

## Chapter 24. Linear Barcodes (One Dimensional Barcodes)

## Introduction

### Note

This module is only available in the pro-version of the library.

With the linear (One-dimensional) barcode extension it is possible to create bar codes using all the commonly accepted symbologies. The resulting bar code can be created as either an image (in PNG or JPEG format) or as a Postscript file ready for printing on high resolution printers.

The bar code extension provides extensive data verification which makes sure that the created barcode follows the official applicable standards.

### Note

All generated bar codes (except CODE 11 which have little support in Europe) have been extensively verified using Metrologic CCD-47 handhold scanner.

In order to create a linear barcode the module "`jpgraph_barcode.php`" must be included.

There are several types of linear barcode even though they all use the same principle. The reason for several different types (or symbologies as it is known) is partly to handle different requirements (for example encoding just numerical data or both numerical and alphabetical data) and partly because they were initially created by different companies to solve similar problems. The library supports most of the common linear barcode. These types of barcode look like what can be usually seen on consumer goods.

The different types of barcodes are often referred to as different symbologies.

Most of the commonly used symbologies has been elevated to ISO/IEC standards. Some barcode which have not yet been accepted as ISO standard are available from AIM (`http://www.aimglobal.org`). In USA the organization responsible for issuing retail codes used in barcodes are the Uniform Code Council, (UCC) `http://www.uc-council.org`.

While these standards are very comprehensive they are of little interest to end user of the barcode. For an end user the three most important question when selecting a barcode symbology are

1. What characters can be encoded in this symbology?

2. How efficient is the symbology, i.e. how large will the barcode be for a given input data string?

   Linear barcodes typically encode alphanumerical strings up to maximum of ~20 characters.

   ### Note

   While many of the barcode symbologies can handle, in theory unlimited, string lengths there are practical limitation to how wide barcode a given reader/scanner can interpret. Most handhold scanners can usually not reliable read a barcode wider than ~10cm.

3. How strong is the tolerance against physical damage, i.e. how large percentage of the barcode can be destroyed while still be readable by a scanner?

   The tolerance for linear barcode are in general low. If one ore more of the bars (making up the barcode) is unreadable the whole barcode is in practice unreadable. While some barcode symbologies include a check digit this is not enough to re-create damaged data. It is only enough to verify with some confidence that the data is intact, however there is still no guarantee since two errors might, by coincidence, make the check digit correct.

   A common way to strengthen linear barcodes is to make them physically larger/taller.

While linear barcodes is still widely used in legacy applications there are almost no new applications that uses linear barcode due in part to the limitations listed above (poor fault tolerance and low capacity). Most new applications uses either RFID tags or two dimensional barcodes (described in the following chapters) which have much higher data capacity and fault tolerance.

| Up |
| Home |