From: Tim Otten Date: Tue, 24 Feb 2015 21:52:03 +0000 (-0800) Subject: CRM-16005 - Use and configure the dompdf provided by composer. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2b20175cb6c44fa2d5e46459be7c6864ed695144;p=civicrm-core.git CRM-16005 - Use and configure the dompdf provided by composer. --- 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);