1Barcode::EAN13(3)     User Contributed Perl Documentation    Barcode::EAN13(3)
2
3
4

NAME

6       GD::Barcode::EAN13 - Create EAN13(JAN13) barcode image with GD
7

SYNOPSIS

9       ex. CGI
10
11         use GD::Barcode::EAN13;
12         binmode(STDOUT);
13         print "Content-Type: image/png\n\n";
14         print GD::Barcode::EAN13->new('123456789012')->plot->png;
15
16       with Error Check
17
18         my $oGdBar = GD::Barcode::EAN13->new('123456789');
19         die $GD::Barcode::EAN13::errStr unless($oGdBar);      #Invalid Length
20

DESCRIPTION

22       GD::Barcode::EAN13 is a subclass of GD::Barcode and allows you to cre‐
23       ate EAN13(JAN13) barcode image with GD.  This module based on "Generate
24       Barcode Ver 1.02 By Shisei Hanai 97/08/22".
25
26       new
27
28       $oGdBar = GD::Barcode::EAN13->new($sTxt);
29
30       Constructor.  Creates a GD::Barcode::EAN13 object for $sTxt.  $sTxt has
31       12 or 13 numeric characters([0-9]).  If $sTxt has 12 characters, this
32       module calacurates CD for you.
33
34       plot()
35
36       $oGd = $oGdBar->plot([Height => $iHeight, NoText => 0  1]);
37
38       creates GD object with barcode image for the $sTxt specified at new
39       method.  $iHeight is height of the image. If NoText is 1, the image has
40       no text image of $sTxt.
41
42        ex.
43         my $oGdB = GD::Barcode::EAN13->new('123456789012');
44         my $oGD = $oGdB->plot(NoText=>1, Height => 20);
45         # $sGD is a GD image with Height=>20 pixels, with no text.
46
47       barcode()
48
49       $sPtn = $oGdBar->barcode();
50
51       returns a barcode pattern in string with '1', 'G' and '0'.  '1' means
52       black, 'G' also means black but little bit long, '0' means white.
53
54        ex.
55         my $oGdB = GD::Barcode::EAN13->new('123456789012');
56         my $sPtn = $oGdB->barcode();
57         # $sPtn = '';
58
59       $errStr
60
61       $GD::Barcode::EAN13::errStr
62
63       has error message.
64
65       $text
66
67       $oGdBar->{$text}
68
69       has barcode text based on $sTxt specified in new method.
70

AUTHOR

72       Kawai Takanori GCD00051@nifty.ne.jp
73
75       The GD::Barocde::EAN13 module is Copyright (c) 2000 Kawai Takanori.
76       Japan.  All rights reserved.
77
78       You may distribute under the terms of either the GNU General Public
79       License or the Artistic License, as specified in the Perl README file.
80

SEE ALSO

82       GD::Barcode
83
84
85
86perl v5.8.8                       2003-05-29                 Barcode::EAN13(3)
Impressum