GD::Ba...:Code39(3pm)
π GD::Barcode::Code39 π
okay bestie, so this is a page from the User Contributed Perl Documentation β and it's literally the manual for GD::Barcode::Code39(3pm), your go-to for making Code39 barcodes with GD. no cap.
β¨ NAME β¨
GD::Barcode::Code39 β create Code39 barcode image with GD. that's the whole vibe. π
πΈ SYNOPSIS πΈ
ex. CGI
use GD::Barcode::Code39;
binmode(STDOUT);
print "Content-Type: image/png\n\n";
print GD::Barcode::Code39->new('*CODE39IMG*')->plot->png;
with Error Check
my $oGdBar = GD::Barcode::Code39->new('*123456789;*');
die $GD::Barcode::Code39::errStr unless($oGdBar); #Invalid Characters
see how it dies if the chars aren't valid? that's the error check, periodt. π
π¦ DESCRIPTION π¦
GD::Barcode::Code39 is a subclass of GD::Barcode, and it lets you create CODE-39 barcode images with GD. it's giving "small module, big power" honestly.
this module is based on "Generate Barcode Ver 1.02 By Shisei Hanai 97/08/22" β shoutout to the original icon, we stan. π
π new
$oGdBar = GD::Barcode::Code39->new($sTxt);
Constructor hours!! β¨ this creates a GD::Barcode::Code39 object for $sTxt. that's it, that's the job.
π plot()
$oGd = $oGdBar->plot([Height => $iHeight, NoText => 0 | 1]);
this one creates a GD object with the barcode image for the $sTxt you specified back in the new method. $iHeight is the height of the image. and if NoText is 1, the image has no text image of $sTxt. so like, barcode only, no caption. π
ex.
my $oGdB = GD::Barcode::Code39->new('*12345*');
my $oGD = $oGdB->plot(NoText=>1, Height => 20);
# $sGD is a GD image with Height=>20 pixels, with no text.
π barcode()
$sPtn = $oGdBar->barcode();
returns a barcode pattern as a string made of '1' and '0'. '1' means black, '0' means white. no in-between, just binarycore. π€π€
ex.
my $oGdB = GD::Barcode::Code39->new('*12345*');
my $sPtn = $oGdB->barcode();
# $sPtn = '';
π $errStr
$GD::Barcode::Code39::errStr
has error message. yep, that's where the drama lives when something goes wrong. π
π $text
$oGdBar->{text}
has barcode text based on $sTxt specified in the new method. it's literally holding your original string for you. π«Ά
π AUTHOR π
Kawai Takanori GCD00051@nifty.ne.jp
π COPYRIGHT π
The GD::Barocde::Code39 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
and that's the whole page, babe π this cutie is from perl v5.40.1, dated 2025-10-27, filed under GD::Barcode::Code39(3pm) β go make some barcodes, bestie, you're gonna slay π
β¨
π¦ 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