dompdf
Posted: Thu Jul 31, 2008 9:38 pm
hi to all
I used dompdf to convert my form into pdf. the problem is I have an error using $smarty->fetch(). Any suggestion is greatly appreciated.
Thanks in advance
here is the error:
Warning: Missing argument 1 for Smarty::fetch(), called in C:\xampp\htdocs\infinity_other\form_output\submit_form2.php on line 8 and defined in C:\xampp\htdocs\infinity_other\include\smarty.class.php on line 1116
I used dompdf to convert my form into pdf. the problem is I have an error using $smarty->fetch(). Any suggestion is greatly appreciated.
Thanks in advance
here is the error:
Warning: Missing argument 1 for Smarty::fetch(), called in C:\xampp\htdocs\infinity_other\form_output\submit_form2.php on line 8 and defined in C:\xampp\htdocs\infinity_other\include\smarty.class.php on line 1116
Code: Select all
<?
require_once("../include/session.php");
global $session;
require("../include/smarty.class.php");
$smarty = new smarty;
$tmpfile = tempnam("infinity_other/form_output", "dompdf_");
file_put_contents($tmpfile,$smarty->fetch()); // Replace $smarty->fetch()
// with your HTML string
$url = "infinity_other/dompdf-0.5.1/dompdf.php?input_file=" . rawurlencode($tmpfile) .
"&paper=letter&output_file=" . rawurlencode("PDF.pdf");
header("Location: http://" . $_SERVER["HTTP_HOST"] . "/$url");
?>