Added MultiCell to the details box
This commit is contained in:
parent
9d932087f5
commit
a57a7bcabe
55
vendors/xtcpdf.php
vendored
55
vendors/xtcpdf.php
vendored
|
|
@ -46,10 +46,10 @@ class XTCPDF extends TCPDF
|
|||
$this->Cell(0,0, "PTY LIMITED ACN: 47 085 991 224 ABN: 47 085 991 224", 0, 1, 'C', 1);
|
||||
|
||||
|
||||
//$this->Rect($this->GetX()+20, $this->GetY(), 180, 2, 'DF', array('width'=>0), array(0, 0, 152));
|
||||
$this->Rect($this->GetX()+33, $this->GetY(), 200, 2, 'DF', array('width'=>0), array(0, 0, 0));
|
||||
/* Start the contact details */
|
||||
$this->SetTextColor(0); //Set the Text Color to Black
|
||||
$this->MultiCell(18, 0, "Phone:\nFax:\nEmail:\nWeb Site:\n", 0, 'L', 0, 0, 45, 25);
|
||||
$this->MultiCell(18, 0, "Phone:\nFax:\nEmail:\nWeb Site:\n", 0, 'L', 0, 0, 45, 32);
|
||||
|
||||
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ class XTCPDF extends TCPDF
|
|||
|
||||
$this->SetTextColor(0 , 0, 152); //Set the Text Color to Blue
|
||||
$this->SetFont('times', 'B');
|
||||
$this->MultiCell(30, 20, "Engineering &\nIndustrial\nInstrumentation", 0, 'L', 0, 1, 2,28);
|
||||
$this->MultiCell(30, 20, "Engineering &\nIndustrial\nInstrumentation", 0, 'L', 0, 1, 10,37);
|
||||
|
||||
|
||||
|
||||
|
|
@ -96,13 +96,13 @@ class XTCPDF extends TCPDF
|
|||
$firstColWidth = 40;
|
||||
$secondColWidth = 80;
|
||||
$thirdColWidth = 30;
|
||||
$fourthColWidth = 45;
|
||||
$fourthColWidth = -10;
|
||||
|
||||
$pageNo = $this->PageNoFormatted();
|
||||
//$pageOf = $this->getAliasNbPages();
|
||||
|
||||
/* Debugging Vars */
|
||||
$companyName = "SomeBigCompanyCorp Trading As Something Awesome BIG LONG NAME PTY LTD";
|
||||
$companyName = "LONG COMPANY NAME TRADING AS MR AWESOME PTY LTD LONG COMPANY NAME TRADING AS MR AWESOME PTY LTD ";
|
||||
$emailTo = "theman@theman.com";
|
||||
$attention = "Joe Bloggs";
|
||||
$fromName = "Mr Sales Man";
|
||||
|
|
@ -111,31 +111,42 @@ class XTCPDF extends TCPDF
|
|||
|
||||
|
||||
|
||||
$this->SetXY($boxXstart, 45);
|
||||
|
||||
$this->SetXY($boxXstart, 55);
|
||||
|
||||
$heightNeeded = $this->getNumLines($companyName, $secondColWidth);
|
||||
echo "Height needed: $heightNeeded";
|
||||
|
||||
$lineHeight = 6.40997; //Size of a single line of text. If the company name is more, multiply this by the number of lines it needs.
|
||||
// $lineHeight = 0;
|
||||
|
||||
// $this->MultiCell($w, $h, $txt, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml);
|
||||
|
||||
$this->Cell($firstColWidth, 0, "QUOTATION TO:", 'LTRB', 0, 'L', 0, null, 0, false);
|
||||
$this->Cell($secondColWidth, 0, $companyName, 'LTRB', 0, 'L', 0, null, 0, false);
|
||||
$this->Cell($thirdColWidth, 0, "FROM:", 'LTB', 0, 'L', 0, null, 0, false);
|
||||
$this->Cell($fourthColWidth, 0, $fromName, 'TBR', 1, 'L', 0, null, 0, false); //Start a new line after this.
|
||||
|
||||
$this->MultiCell($firstColWidth, $lineHeight*$heightNeeded, "QUOTATION TO:", 'LTR', 'L', 0, 0);
|
||||
$this->MultiCell($secondColWidth, $lineHeight*$heightNeeded, $companyName, 'LTR', 'L', 0, 0);
|
||||
|
||||
$this->MultiCell($thirdColWidth, $lineHeight*$heightNeeded, "FROM:", 'LT', 'L', 0, 0);
|
||||
$this->MultiCell($fourthColWidth, $lineHeight*$heightNeeded, $fromName, 'TR', 'L', 0, 1); //Start a new line after this.
|
||||
// echo "Last height: ".$this->getLastH();
|
||||
|
||||
$this->MultiCell($firstColWidth, 0, "EMAIL TO:", 'LR', 'L', 0, 0);
|
||||
$this->MultiCell($secondColWidth, 0, "<a href=\"mailto:$emailTo\">$emailTo</a>", 'LR','L', 0, 0, null, null, true, 0, true);
|
||||
$this->MultiCell($thirdColWidth, 0, "CMC REF#:", 'L', 'L', 0, 0);
|
||||
$this->MultiCell($fourthColWidth, 0, $enquiryNumber, 'R', 'L', 0, 1); //Start a new line after thi
|
||||
|
||||
$this->MultiCell($firstColWidth, 0, "ATTENTION:", 'LRB', 'L', 0, 0);
|
||||
$this->MultiCell($secondColWidth, 0, $attention, 'LRB', 'L', 0, 0);
|
||||
$this->MultiCell($thirdColWidth, 0, "PAGE: ", 'LB', 'L', 0, 0);
|
||||
$this->MultiCell($fourthColWidth, 0, "$pageNo of {nb}", 'BR', 'L', 0, 1);
|
||||
|
||||
|
||||
|
||||
$this->SetX($boxXstart);
|
||||
|
||||
$this->Cell($firstColWidth, 0, "EMAIL TO:", 'LTRB', 0, 'L', 0, null, 0, false);
|
||||
$this->Cell($secondColWidth, 0, $emailTo, 'LTRB', 0, 'L', 0, "mailto:$emailTo", 0, false);
|
||||
$this->Cell($thirdColWidth, 0, "CMC REF#:", 'LTB', 0, 'L', 0, null, 0, false);
|
||||
$this->Cell($fourthColWidth, 0, $enquiryNumber, 'TBR', 1, 'L', 0, null, 0, false); //Start a new line after thi
|
||||
|
||||
$this->SetX($boxXstart);
|
||||
|
||||
/*
|
||||
*
|
||||
$this->Cell($firstColWidth, 0, "ATTENTION:", 'LTRB', 0, 'L', 0, null, 0, false);
|
||||
$this->Cell($secondColWidth, 0, $attention, 'LTRB', 0, 'L', 0, "mailto:$emailTo", 0, false);
|
||||
$this->Cell($thirdColWidth, 0, "PAGE: ", 'LTB', 0, 'L', 0, null, 0, false);
|
||||
$this->Cell($fourthColWidth, 0, "$pageNo of {nb}", 'TBR', 1, 'L', 0, null, 0, false); //Start a new line after thi
|
||||
|
||||
*/
|
||||
$this->lastPage();
|
||||
|
||||
//$this->Cell($w, $h, $txt, $border, $ln, $align, $fill, $link, $stretch, $ignore_min_height)
|
||||
|
|
|
|||
Loading…
Reference in a new issue