【发布时间】:2010-11-10 06:40:53
【问题描述】:
我正在使用 TCPDF 库版本:5.9.011。我正在尝试将 HTML 布局作为 PDF 执行。我尝试通过示例提供site
$html = '<h1>HTML Example</h1>
<h2>List</h2>
Some special characters: < € € € & è è © > \\slash \\\\double-slash \\\\\\triple-slash
';
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');
//Close and output PDF document
$pdf->Output('example_006.pdf', 'I');
显然发现生成的PDF只有默认页眉和页脚,中间内容为空白。
但是,如果我删除特殊字符,例如:
$html = '<h1>HTML Example</h1>
<h2>List</h2>
Some special characters:
';
PDF 获取其在$html 中指定的中间内容
【问题讨论】: