문제

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.

도움이 되었습니까?

해결책

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

 $this->renderPartial('DeedCertificate' , array('data'=>$data) , true); // set this to true
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top