barcode-generator

Simple class for Generating Barcodes
7 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 6 comments

#12978 report it
Azy at 2013/04/25 01:42am
@jlagare

Ok no problem. Have a great day!

#12977 report it
jlagare at 2013/04/25 01:30am
Hi azy,

Yeah. It was the parameter all right. For some reason the attributes got messed up somewhere.

Thanks for the idea.

#12976 report it
Azy at 2013/04/24 11:42pm
Hi jlagare,

Can you please tell me what are the param values you sent to the function 'Barcode39'. it seems like the image you are trying to generate is too small.

ex : Barcode39('some text', $width , $height , $quality, $text, $location)

#12968 report it
jlagare at 2013/04/24 04:54am
OutputImage function not found

When I was trying to generate a barcode image, I was given a Call to undefined function OutputImage()error. I tried looking for it in PHP GD but cannot find it.

Could you tell me how to solve this?

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

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

#11833 report it
realtebo at 2013/02/06 03:51pm
A demo?

Every extension writer could prepare a demo or a least a screenshot if the extension provide some kind of output not easily 'imaginable' :)

Leave a comment

Please to leave your comment.

Create extension
Downloads