Simple extension to generate barcode images conveniently.
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);

Charles J. Scheffold - cs@sid6581.net
Total 6 comments
Ok no problem. Have a great day!
Yeah. It was the parameter all right. For some reason the attributes got messed up somewhere.
Thanks for the idea.
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)
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?
Why third-party library without changes and adaptation to Yii named "extension"?
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 login to leave your comment.