Add watermark to medical checkup report
This commit is contained in:
@@ -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.
|
||||
|
||||
BIN
assets/images/watermark-ibl.jpeg
Normal file
BIN
assets/images/watermark-ibl.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
Reference in New Issue
Block a user