{
    "mode": "perldoc",
    "parameter": "GD::Barcode",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/GD%3A%3ABarcode/json",
    "generated": "2026-05-30T19:08:18Z",
    "synopsis": "*ex. CGI*\nuse GD::Barcode::UPCE;\nbinmode(STDOUT);\nprint \"Content-Type: image/png\\n\\n\";\nprint GD::Barcode->new('EAN13', '123456789012')->plot->png;\n*with Error Check*\nmy $oGdBar = GD::Barcode->new('EAN13', '12345678901');\ndie $GD::Barcode::errStr unless($oGdBar);     #Invalid Length\n$oGdBar->plot->png;",
    "sections": {
        "NAME": {
            "content": "GD::Barcode - Create barcode image with GD\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "*ex. CGI*\n\nuse GD::Barcode::UPCE;\nbinmode(STDOUT);\nprint \"Content-Type: image/png\\n\\n\";\nprint GD::Barcode->new('EAN13', '123456789012')->plot->png;\n\n*with Error Check*\n\nmy $oGdBar = GD::Barcode->new('EAN13', '12345678901');\ndie $GD::Barcode::errStr unless($oGdBar);     #Invalid Length\n$oGdBar->plot->png;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "GD::Barcode is a subclass of GD and allows you to create barcode image\nwith GD. This module based on \"Generate Barcode Ver 1.02 By Shisei Hanai\n97/08/22\".\n\nFrom 1.14, you can use this module even if no GD (except plot method).\n\nnew\n*$oGdBar* = GD::Barcode::UPCE->new(*$sType*, *$sTxt*);\n\nConstructor. Creates a GD::Barcode::*$sType* object for *$sTxt*.\n\nplot()\n*$oGd* = $oGdBar->plot([Height => *$iHeight*, NoText => *0 | 1*]);\n\ncreates GD object with barcode image for the *$sTxt* specified at new\nmethod. *$iHeight* is height of the image. If *NoText* is 1, the image\nhas no text image of *$sTxt*.\n\nex.\nmy $oGdB = GD::Barcode->new('EAN13', '123456789012');\nmy $oGD = $oGdB->plot(NoText=>1, Height => 20);\n# $sGD is a GD image with Height=>20 pixels, with no text.\n\nbarcode()\n*$sPtn* = $oGdBar->barcode();\n\nreturns a barcode pattern in string with '1' and '0'. '1' means black,\n'0' means white.\n\nex.\nmy $oGdB = GD::Barcode->new('UPCE', '123456789012');\nmy $sPtn = $oGdB->barcode();\n# $sPtn = '';\n\n$errStr\n$GD::Barcode::errStr\n\nhas error message.\n\n$text\n$oGdBar->{$text}\n\nhas barcode text based on *$sTxt* specified in new method.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Kawai Takanori GCD00051@nifty.ne.jp\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "The GD::Barocde module is Copyright (c) 2000 Kawai Takanori. Japan. All\nrights reserved.\n\nYou may distribute under the terms of either the GNU General Public\nLicense or the Artistic License, as specified in the Perl README file.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "GD GD::Barcode subclasses\n",
            "subsections": []
        }
    },
    "summary": "GD::Barcode - Create barcode image with GD",
    "flags": [],
    "examples": [],
    "see_also": []
}