我正在使用html2pdf生成pdf.我需要动态生成一些行.
我的代码是..
require_once("html2pdf.class.php");
$content = '
CHAMPIONSHIP2015-16 |
DETAILED ENTRY |
Name of Manager : |
$html2pdf = new HTML2PDF
('L','A4','de',true,'UTF-8',array(10, 10, 10, 10));
$html2pdf->WriteHTML($content);
$html2pdf->Output($filename.'.pdf');
我如何才能在此content.php中添加PHP.如果它仍然无法正常工作,请提出一些其他建议来生成pdf ..谢谢
解决方法:
您不能像基本的PHP一样执行此操作吗?
$your_var = 'what you want';
$content = '
$content .= ''.$your_var.'';
$content .= '
';标签:pdf,html2pdf,php
来源: https://codeday.me/bug/20191111/2019009.html