PHP HTML
(quick guide & example)
Open the command line, navigate to your project folder - cd HTTP/FOLDER/.
Composer will automatically download the latest version into the vendor/ folder.
Run composer require mpdf/mpdf.
LOAD MPDF require "vendor/autoload.php"; $mpdf = new \Mpdf\Mpdf();
WRITE HTML CONTENT $html = "<h1>HELLO WORLD!</h1>"; $mpdf->WriteHTML($html);
DIRECT OUTPUT $mpdf->Output();
OR FORCE DOWNLOAD $mpdf->Output("file.pdf", "D");
OR SAVE TO FILE ON SERVER $mpdf->Output("demo.pdf");