CRM-19382 Allow for remote images to be used in invoices
authorSeamus Lee <seamuslee001@gmail.com>
Sun, 18 Sep 2016 21:46:38 +0000 (07:46 +1000)
committerGitHub <noreply@github.com>
Sun, 18 Sep 2016 21:46:38 +0000 (07:46 +1000)
CRM/Contribute/Form/Task/Invoice.php

index 4193ef46c8cc283d502fec6e6fd642f439ce38ac..3c16191adf7e4faaa86c92209d992a3432b7086c 100644 (file)
@@ -643,7 +643,10 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task {
    *   Name of file which is in pdf format
    */
   static public function putFile($html, $name = 'Invoice.pdf') {
-    $doc = new DOMPDF();
+    $options = new Options;
+    $options->set('isRemoteEnabled', TRUE);
+    
+    $doc = new DOMPDF($options);
     $doc->load_html($html);
     $doc->render();
     $html = $doc->output();