<?php
/**
* Created by PhpStorm.
* User: anil
* Date: 1/12/2018
* Time: 11:08 PM
*/
App::import('Vendor','tcpdf/tcpdf');
class XTCPDF extends TCPDF{
var $content = array();
public function Header() {
$this->SetFont('helvetica', '', 10);
$this->setJPEGQuality(300);
$html = '
<style>
td {line-height: 20px; vertical-align: bottom;}
</style>
<table border="0" width="100%">
<tr>
<td width="30%"><img src="../webroot/img/dis_high_resolution.png" width="85" /></td>
<td width="70%" align="right" class="text-right">
<b style="font-size: 17px">DAWN CONSULTANCY SERVICES</b>
<br>
104 Fairwood Cirle, Brampton ON, Canada L6R 0X1
</td>
</tr>
</table>
<hr/>
';
$this->writeHTML($html, true, false, true, false, '');
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', '', 8);
if (empty($this->pagegroups)) {
$pagenumtxt = $this->l['w_page'].' '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();
} else {
$pagenumtxt = $this->l['w_page'].' '.$this->getPageNumGroupAlias().' of '.$this->getPageGroupAlias();
}
// Page number
$this->Cell(0, 10, 'Page: '.$pagenumtxt .'', 0, false, 'C', 0, '', 0, false, 'T', 'M');
/// $this->Cell(0, 10, '-----------------{ Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages() .' }-----------------', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}