/dompdf

Transforming HTML to PDF with PHP

Primary LanguagePHPMIT LicenseMIT

Transforming HTML to PDF with PHP using DOMPDF.

It's so basic. see below:

include("dompdf/dompdf_config.inc.php");

$html = "<h1>Hello World</h1>";
$dompdf = new DOMPDF();
$dompdf->set_paper('A4', 'landscape');
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("name.pdf");

Observation,

the syntax has changed in new versions!