1Barcode::Industrial2of5U(s3e)r Contributed Perl DocumentaBtairocnode::Industrial2of5(3)
2
3
4
6 GD::Barcode::Industrial2of5 - Create Industrial2of5 barcode image with
7 GD
8
10 ex. CGI
11
12 use GD::Barcode::Industrial2of5;
13 binmode(STDOUT);
14 print "Content-Type: image/png\n\n";
15 print GD::Barcode::Industrial2of5->new('1234567890')->plot->png;
16
17 with Error Check
18
19 my $oGdBar = GD::Barcode::Industrial2of5->new('A12345678');
20 die $GD::Barcode::Industrial2of5::errStr unless($oGdBar); #Invalid Characters
21 $oGdBar->plot->png;
22
24 GD::Barcode::Industrial2of5 is a subclass of GD::Barcode and allows you
25 to create Industrial2of5 barcode image with GD.
26
27 new
28
29 $oGdBar = GD::Barcode::Industrial2of5->new($sTxt);
30
31 Constructor. Creates a GD::Barcode::Industrial2of5 object for $sTxt.
32 $sTxt has numeric characters([0-9]).
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::Industrial2of5->new('12345678');
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' and '0'. '1' means black,
52 '0' means white.
53
54 ex.
55 my $oGdB = GD::Barcode::Industrial2of5->new('12345678');
56 my $sPtn = $oGdB->barcode();
57
58 $errStr
59
60 $GD::Barcode::Industrial2of5::errStr
61
62 has error message.
63
64 $text
65
66 $oGdBar->{$text}
67
68 has barcode text based on $sTxt specified in new method.
69
71 Kawai Takanori GCD00051@nifty.ne.jp
72
74 The GD::Barocde::Industrial2of5 module is Copyright (c) 2000 Kawai
75 Takanori. Japan. All rights reserved.
76
77 You may distribute under the terms of either the GNU General Public
78 License or the Artistic License, as specified in the Perl README file.
79
81 GD::Barcode
82
83
84
85perl v5.8.8 2003-05-29 Barcode::Industrial2of5(3)