Question

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.

Was it helpful?

Solution

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

 $this->renderPartial('DeedCertificate' , array('data'=>$data) , true); // set this to true
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top