0
我正在使用codeigniter并创建一个用于生成和下载pdf的功能。 当我在本地主机上实现它的工作非常好。 但它不是活的服务器上的工作(其未服用阵列(宽度=> 550)。 我在赶时间,请帮我在此先感谢 这里是我的代码,请检查一下在codeigniter中创建并下载pdf
public function invoice_pfd(){
$this->load->library('cezpdf');
$this->load->helper('pdf');
prep_pdf(); // creates the footer for the document we are creating.
$db_data[] = array('name' => 'Jon Doe', 'phone' => '111-222-3333', 'email' => '[email protected]');
$db_data[] = array('name' => 'Jane Doe', 'phone' => '222-333-4444', 'email' => '[email protected]');
$db_data[] = array('name' => 'Jon Smith', 'phone' => '333-444-5555', 'email' => '[email protected]');
$col_names = array(
'name' => 'Name',
'phone' => 'Phone Number',
'email' => 'E-mail Address'
);
$this->cezpdf->ezTable($db_data, $col_names, 'My Invoice', array('width' => 1550));
$this->cezpdf->ezStream();
//$data['social'] = $this->Business_model->social_data();
}
您有错误?我们可以工作的东西? –
不,没有任何错误它的工作正常,但它没有采取宽度。 –
请按照本教程 - http://christophermonnat.com/blog/generating-pdf-files-using-codeigniter –