Pergunta

Can I do something like this:

$content = $this->renderpartial('DeedCertificate',array('deed'=>$deed,'cnt'=>$cnt));        
$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->WriteHTML($content);
$html2pdf->Output('/var/www/myapp/images/example.pdf','F');

$html2pdf->Output when using $content = "hello"l works like a charm. Now I'm trying to pass the output of yii's renderpartial .. so it can become a pdf.. but my pdf is blank.

Foi útil?

Solução

you can make renderPartial to return the html generated for you ,like this:

 $this->renderPartial('DeedCertificate' , array('data'=>$data) , true); // set this to true
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top