--- print_pdf/print_pdf.admin.inc-org	2011-08-12 22:46:51.000000000 +0200
+++ print_pdf/print_pdf.admin.inc	2011-08-12 22:51:53.000000000 +0200
@@ -267,10 +267,12 @@
 function _print_pdf_tools() {
   $tools = array_keys(file_scan_directory(drupal_get_path('module', 'print'), '^dompdf_config.inc.php$'));
   $tools = array_merge($tools, array_keys(file_scan_directory(drupal_get_path('module', 'print'), '^tcpdf.php$')));
+  $tools = array_merge($tools, array_keys(file_scan_directory(drupal_get_path('module', 'print'), '^mpdf.php$')));
   $tools = array_merge($tools, array_keys(file_scan_directory(drupal_get_path('module', 'print'), '^wkhtmltopdf')));
   $tools = array_merge($tools, array_keys(file_scan_directory(PRINT_PDF_LIB_PATH, '^dompdf_config.inc.php$')));
   $tools = array_merge($tools, array_keys(file_scan_directory(PRINT_PDF_LIB_PATH, '^tcpdf.php$')));
   $tools = array_merge($tools, array_keys(file_scan_directory(PRINT_PDF_LIB_PATH, '^wkhtmltopdf')));
+  $tools = array_merge($tools, array_keys(file_scan_directory(PRINT_PDF_LIB_PATH, '^mpdf.php$')));
   if (module_exists('libraries')) {
     $tools = array_merge($tools, array_keys(file_scan_directory(libraries_get_path('dompdf'), '^dompdf_config.inc.php$')));
     $tools = array_merge($tools, array_keys(file_scan_directory(libraries_get_path('tcpdf'), '^tcpdf.php$')));
--- print_pdf/print_pdf.pages.inc-org	2011-08-12 22:46:51.000000000 +0200
+++ print_pdf/print_pdf.pages.inc	2011-08-12 23:04:41.000000000 +0200
@@ -102,6 +102,9 @@
   elseif (basename($print_pdf_pdf_tool) == 'tcpdf.php') {
     return _print_pdf_tcpdf($print, $html, $filename);
   }
+  elseif (basename($print_pdf_pdf_tool) == 'mpdf.php') {
+    return _print_pdf_mpdf($print, $html, $pdf_filename);
+  }
   elseif (substr(basename($print_pdf_pdf_tool, '.exe'), 0, 11) == 'wkhtmltopdf') {
     return _print_pdf_wkhtmltopdf($print, $html, $filename);
   }
@@ -237,6 +240,36 @@
 }
 
 /**
+ * Generate the PDF file using the mPDF library
+ *
+ * @param $print
+ *   array containing the configured data
+ * @param $html
+ *   contents of the post-processed template already with the node data
+ * @param $filename
+ *   name of the PDF file to be generated
+ * @see print_pdf_controller()
+ */
+function _print_pdf_mpdf($print, $html, $filename = NULL) {
+  $print_pdf_pdf_tool = variable_get('print_pdf_pdf_tool', PRINT_PDF_PDF_TOOL_DEFAULT);
+  $print_pdf_paper_size = variable_get('print_pdf_paper_size', PRINT_PDF_PAPER_SIZE_DEFAULT);
+  $print_pdf_page_orientation = variable_get('print_pdf_page_orientation', PRINT_PDF_PAGE_ORIENTATION_DEFAULT);
+  $print_pdf_content_disposition = variable_get('print_pdf_content_disposition', PRINT_PDF_CONTENT_DISPOSITION_DEFAULT);
+  require_once($print_pdf_pdf_tool);
+
+  $format = ($print_pdf_page_orientation == "landscape") ? $print_pdf_paper_size . "-L" : $print_pdf_paper_size;
+
+  $mpdf = new mPDF('UTF-8', $format);
+  $mpdf->WriteHTML($html);
+  if ($print_pdf_content_disposition == 2) { // force download
+    $mpdf->Output($filename, 'D');
+  }
+  else {
+    $mpdf->Output($filename, 'I');
+  }
+}
+
+/**
  * Generate the PDF file using the TCPDF library
  *
  * @param $print
