I am using TCPDF Library Version: 5.9.011. I am trying to execute HTML layout as PDF. For which I tried with example provide with the 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');
Apparently found that generated PDF only default header and footer with middle content blank.
However if I remove special characters like:
$html = '<h1>HTML Example</h1>
<h2>List</h2>
Some special characters:
';
PDF gets its middle content as specified in $html
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…