Catalyst::View::GD::Barcode - make it easy to use GD::Barcode in Catalyst's View
Set string to be converted to barcode.
$c->stash->{'barcode_string'} = '123456';
Set barcode type. The default is 'NW7'.
$c->stash->{'barcode_type'} = 'NW7'; COOP2of5 | Code39 | EAN13 | EAN8 | IATA2of5 | ITF | Industrial2of5 | Matrix2of5 | NW7 | QRcode
Set barcode size option.
$c->stash->{'barcode_size'} = 10; When the number of digit is insufficient, it buries by 0.
Set content type option. The default is 'png'.
$c->stash->{'content_type'} = 'png'; png | gif | jpeg
Set any other GD::Barcode options.
$c->stash->{'barcode_option'} = {NoText => 1}
Print the barcode.
$c->forward('Catalyst::View::GD::Barcode');
Generate barcode using GD::Barcode. You only need to set string and barcode type and no need to bother anything else. If it fails, it returns the string in plain text.
Set code in $c->res->body().
Returns the calculated check digit.
Catalyst
Toshimitu Yanagisawa, yanagisawa@shanon.co.jp
yanagisawa@shanon.co.jp
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::View::GD::Barcode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::View::GD::Barcode
CPAN shell
perl -MCPAN -e shell install Catalyst::View::GD::Barcode
For more information on module installation, please visit the detailed CPAN module installation guide.