Yii 1.1: barcode-generator

Simple class for Generating Barcodes
11 followers

Simple extension to generate barcode images conveniently.

Usage

Step 1: Put the barcode folder into your framework extensions directory.

Step 2: Use it as below when creating a barcode image.

//Widht of the barcode image. 
$width  = 284;  
//Height of the barcode image.
$height = 184;
//Quality of the barcode image. Only for JPEG.
$quality = 100;
//1 if text should appear below the barcode. Otherwise 0.
$text =1;
// Location of barcode image storage.
$location = Yii::getPathOfAlias("webroot").'/bc';
 
Yii::import("application.extensions.barcode.*");                      
barcode::Barcode39('some text', $width , $height , $quality, $text, $location);

Sample

sample barcode

Credits

Charles J. Scheffold - cs@sid6581.net

Total 2 comments

#17135 report it
arronlee at 2014/05/06 10:49pm
Thanks

Thanks for sharing the info. I have only tested another Barcode generator offered by YG to create barcodes with the help of its free trial package. Here are its barcode generating tutorials. I wonder whether there are some differences between them? Which one is much more convenient?

#11834 report it
Yiivgeny at 2013/02/06 04:23pm
Why?

Why third-party library without changes and adaptation to Yii named "extension"?

Leave a comment

Please to leave your comment.

Create extension
Downloads