mypdf/mpdf

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/mypdf/mpdf

v6.1.4 2020-05-21 13:41 UTC

This package is auto-updated.

Last update: 2025-10-22 21:01:29 UTC


README

mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on FPDF

$mPdf = new mPDF('UTF-8', 'A4', 14, '', 10, 10, 15, 1); $mPdf->SetDisplayMode('real'); $mPdf->autoScriptToLang = true; $mPdf->autoLangToFont = true; $mPdf->WriteHTML($html); if ($logo) { $mPdf->Image($logo, 130, 135, 41, 27); } if ($name) { $mPdf->Image($name, 63, 138, 20, 8); } if (!$pdfName) { $pdfName = self::AGREEMENT_PATH . rand(1, 1000000) . '.pdf'; } $mPdf->Output($pdfName);