From bf7523b49cec68ae186a7caa1178a8aae33782f8 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 f2c9bd8558..45421a5ca3 100644 --- a/CRM/Utils/PDF/Utils.php +++ b/CRM/Utils/PDF/Utils.php @@ -86,12 +86,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