projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-16005 - Use and configure the dompdf provided by composer.
[civicrm-core.git]
/
CRM
/
Utils
/
PDF
/
Utils.php
diff --git
a/CRM/Utils/PDF/Utils.php
b/CRM/Utils/PDF/Utils.php
index d6ad7bef57a7949ec978dd6f9ca8c54569bfaba4..f7dc760449e4427d7b694cf47e1f6f799e0ef6e3 100644
(file)
--- a/
CRM/Utils/PDF/Utils.php
+++ b/
CRM/Utils/PDF/Utils.php
@@
-190,8
+190,11
@@
class CRM_Utils_PDF_Utils {
* @return string
*/
public static function _html2pdf_dompdf($paper_size, $orientation, $html, $output, $fileName) {
* @return string
*/
public 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 'vendor/dompdf/dompdf/dompdf_config.inc.php';
+
$dompdf = new DOMPDF();
$dompdf->set_paper($paper_size, $orientation);
$dompdf->load_html($html);
$dompdf = new DOMPDF();
$dompdf->set_paper($paper_size, $orientation);
$dompdf->load_html($html);