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

NAME

6       GD::Barcode::UPCE - Create UPC-E barcode image with GD
7

SYNOPSIS

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

DESCRIPTION

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

AUTHOR

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

SEE ALSO

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