CRM-16005 - Use and configure the dompdf provided by composer.
authorTim Otten <totten@civicrm.org>
Tue, 24 Feb 2015 21:52:03 +0000 (13:52 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 24 Feb 2015 22:18:07 +0000 (14:18 -0800)
CRM/Utils/PDF/Utils.php

index 5bfad58723a46d4804fd0c10a999cd39d273d128..52a17dcd2c2441dd971ed6b9f5b8fb4ec4443c9d 100644 (file)
@@ -179,8 +179,11 @@ class CRM_Utils_PDF_Utils {
    * @return string
    */
   static function _html2pdf_dompdf($paper_size, $orientation, $html, $output, $fileName) {
-    require_once 'packages/dompdf/dompdf_config.inc.php';
-    spl_autoload_register('DOMPDF_autoload');
+    // CRM-12165 - Remote file support required for image handling.
+    define("DOMPDF_ENABLE_REMOTE", true);
+    define('DOMPDF_ENABLE_AUTOLOAD', false);
+    require_once 'packages/vendor/dompdf/dompdf/dompdf_config.inc.php';
+
     $dompdf = new DOMPDF();
     $dompdf->set_paper($paper_size, $orientation);
     $dompdf->load_html($html);