diff --git a/application/controllers/tools/Medical_checkup_report.php b/application/controllers/tools/Medical_checkup_report.php index 63ad8e2d..a1f0da7e 100644 --- a/application/controllers/tools/Medical_checkup_report.php +++ b/application/controllers/tools/Medical_checkup_report.php @@ -6,6 +6,17 @@ class MedicalCheckupReportPdf extends FPDF { public $printBy = 'ADMIN'; public $branchAddress = '-'; + public $watermarkPath = ''; + + public function Header() + { + if ($this->watermarkPath === '' || !file_exists($this->watermarkPath)) { + return; + } + + // Draw watermark background per page. + $this->Image($this->watermarkPath, 23, 102, 164, 102, 'JPEG'); + } public function Footer() { @@ -91,6 +102,7 @@ class Medical_checkup_report extends MY_Controller $pdf->AliasNbPages(); $pdf->printBy = $printBy; $pdf->branchAddress = (string)$branch['branch_address']; + $pdf->watermarkPath = dirname(APPPATH) . '/assets/images/watermark-ibl.jpeg'; $pdf->AddPage(); // Header offset 3.5 cm for pre-printed kop. diff --git a/assets/images/watermark-ibl.jpeg b/assets/images/watermark-ibl.jpeg new file mode 100644 index 00000000..9ac98ab2 Binary files /dev/null and b/assets/images/watermark-ibl.jpeg differ