From: Andrew Hunt Date: Thu, 3 Dec 2015 17:29:00 +0000 (-0500) Subject: CRM-17658 PDFs: add new region 'pdf-header' in head of PDFs X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b0500874b47a9031574a1e26791e3a5a2b3d773c;p=civicrm-core.git CRM-17658 PDFs: add new region 'pdf-header' in head of PDFs --- diff --git a/CRM/Utils/PDF/Utils.php b/CRM/Utils/PDF/Utils.php index 9f103d72a8..0ae94ed5ff 100644 --- a/CRM/Utils/PDF/Utils.php +++ b/CRM/Utils/PDF/Utils.php @@ -84,12 +84,18 @@ class CRM_Utils_PDF_Utils { $margins = array($metric, $t, $r, $b, $l); $config = CRM_Core_Config::singleton(); + + // Add a special region for the HTML header of PDF files: + $pdfHeaderRegion = CRM_Core_Region::instance('pdf-header', FALSE); + $htmlHeader = ($pdfHeaderRegion) ? $pdfHeaderRegion->render('', FALSE) : ''; + $html = " + {$htmlHeader}
\n";