README for Barcode::Code128 - Generate CODE 128 bar codes
Barcode::Code128 generates bar codes using the CODE 128 symbology.
It can generate images in PNG or GIF format using the GD package,
or it can generate a text string representing the barcode that you
can render using some other technology if desired.
The intended use of this module is to create a web page with a bar
code on it, which can then be printed out and faxed or mailed to
someone who will scan the bar code. The application which spurred
its creation was an expense report tool, where the employee
submitting the report would print out the web page and staple the
receipts to it, and the Accounts Payable clerk would scan the bar
code to indicate that the receipts were received.
The default settings for this module produce a large image that
can safely be FAXed several times and still scanned easily. If
this requirement is not important you can generate smaller image
using optional parameters.
If you wish to generate images with this module you must also have
the GD.pm module (written by Lincoln Stein, and available from
CPAN) installed. Version 1.20 or higher of GD generates a PNG
file, due to issues with the GIF patent. If you want to create a
GIF, you must use version 1.19 or earlier of GD. However, most
browsers have no trouble with PNG files.
If the GD module is not present, you can still use the module, but
you will not be able to use its functions for generating images.
You can use the barcode() method to get a string of "#" and " "
(hash and space) characters, and use your own image-generating
routine with that as input.
To use the the GD module, you will need to install it along with
this module. You can obtain it from the CPAN (Comprehensive Perl
Archive Network) repository of your choice under the directory
"authors/id/LDS". Visit http://www.cpan.org/ for more information
about CPAN. The GD home page is:
$object = new Barcode::Code128;
print "Content-Type: image/png\n\n";
AUTHOR: William R. Ward, email@example.com
TERMS: This module is placed into the public domain. You are free to
use, modify, or redistribute this module in any way for commercial
or other uses. My only request is that if you change it, please
submit copies of your changed code (or diffs) so that I can
incorporate them into the version on CPAN. Also, in order to
reduce the likelihood of confusion please do not distribute a
modified version of this module unless you change the name first.
Version 2.01, 17-Jul-2007 - Fix tests as reported in
Version 2.0, 28-May-2001 - Generate either PNG or GIF, or neither,
depending on what version of GD is installed; lots of
optional parameters added; minor bug fixes
Version 1.11, 29-Oct-1999 - Fix bug in test script
Version 1.10, 26-Oct-1999 - Generate PNG instead of GIF files
Version 1.01, 19-Jul-1999 - Bug fix to deal with inputs ending in zero
Version 1.00, 8-Mar-1999 - Initial version.