+--------------------------------------------------------------------+
*/
-// CRM-12165 - Remote file support required for image handling.
-define("DOMPDF_ENABLE_REMOTE", TRUE);
-define('DOMPDF_ENABLE_AUTOLOAD', FALSE);
use Dompdf\Dompdf;
-
+use Dompdf\Options;
/**
*
* @package CRM
* @return string
*/
public static function _html2pdf_dompdf($paper_size, $orientation, $html, $output, $fileName) {
- $dompdf = new DOMPDF();
+ // CRM-12165 - Remote file support required for image handling.
+ $options = new Options();
+ $options->set('isRemoteEnabled', TRUE);
+
+ $dompdf = new DOMPDF($options);
$dompdf->set_paper($paper_size, $orientation);
$dompdf->load_html($html);
$dompdf->render();