i am trying to generate a pdf file from smarty template using dompdf:code is below:-
require_once('dompdf/dompdf_config.inc.php');
$dompdf = new DOMPDF();
$dompdf->load_html($smarty->fetch(CURRENT_TEMPLATE.'/module/shopping_cart.html'));
$dompdf->render();
$dompdf->stream("sample.pdf");
a pdf file is generated,but when i try to open the pdf file a error message is displaying as below "Acrobat cannot open the 'sample.pdf' because it is either not supported file type or because file has been damaged" HTML page is diplaying correctly when i try to
echo $smarty->fetch(CURRENT_TEMPLATE.'/module/shopping_cart.html')
so please help me to solve this error...thanks in advance