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 $oGdBar = GD::Barcode::Industrial2of5->new($sTxt);
29
30 Constructor. Creates a GD::Barcode::Industrial2of5 object for $sTxt.
31 $sTxt has numeric characters([0-9]).
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::Industrial2of5->new('12345678');
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' and '0'. '1' means black,
49 '0' means white.
50
51 ex.
52 my $oGdB = GD::Barcode::Industrial2of5->new('12345678');
53 my $sPtn = $oGdB->barcode();
54
55 $errStr
56 $GD::Barcode::Industrial2of5::errStr
57
58 has error message.
59
60 $text
61 $oGdBar->{$text}
62
63 has barcode text based on $sTxt specified in new method.
64
66 Kawai Takanori GCD00051@nifty.ne.jp
67
69 The GD::Barocde::Industrial2of5 module is Copyright (c) 2000 Kawai
70 Takanori. Japan. All rights reserved.
71
72 You may distribute under the terms of either the GNU General Public
73 License or the Artistic License, as specified in the Perl README file.
74
76 GD::Barcode
77
78
79
80perl v5.38.0 2023-07-20 Barcode::Industrial2of5(3)