zend framework load pdf Error:with message 'Cross-reference streams are not supp
时间:2010-11-16 来源:春哥也编程
public static function load($source = null, $revision = null)
{
return new Dhr_Pdf($source, $revision, true);
}
然后通过$pdf = Dhr_Pdf::load($SalesPDfpath);进行访问的时候出现错误
The following error occurred:
exception 'Zend_Pdf_Exception' with message 'Cross-reference streams are not supported yet.' in C:\Users\n.zhang\Documents\Tools\library\Zend\Pdf\Parser.php:331 Stack trace: #0 C:\Users\n.zhang\Documents\Tools\library\Zend\Pdf\Parser.php(455): Zend_Pdf_Parser->_loadXRefTable('116') #1 C:\Users\n.zhang\Documents\Tools\library\Zend\Pdf.php(289): Zend_Pdf_Parser->__construct('public/files/Sa...', Object(Zend_Pdf_ElementFactory_Proxy), true) #2 C:\Users\n.zhang\Documents\Tools\library\Dhr\Pdf.php(8): Zend_Pdf->__construct('public/files/Sa...', NULL, true) #3 C:\Users\n.zhang\Documents\Tools\application\default\controllers\PdfController.php(106): Dhr_Pdf::load('public/files/Sa...') #4 C:\Users\n.zhang\Documents\Tools\library\Zend\Controller\Action.php(502): PdfController->salespdfAction() #5 C:\Users\n.zhang\Documents\Tools\library\Zend\Controller\Dispatcher\Standard.php(293): Zend_Controller_Action->dispatch('salespdfAction') #6 C:\Users\n.zhang\Documents\Tools\library\Zend\Controller\Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 C:\Users\n.zhang\Documents\Tools\application\bootstrap.php(30): Zend_Controller_Front->dispatch() #8 C:\Users\n.zhang\Documents\Tools\index.php(6): require_once('C:\Users\n.zhan...') #9 {main}
后发现时候是PDF版本的问题
现在我用的zend framework的版本是1.06,然后通过load静态方法访问,出现如上错误
原先支持的PDF版本是1.4,而1.6的pdf的就出现了这样的问题。
只要大家把导入的PDF模板的版本改为1.4就可以解决这样的问题
当然也不一定要1.4,最主要还是一个版本的问题