NAME

GD::Barcode::Code93 - Create Code93 barcode image with GD

SYNOPSIS

ex. CGI

use GD::Barcode::Code93;
binmode(STDOUT);
print "Content-Type: image/png\n\n";
print GD::Barcode::Code93->new('text')->plot->png;

with Error Check

my $barcode = GD::Barcode::Code93->new('text');
die $GD::Barcode::Code93::error_string unless($barcode);     #Invalid Characters

DESCRIPTION

GD::Barcode::Code93 is a subclass of GD::Barcode and allows you to create CODE-39 barcode image with GD. This module based on "Generate Barcode Ver 1.02 By Shisei Hanai 97/08/22".

new

$barcode = GD::Barcode::Code93->new($text);

Constructor. Creates a GD::Barcode::Code93 object for $text.

plot()

$gd = $barcode->plot([Height => $height, NoText => 0 | 1]);

creates GD object with barcode image for the $text specified at new method. $height is height of the image. If NoText is 1, the image has no text image of $sTxt.

ex.
 my $barcode = GD::Barcode::Code93->new('12345');
 my $gd = $barcode->plot(NoText=>1, Height => 20);
 # $sGD is a GD image with Height=>20 pixels, with no text.

barcode()

$barcode_pattern = $oGdBar->barcode();

returns a barcode pattern in string with '1' and '0'. '1' means black, '0' means white.

ex.
 my $barcode = GD::Barcode::Code93->new('*12345*');
 my $barcode_pattern = $oGdB->barcode();

$error_string

$GD::Barcode::Code93::error_string

has error message.

$text

$oGdBar->{text}

has barcode text based on $text specified in new method.

AUTHOR

Chris DiMartino chris DOT dimartino AT gmail DOT com

COPYRIGHT

The GD::Barcode::Code93 module is based on code provided by Kawai Takanori. Japan. The GD::Barcode::Code93 module was written by Chris DiMartino, 2004. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

SEE ALSO

GD::Barcode