Re: QuickFrom and pdf generating

From: Date: Tue, 13 Jun 2006 09:21:38 +0000
Subject: Re: QuickFrom and pdf generating
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24339@lists.php.net to get a copy of this message
Nearly... ;) But the post datas are not showing in the pdf and only the last two pages what I see (pics is missing). ZoTyA arnaud sellenet bodin írta:
use $pdf->WriteHTML($smarty->fetch('form_static.tpl')); the fetch method allows to send the resulting html to a variable instead of printing to the stdout Le 13 juin 06 a` 02:25, Justin Patrin a écrit :
On 6/12/06, Köteles Zoltán <zoltan.koteles@chello.hu> wrote:
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'); }
I was just giving you advise about QF, I know nothing about PDFs or this HTML2PDF package you're asking about. You should probably ask the maintainers of that package why it's not outputting your styles.
$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.
Sorry, I don't know. Looks like you're outputting the Smarty template to the screen. You probably want to capture the output and run it through your PDF package. --Justin Patrin -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
--PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.general (#24339) next »