当我试图下载一个PDF时,我得到了这个错误。在创建PDF之前,代码似乎希望xml字符串在屏幕上回音。

我是不是错过了什么?我遵循了这个网站http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf解释的步骤。
发布于 2013-08-16 12:21:51
你好潘卡吉,
Cakephp2.3.x文件夹名被更改为“供应商”为“供应商”。这就是为什么你要犯错误..。
Cakephp 1.3.X :在PdfComponent中我们使用
//包含类文件并创建Html2ps实例
App::import('vendor', 'Html2PsConfig', array('file' => 'html2ps'.DS.'config.inc.php'));
App::import('vendor', 'Html2Ps', array('file' => 'html2ps'.DS.'pipeline.factory.class.php'));
parse_config_file(APP .'vendors'. DS .'html2ps'. DS .'html2ps.config'); Cakephp 2.3.X :在PdfComponent中,您必须更改代码,与下面的代码相同。
//包含类文件并创建Html2ps实例
App::import('Vendor', 'Html2PsConfig', array('file' => 'html2ps'.DS.'config.inc.php'));
App::import('Vendor', 'Html2Ps', array('file' => 'html2ps'.DS.'pipeline.factory.class.php'));
parse_config_file(APP .'Vendor'. DS .'html2ps'. DS .'html2ps.config'); 试试这个可能对你有帮助。:-)
https://stackoverflow.com/questions/18266851
复制相似问题