GD::Ba...e::EAN8(3pm)
π NAME π
okay bestie, welcome to GD::Barcode::EAN8(3pm)</p> from the User Contributed Perl Documentation β yes, the header calls it GD::Ba...e::EAN8(3pm)</p> because the title got squished, but it's fr fr the same page. It's giving:
GD::Barcode::EAN8 β Create EAN8(JAN8) barcode image with GD π
β¨ SYNOPSIS β¨
ex. CGI
use GD::Barcode::EAN8;
binmode(STDOUT);
print "Content-Type: image/png\n\n";
print GD::Barcode::EAN8->new('1234567')->plot->png;
with Error Check
my $oGdBar = GD::Barcode::EAN8->new('123456789');
die $GD::Barcode::EAN8::errStr unless($oGdBar); #Invalid Length
bestie notice how that error-checking one is tryna build from'123456789'β¦ bestie that is 9 characters and that is literally why the#Invalid Lengthcomment is sitting right there π thedieis doing its job.
π¦ DESCRIPTION π¦
GD::Barcode::EAN8</p> is a subclass of GD::Barcode</p> and it lets you create EAN8(JAN8) barcode images with GD. No cap, it does the whole thing for you. π
This module is based on "Generate Barcode Ver 1.02 By Shisei Hanai 97/08/22" β shoutout to the origin, periodt. π
π new π
$oGdBar = GD::Barcode::EAN8->new($sTxt);
Constructor energy. β¨ This creates a GD::Barcode::EAN8 object for $sTxt.
$sTxt has 7 or 8 numeric characters ([0-9]). And if $sTxt has 12 characters, this module calacurates CD for you. π
πΈ plot() πΈ
$oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]);
This one creates a GD object with the barcode image for the $sTxt you specified in the new method. πΌοΈ
$iHeightis the height of the image.- If
NoTextis1, the image has no text image of$sTxt.
ex.
my $oGdB = GD::Barcode::EAN8->new('1234567');
my $oGD = $oGdB->plot(NoText=>1, Height => 20);
# $sGD is a GD image with Height=>20 pixels, with no text.
bestie the comment says$sGDbut the variable up top is$oGDβ not me noticing, iykyk, i'm just saying it out loud and staying out of it π
π barcode() π
$sPtn = $oGdBar->barcode();
Returns a barcode pattern in a string made of '1', 'G' and '0'. Here's the tea: π
'1'means black'G'also means black but a little bit long π'0'means white
ex.
my $oGdB = GD::Barcode::EAN8->new('1234567');
my $sPtn = $oGdB->barcode();
# $sPtn = '';
π§ $errStr π§
$GD::Barcode::EAN8::errStr
This one has the error message. Yes, it's a package variable, yes you check it when new fails, no we don't make the rules. π
β $text β
$oGdBar->{$text}
This one has the barcode text based on the $sTxt you specified in the new method. β¨
π AUTHOR π
Kawai Takanori GCD00051@nifty.ne.jp β iconic, we thank them for their service π«Ά
π COPYRIGHT π
The GD::Barocde::EAN8</p> module is Copyright (c) 2000 Kawai Takanori. Japan. All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. π
π₯ SEE ALSO π₯
GD::Barcode</p>
aaaaand that's the whole thing bestie, you ate it, no crumbs. πβ¨ This page ships with perl v5.40.1 and is dated 2025-10-27 β so go make some barcodes, you absolute main character. π
ππ¦
π¦ where this page comes from
- ubuntu resolute: libgd-barcode-perl 2.02-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu stonking: libgd-barcode-perl 2.02-1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms