This project provides a simple, easy-to-use HTML-to-PDF converter in PHP, with full, out-of-the-box support for UTF-8 and non-Latin-based languages.
- German PDF / German HTML Source
- English PDF / English HTML Source
- Spanish PDF / Spanish HTML Source
- French PDF / French HTML Source
- Japanese PDF / Japanese HTML Source
- Italian PDF / Italian HTML Source
- Dutch PDF / Dutch HTML Source
- Polish PDF / Polish HTML Source
- Portuguese PDF / Portuguese HTML Source
- Russian PDF / Russian HTML Source
- Turkish PDF / Turkish HTML Source
- Chinese PDF / Chinese HTML Source
PHP HTML-to-PDF Converter makes use of :
- tFPDF (based on FPDF 1.7)
- FPDF ("Free PDF")
- DejaVu Language Pack
- ZCOOL_QingKe_HuangYou Chinese Language Pack
- rounded-mgenplus-20140828 Japanese Language Pack
require('../php-html-to-pdf/php-html-to-pdf.php');
$pdf_object = new HTMLtoPDF([
'Author'=>'HoldOffHunger',
'Title'=>'Privacy Policy',
]);
$pdf_object->WriteHTML([
'html'=>'<h1>I can say hello in English!</h2><p>Hello!</p>',
'language'=>'en',
]);
$pdf_object->Output('file.pdf', "F", TRUE);
require('../php-html-to-pdf/php-html-to-pdf.php');
$pdf_object = new HTMLtoPDF([
'Author'=>'HoldOffHunger',
'Title'=>'Privacy Policy',
]);
$pdf_object->WriteHTML([
'html'=>'<h1>I can say hello in 日本人!</h2><p>こんにちは!</p>',
'language'=>'ja',
]);
$pdf_object->Output('file.pdf', "F", TRUE);
require('../php-html-to-pdf/php-html-to-pdf.php');
$pdf_object = new HTMLtoPDF([
'Author'=>'HoldOffHunger',
'Title'=>'Privacy Policy',
]);
$pdf_object->WriteHTML([
'html'=>'<h1>I can say hello in 汉语!</h2><p>你好!</p>',
'language'=>'zh',
]);
$pdf_object->Output('file.pdf', "F", TRUE);