From b0500874b47a9031574a1e26791e3a5a2b3d773c Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Thu, 3 Dec 2015 12:29:00 -0500 Subject: [PATCH] CRM-17658 PDFs: add new region 'pdf-header' in head of PDFs --- CRM/Utils/PDF/Utils.php | 6 ++++++ 1 file changed, 6 insertions(+) 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"; -- 2.25.1