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

NAME

6       GD::Barcode - Create 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->new('EAN13', '123456789012')->plot->png;
15
16       with Error Check
17
18         my $oGdBar = GD::Barcode->new('EAN13', '12345678901');
19         die $GD::Barcode::errStr unless($oGdBar);     #Invalid Length
20         $oGdBar->plot->png;
21

DESCRIPTION

23       GD::Barcode is a subclass of GD and allows you to create barcode image
24       with GD.  This module based on "Generate Barcode Ver 1.02 By Shisei
25       Hanai 97/08/22".
26
27       From 1.14, you can use this module even if no GD (except plot method).
28
29   new
30       $oGdBar = GD::Barcode::UPCE->new($sType, $sTxt);
31
32       Constructor.  Creates a GD::Barcode::$sType object for $sTxt.
33
34   plot()
35       $oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]);
36
37       creates GD object with barcode image for the $sTxt specified at new
38       method.  $iHeight is height of the image. If NoText is 1, the image has
39       no text image of $sTxt.
40
41        ex.
42         my $oGdB = GD::Barcode->new('EAN13', '123456789012');
43         my $oGD = $oGdB->plot(NoText=>1, Height => 20);
44         # $sGD is a GD image with Height=>20 pixels, with no text.
45
46   barcode()
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->new('UPCE', '123456789012');
54         my $sPtn = $oGdB->barcode();
55         # $sPtn = '';
56
57   $errStr
58       $GD::Barcode::errStr
59
60       has error message.
61
62   $text
63       $oGdBar->{$text}
64
65       has barcode text based on $sTxt specified in new method.
66

AUTHOR

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

SEE ALSO

78       GD GD::Barcode subclasses
79
80
81
82perl v5.36.0                      2023-01-20                        Barcode(3)
Impressum