我想問如何將excel轉換爲pdf?codeigniter將excel文件轉換爲pdf
我想提出5個Excel文件後,我在轉換鍵上傳至1個PDF?
現在我在此代碼中使用:
/**
* Example: DOMPDF
*
* Documentation:
* http://code.google.com/p/dompdf/wiki/Usage
*
*/
public function index() {
// Load all views as normal
$this->load->view('test');
// Get output html
$html = $this->output->get_output();
// Load library
$this->load->library('dompdf_gen');
// Convert to PDF
$this->dompdf->load_html($html);
$this->dompdf->render();
$this->dompdf->stream("welcome.pdf");
}
庫:
類Dompdf_gen {
public function __construct() {
require_once APPPATH.'third_party/dompdf/dompdf_config.inc.php';
$pdf = new DOMPDF();
$CI =& get_instance();
$CI->dompdf = $pdf;
}
}
可能重複,這個答案可能會幫助你http://stackoverflow.com/questions/23223491/how-to-convert-xls-to-pdf-via-php – veedubrob2014 2014-10-08 16:12:34
我看到帖子但我不明白關於我的代碼ii上傳文件的Excel和我打開文件後,從Excel中取出數據並放在PDF中這可能嗎? – idan003 2014-10-09 07:23:01