I got this error when tried to download a PDF. It seems the code expect xml string to echo something to the screen before the PDF created.
Did I miss something in my setup? I have followed the steps explained by this website http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf.
Hi Pankaj,
Cakephp 1.3.X : In PdfComponent we are using
// Include the class file and create Html2ps instance
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 : In PdfComponent you have to change the code same as bellow..
// Include the class file and create Html2ps instance
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');
Try this may helpful for you.. :-)