Since you didn't post any code I will show you the easiest way to use Zend barcode library in CodeIgniter. You can easily install it by using composer in CodeIgniter. This is how I implemented composer in CodeIgniter 3.It is very easy. You have to install composer on your machine download it from https://getcomposer.org/. After installing composer in your pc,
Copy and paste composer.json file in the project folder to application folder.
In the config.php file $config['composer_autoload'] = TRUE;
Now you have composer in your project. Now I will saw you how to install zend barcode using composer
Open cmd and direct to application folder
Inside application directory Type composer require zendframework/zend-barcode
Now a vendor folder will be created inside application folder and inside vendor folder you can see all your packages downloaded by composer.
Now since you autoloaded composer now you can just use the code given by zend barcode official manual like in your controllers.
function generatebarcode(){
$this->set_barcode("12345");
}
private function set_barcode($code)
{
$file = Barcode::draw('code128', 'image', array('text' => $code), array());
$store_image = imagepng($file,FCPATH."assets/barcode/{$code}.png");
}
Calling generatebarcode function by URL will create a 12345.png file in your assets/barcode folder.
Remember to avoid error you must also include use Zend\Barcode\Barcode;
before you open class in your controller.ie
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
use Zend\Barcode\Barcode;
class Welcome extends CI_Controller {
// rest of your class codes......