SetTextColor(0);
$this->SetFontSize(10);
$this->SetFont('helvetica', '');
$this->writeHTML($content, true, false, false, false, '');
}
function Page1Header() {
$this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top
$this->SetFillColor(255, 255, 255);
$this->SetTextColor(0 , 0, 152); //Set the Text Color to Blue
// $this->Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden)
$this->Image(K_PATH_IMAGES.'2020cmclogosmall.jpg', 10, 10, 0, 28, null, 'http://www.cmctechnologies.com.au', null, false, null, 'L');
$this->Cell(30);
$this->SetFont('helvetica', 'B');
$this->SetFontSize(30);
$this->Cell(0,0, $this->xheadertext, 0,1,'C', 1);
$this->SetFontSize(10);
$this->SetY(22);
$this->Cell(30);
$this->Cell(0,0, "PTY LIMITED ACN: 085 991 224 ABN: 47 085 991 224", 0, 1, 'C', 1);
//$this->Rect($x, $y, $w, $h, $style, $border_style);
$this->Rect($this->GetX()+33, $this->GetY()+2, 157, 0.2, 'DF', array('width'=>0), array(0, 0, 0));
/* Start the contact details */
$this->SetTextColor(0); //Set the Text Color to Black
$this->MultiCell(30, 0, "Phone:\nFax:\nEmail:\nWeb Site:\n", 0, 'L', 0, 0, 45, 32);
$this->SetFont('helvetica', '');
$this->MultiCell(55, 0, "+61 2 9669 4000
+61 2 9669 4111
sales@cmctechnologies.com.au
www.cmctechnologies.net.au
", 0, 'L', 0, 0, 65, null, true, 0, true);
$this->MultiCell(52, 0, "Unit 19, 77 Bourke Rd\nAlexandria NSW 2015\nAUSTRALIA\n", 0, 'L', 0, 0, 150, null);
$this->SetTextColor(0 , 0, 152); //Set the Text Color to Blue
$this->SetFont('helvetica', 'B');
$this->MultiCell(30, 20, "Engineering &\nIndustrial\nInstrumentation", 0, 'L', 0, 1, 10,37);
}
/**
*Footer for the 1st (and subsequent content) pages.
*/
function Page1Footer() {
$this->SetAutoPageBreak(false);
$this->SetY(-20);
$this->MultiCell(0, 2, "
", 0, 'C', null, 1, null, null, true, 0, true, false);
$html = <<CMC TECHNOLOGIES Provides Solutions in the Following Fields
| EXPLOSION PREVENTION AND PROTECTION—FIRE PROTECTION—PRESSURE RELIEF—VISION IN THE PROCESS |
| FLOW MEASUREMENT—PROCESS INSTRUMENTATION |
ENDHTML;
//$this->writeHTML($html, true, 0, true, 0);
$this->writeHTMLCell(0, 0, null, null, $html, 0, 1, false, true, 'C', true);
//$this->writeHTMLCell($w, $h, $x, $y, $html, $border, $ln, $fill, $reseth, $align, $autopadding)
$this->SetAutoPageBreak(true, 20);
}
/**
* For Quotes and (hopefully) Invoices. Identifies who the document is for, date, reference number, etc.
*/
function DetailsBoxHTML($docTypeFullName, $companyName, $emailTo, $attention, $fromName, $fromEmail, $enquiryNumber, $your_reference, $issuedate, $pageCount) {
$pageNo = $this->PageNoFormatted();
$totalCount = $this->getAliasNbPages();
$col1width = '20%';
$col2width = '30%';
$col3width = $col1width;
$col4width = $col2width;
$todayPHPdate = strtotime($issuedate);
$todaysDateString = date('l, j F Y', $todayPHPdate);
$table = <<
| QUOTATION TO: |
{$companyName} |
FROM: |
{$fromName} |
| EMAIL TO: |
{$emailTo} |
CMC REF#: |
{$enquiryNumber} |
| ATTENTION: |
{$attention} |
PAGE: |
{$pageNo} of {$totalCount} (plus attachments) |
| DATE: {$todaysDateString} |
YOUR REF: {$your_reference} |
ENDTABLE;
$this->SetTextColor(0); //Black Text
$this->writeHTMLCell(0, 0, null, null, $table, null, 1, null, true, 'L', false);
$this->SetFontSize(7);
//Kinda lame that I cant seem to wrap this text nicer. But Whatever.
$this->MultiCell(0, 0, 'The information in this document is confidential and may be privileged. If you are not the indended recipient then access, disclosure, copying or other dissemination of the contents of this message is unauthorised and may be unlawful. Please inform the sender immediately if you are not the intended addressee.',
'', 'L', false, 1
);
$this->writeHTMLCell(0, 0, null, null, '
', 0, 1, false,true, 'C', false);
}
function header() {
//$this->Image(K_PATH_IMAGES.'cmclogosmall.jpg', 10, 10, 15, 13.6, null, 'http://www.cmctechnologies.com.au', null, false, null, 'L');
$this->SetFontSize(10);
$pageNo = $this->PageNoFormatted();
$totalCount = $this->getAliasNbPages();
//$currentX = $this->GetX();
//$this->SetX($currentX + 40);
// $this->writeHTMLCell(0, 0, null, null, 'CONTINUES', -10, 1, false,true, 'C', false);
//$this->MultiCell(100, 13.6,"CONTINUES", 0,'C', false, 10, 60);
$this->MultiCell(0,13.6, "PAGE $pageNo OF $totalCount", '', 'R', false, 0, 10,5);
//$this->MultiCell($w, $h, $txt, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml)
//$this->Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi)
}
var $files = array();
function setFiles($files) {
$this->files = $files;
}
function concat() {
foreach($this->files AS $file) {
$pagecount = $this->setSourceFile($file);
for ($i = 1; $i <= $pagecount; $i++) {
$tplidx = $this->ImportPage($i);
$this->AddPage();
$this->useTemplate($tplidx);
}
}
}
}
?>