1D Package

Contains multiple formats of 1D barcodes.
Some barcodes encode numbers better whereas some encode letters better.
A label can be added to each barcode to help human readability.
Easy to decode by hand, you should consider 2D barcodes if you want to obfuscate data.

Demonstration

* 200 character limit for this demo.

<?php
require_once('class/BCGColor.php');
require_once('class/BCGDrawing.php');
require_once('class/BCGcode128.barcode2d.php');

$colorFront = new BCGColor(0, 0, 0);
$colorBack = new BCGColor(255, 255, 255);

// Barcode Part
$code = new BCGcode128();
$code->setScale(2);
$code->setColor($colorFront, $colorBack);
$code->parse('123987');

// Drawing Part
$drawing = new BCGDrawing('', $colorBack);
$drawing->setBarcode($code);
$drawing->draw();

header('Content-Type: image/png');

$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>

Technical Specifications

All the barcode specifications supported by Barcode Bakery are presented here with their respective supported characters and how you can implement them.

[0-9] means the numbers between 0 and 9 are supported.

[A-Z] means the letters between A and Z are supported.

  • Codabar BCGcodabar
    • Supports: [0-9], [A-D], - $ : / . +
    • Must start and end with a letter
    • Contains an auto-checksum, no manual checksum number
  • Code 11 BCGcode11
    • Supports: [0-9], -
    • Rarely used
    • Contains auto-checksum numbers
  • Code 39 BCGcode39
    • Supports: [0-9], [A-Z], - . $ / + % [SPACE]
    • Commonly used, many uses
    • Optional checksum number
    • Resulting barcode is large
  • Code 39 Extended BCGcode39extended
    • Supports: [0-9], [A-Z], - . $ / + % [SPACE] + ASCII 0-127
    • The extension of this barcode is optional. You must specify your reader to read Code 39 Extended.
  • Code 93 BCGcode93
    • Supports: [0-9], [A-Z], - . $ / + % [SPACE] + ASCII 0-127
    • Similar to Code 39 but less commonly used
    • Supports ASCII 0-127 and is not optional as with Code 39
    • Higher density
  • Code 128 BCGcode128
    • Supports: [0-9], [a-z,A-Z], all characters
    • Contains 3 tables to better encode data
    • Groups numbers by two for better compression
  • EAN-8 BCGean8
    • Supports: [0-9]
    • Encodes 8 numbers with a checksum number
    • It is the EAN-13 short version
    • You must obtain a number with a license to use in the public
  • EAN-13 BCGean13
    • Supports: [0-9]
    • Encodes 12 numbers with a checksum number
    • It is the UPC-A extension which adds the country code
    • You must obtain a number with a license to use in the public
  • GS1-128 (EAN-128) BCGgs1128
    • Supports: [0-9], [a-z,A-Z], all characters
    • Follows strict specifications for packaging
  • ISBN-10 / ISBN-13 BCGisbn
    • Supports: [0-9]
    • Based on EAN-13, used for books
  • Interleaved 2 of 5 BCGi25
    • Supports: [0-9]
    • Based on Standard 2 of 5
    • Optional checksum number
  • Standard 2 of 5 BCGs25
    • Supports: [0-9]
    • Harder for readers to utilize because of the lower density
    • Optional checksum number
  • MSI Plessey BCGmsi
    • Supports: [0-9]
    • Frequently used for inventory
    • Optional checksum number
  • UPC-A BCGupca
    • Supports: [0-9]
    • Encoded like EAN-13
    • Encodes 11 numbers with a checksum number
    • The numbers depends on what you sell
    • You must obtain a number with a license to use in the public
  • UPC-E BCGupce
    • Supports: [0-9]
    • Short version of UPC-A
    • Encodes 7 numbers with a checksum number
    • The numbers depends on what you sell
    • You must obtain a number with a license to use in the public
  • UPC Extension 2 BCGupcext2
    • Supports: [0-9]
    • Contains 2 characters
    • Indicates more information about the product
    • Must be joined to a UPC or EAN symbol
  • UPC Extension 5 BCGupcext5
    • Supports: [0-9]
    • Contains 5 characters
    • Usually indicates the suggested price of the product
    • Must be joined to a UPC or EAN symbol
  • PostNet BCGpostnet
    • Supports: [0-9]
    • Contains either 5, 9 or 11 numbers
    • Used to encode envelopes in the United States
  • Intelligent Mail BCGintelligentmail
    • Supports: [0-9]
    • Contains a barcode identifier, service type identifier, mailer id and serial number
    • Contains also either 5, 9 or 11 numbers
    • Used to encode envelopes in the United States
  • Other BCGothercode
    • Supports: [0-9]
    • Create your own barcode
    • Add the desired text