From 2b20175cb6c44fa2d5e46459be7c6864ed695144 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 24 Feb 2015 13:52:03 -0800 Subject: [PATCH] CRM-16005 - Use and configure the dompdf provided by composer. --- CRM/Utils/PDF/Utils.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/PDF/Utils.php b/CRM/Utils/PDF/Utils.php index 5bfad58723..52a17dcd2c 100644 --- a/CRM/Utils/PDF/Utils.php +++ b/CRM/Utils/PDF/Utils.php @@ -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); -- 2.25.1