Extension:Mpdf

The Mpdf extension lets you export printable version of wiki page as PDF file.

What can this extension do?
This extension lets you export printable version of wiki page as PDF file. For conversion uses mPDF PHP class (modified version 5.7.2).


 * Advantage:
 * no need to install additional components
 * for generate PDF using same CSS styles as for render printable wiki page.
 * small size of the pdf file
 * supports utf-8

Use the following Pdf imposes a number of limitations.

About mPDF
mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF, with a number of enhancements.

Usage
The PDF creation is initialised by the mpdf action, so a page can be downloaded as a PDF file directly from a link such as: http://www.foo.bar/wiki/index.php?title=Main_Page&action=mpdf

A more generic way of creating the link is to use the "fullurl" parser function and the FULLPAGENAMEE built in variable as in the following example. [ download this page as a PDF file] This link can then be added to a template which can be transcluded into any page for downloading as a PDF file.

Customization
Use magic word to add tags specified in documentation of mpdf class.

Sample:

Raw HTML output
You can download the file as a single HTML document by setting format=html in the query-string. Example: http://www.foo.bar/wiki/index.php?title=Main_Page&action=mpdf&format=html

Configuration
Here are some global variables which affect the operation of the extension. These should be set in your LocalSettings.php file after the include of the Mpdf.php script.