I have generated barcode
using zend barcode
and out it in a kohana 3.3.1 controller
and it looks like this.
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Barcode extends Controller_Base {
public function after()
{
$this->response->headers('Content-Type','image/gif');
parent::after();
}
public function action_Letter()
{
Helper_Barcode::generate_barcode(Enum_Post::LETTER);
}
}
It works great on view sites but when I'm using it in mpdf view
like:
<div><img src="/Barcode/Letter"></div>
It gives me error:
mPDF error: IMAGE Error (/Barcode/Letter): Error parsing image file - image type not recognised, and not supported by GD imagecreate
Anyone know what may be wrong?