01.
?php
02.
require
(
'tcpdf.php'
);
03.
$pdf
=
new
TCPDF();
04.
$pdf
->SetMargins(15,20,15);
05.
$pdf
->AddFont(
'thsarabun'
,
''
,
'thsarabun.php'
);
06.
$pdf
->SetFont(
'thsarabun'
,
''
, 14,
''
, true);
07.
$pdf
->AddPage();
08.
$htmlcontent
=
'<p>ทดสอบ</p>'
;
09.
$pdf
->writeHTML(
$htmlcontent
, true, 0, true, 0);
10.
11.
$pdf
->Output(
'example_001.pdf'
,
'I'
);
12.
?>