- Download the .zip file and unzip it
- Create a directory e.g. /mpdf on your server
- Upload all of the files to the server, maintaining the directories as they are
- Ensure that you have write permissions set for the following fol
To test the installation, point your browser to the example files directory e.g. [path_to_mpdf_folder]/mpdf/examples/
If you wish to install additional fonts please see the notes in Fonts & Languages for further instructions.
If you wish to define a different directory for temporary files rather than /tmp/ see the note on ‘directory for temporary files’.
If you have problems, please read the section on troubleshooting in the manual.
Upgrading from version mPDF 5.0 Beta
There is no upgrade package from v5 beta because so many of the files have had at least minor changes. You can overwrite most of the files, taking care to keep a note of your 3 configuration files.
Important: You must delete all temporary files in the /ttfontdata folder.
Changes from 5.0 Beta
- config.php file has been changed (extra CJK characters to recognise CJK blocks)</li>
$this->backupSubsFont(in config_fonts.php) optionally now takes an array</li>
- no need to define
'sip|smp'=>truein config_fonts.php (ignored; cf.
- Indic language fonts have been altered to add Latin and Latin-1 Supplement characters</li>
- progress bars now has an external progbar.css and configurable main heading</li>
- added initial parameter
'-aCJK'to override default useAdobeCJK at runtime</li>
- QRCode is not included in main download (but as an extra package)</li>
If you have been using earlier versions of mPDF, most scripts should work as before. But note:
- Arial, Helvetica, Times and Courier are now treated like any other font
- the whole CSS font string is parsed e.g. style=”font-family:’Lucida Grande’;” will look for a font
‘lucidagrande’ and not ‘lucida’
$mpdf->useSubstitutionsMBis now deprecated, but will work as an alias for
$mpdf->useOnlyCoreFontsis now deprecated and is ignored. Use
$this->use_CJK_onlyis now deprecated and is ignored. See
The initial parameters e.g.
new mPDF('utf-8') have all changed. Old ones may be recognised, or will be ignored.