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


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