我可以这样做吗?
$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');当使用$content = "hello"l时,$html2pdf->输出就像一种魅力。现在我想传递依的渲染部分的输出..。所以它可以变成一个pdf。但我的pdf是空白的。
发布于 2013-12-09 07:28:47
您可以让renderPartial返回成为您的html generated,如下所示:
$this->renderPartial('DeedCertificate' , array('data'=>$data) , true); // set this to truehttps://stackoverflow.com/questions/20465248
复制相似问题