Re: QuickFrom and pdf generating
| From: | Köteles Zoltán | Date: | Mon, 12 Jun 2006 20:24:49 +0000 |
| Subject: | Re: QuickFrom and pdf generating | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24329@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
Why are you doing that? Perhaps you should be doing this: $form->freeze(); $pdf->WriteHTML($form->toHTML()); OK, I'm rewrite it:if ($form->validate()) { require_once $include_dir.'/html2fpdf.php'; $pdf =& new HTML2FPDF(); $form->freeze(); $pdf->WriteHTML($form->toHTML()); $pdf->Output('doc.pdf', 'I'); } $renderer =& new HTML_QuickForm_Renderer_ArraySmarty($tpl, true); $form->accept($renderer); $tpl->assign('form', $renderer->toArray()); ob_start(); print_r($renderer->toArray()); $tpl->assign('static_array', ob_get_contents()); ob_end_clean(); $tpl->display('form_static.tpl'); But I'm using Smarty (for renderer) and I see only some ugly data in the pdf. Thanks a lot ZoTya