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

NAME

6       GD::Barcode::EAN8 - Create EAN8(JAN8) barcode image with GD
7

SYNOPSIS

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

DESCRIPTION

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

AUTHOR

67       Kawai Takanori GCD00051@nifty.ne.jp
68
70       The GD::Barocde::EAN8 module is Copyright (c) 2000 Kawai Takanori.
71       Japan.  All rights reserved.
72
73       You may distribute under the terms of either the GNU General Public
74       License or the Artistic License, as specified in the Perl README file.
75

SEE ALSO

77       GD::Barcode
78
79
80
81perl v5.30.0                      2019-07-26                  Barcode::EAN8(3)
Impressum