1Barcode::Code39(3) User Contributed Perl Documentation Barcode::Code39(3)
2
3
4
6 GD::Barcode::Code39 - Create Code39 barcode image with GD
7
9 ex. CGI
10
11 use GD::Barcode::Code39;
12 binmode(STDOUT);
13 print "Content-Type: image/png\n\n";
14 print GD::Barcode::Code39->new('*CODE39IMG*')->plot->png;
15
16 with Error Check
17
18 my $oGdBar = GD::Barcode::Code39->new('*123456789;*');
19 die $GD::Barcode::Code39::errStr unless($oGdBar); #Invalid Characters
20
22 GD::Barcode::Code39 is a subclass of GD::Barcode and allows you to cre‐
23 ate CODE-39 barcode image with GD. This module based on "Generate Bar‐
24 code Ver 1.02 By Shisei Hanai 97/08/22".
25
26 new
27
28 $oGdBar = GD::Barcode::Code39->new($sTxt);
29
30 Constructor. Creates a GD::Barcode::Code39 object for $sTxt.
31
32 plot()
33
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::Code39->new('*12345*');
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
47 $sPtn = $oGdBar->barcode();
48
49 returns a barcode pattern in string with '1' and '0'. '1' means black,
50 '0' means white.
51
52 ex.
53 my $oGdB = GD::Barcode::Code39->new('*12345*');
54 my $sPtn = $oGdB->barcode();
55 # $sPtn = '';
56
57 $errStr
58
59 $GD::Barcode::Code39::errStr
60
61 has error message.
62
63 $text
64
65 $oGdBar->{text}
66
67 has barcode text based on $sTxt specified in new method.
68
70 Kawai Takanori GCD00051@nifty.ne.jp
71
73 The GD::Barocde::Code39 module is Copyright (c) 2000 Kawai Takanori.
74 Japan. All rights reserved.
75
76 You may distribute under the terms of either the GNU General Public
77 License or the Artistic License, as specified in the Perl README file.
78
80 GD::Barcode
81
82
83
84perl v5.8.8 2003-05-29 Barcode::Code39(3)