0
我生成了barcode
使用zend barcode
並在kohana 3.3.1 controller
它看起來像這樣。在mpdf生成的圖片
<?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);
}
}
它可以在視圖站點很大,但是當我使用它在mpdf view
像:
<div><img src="/Barcode/Letter"></div>
它給我的錯誤:
mPDF error: IMAGE Error (/Barcode/Letter): Error parsing image file - image type not recognised, and not supported by GD imagecreate
任何人都知道什麼可能是錯的?