Going to change Details box to MultiCell() instead of Cell()
This commit is contained in:
parent
b1bb4f7d71
commit
9d932087f5
40
models/app_model.php
Normal file
40
models/app_model.php
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
/* SVN FILE: $Id$ */
|
||||||
|
/**
|
||||||
|
* Application model for Cake.
|
||||||
|
*
|
||||||
|
* This file is application-wide model file. You can put all
|
||||||
|
* application-wide model-related methods here.
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
|
||||||
|
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @filesource
|
||||||
|
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
||||||
|
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.model
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @version $Revision$
|
||||||
|
* @modifiedby $LastChangedBy$
|
||||||
|
* @lastmodified $Date$
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Application model for Cake.
|
||||||
|
*
|
||||||
|
* This is a placeholder class.
|
||||||
|
* Create the same file in app/app_model.php
|
||||||
|
* Add your application-wide methods to the class, your models will inherit them.
|
||||||
|
*
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.model
|
||||||
|
*/
|
||||||
|
class AppModel extends Model {
|
||||||
|
}
|
||||||
|
?>
|
||||||
16
vendors/xtcpdf.php
vendored
16
vendors/xtcpdf.php
vendored
|
|
@ -11,6 +11,7 @@ class XTCPDF extends TCPDF
|
||||||
var $xfooterfontsize = 8 ;
|
var $xfooterfontsize = 8 ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overwrites the default header
|
* Overwrites the default header
|
||||||
* set the text in the view using
|
* set the text in the view using
|
||||||
|
|
@ -20,7 +21,7 @@ class XTCPDF extends TCPDF
|
||||||
* set the font in the view using
|
* set the font in the view using
|
||||||
* $fpdf->setHeaderFont(array('YourFont','',fontsize));
|
* $fpdf->setHeaderFont(array('YourFont','',fontsize));
|
||||||
*/
|
*/
|
||||||
function Header()
|
function Page1Header()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -32,12 +33,15 @@ class XTCPDF extends TCPDF
|
||||||
$this->SetFillColor(255, 255, 255);
|
$this->SetFillColor(255, 255, 255);
|
||||||
$this->SetTextColor(0 , 0, 152); //Set the Text Color to Blue
|
$this->SetTextColor(0 , 0, 152); //Set the Text Color to Blue
|
||||||
|
|
||||||
$this->Image(K_PATH_IMAGES.'cmclogosmall.jpg', 2, 0, 30, 0, null, 'http://www.cmctechnologies.com.au', null, false, null, 'L');
|
// $this->Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden)
|
||||||
|
|
||||||
|
$this->Image(K_PATH_IMAGES.'cmclogosmall.jpg', 10, 10, 30, 0, null, 'http://www.cmctechnologies.com.au', null, false, null, 'L');
|
||||||
$this->Cell(30);
|
$this->Cell(30);
|
||||||
$this->SetFont('times', 'B');
|
$this->SetFont('times', 'B');
|
||||||
|
$this->SetFontSize(30);
|
||||||
$this->Cell(0,0, $this->xheadertext, 0,1,'C', 1);
|
$this->Cell(0,0, $this->xheadertext, 0,1,'C', 1);
|
||||||
$this->SetFontSize(10);
|
$this->SetFontSize(10);
|
||||||
$this->SetY(14);
|
$this->SetY(22);
|
||||||
$this->Cell(30);
|
$this->Cell(30);
|
||||||
$this->Cell(0,0, "PTY LIMITED ACN: 47 085 991 224 ABN: 47 085 991 224", 0, 1, 'C', 1);
|
$this->Cell(0,0, "PTY LIMITED ACN: 47 085 991 224 ABN: 47 085 991 224", 0, 1, 'C', 1);
|
||||||
|
|
||||||
|
|
@ -88,7 +92,7 @@ class XTCPDF extends TCPDF
|
||||||
$this->SetTextColor(0); //Black Text
|
$this->SetTextColor(0); //Black Text
|
||||||
|
|
||||||
$boxYstart = 45;
|
$boxYstart = 45;
|
||||||
$boxXstart = 5;
|
$boxXstart = 10;
|
||||||
$firstColWidth = 40;
|
$firstColWidth = 40;
|
||||||
$secondColWidth = 80;
|
$secondColWidth = 80;
|
||||||
$thirdColWidth = 30;
|
$thirdColWidth = 30;
|
||||||
|
|
@ -108,12 +112,16 @@ class XTCPDF extends TCPDF
|
||||||
|
|
||||||
|
|
||||||
$this->SetXY($boxXstart, 45);
|
$this->SetXY($boxXstart, 45);
|
||||||
|
|
||||||
|
// $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($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($secondColWidth, 0, $companyName, 'LTRB', 0, 'L', 0, null, 0, false);
|
||||||
$this->Cell($thirdColWidth, 0, "FROM:", 'LTB', 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->Cell($fourthColWidth, 0, $fromName, 'TBR', 1, 'L', 0, null, 0, false); //Start a new line after this.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->SetX($boxXstart);
|
$this->SetX($boxXstart);
|
||||||
|
|
||||||
$this->Cell($firstColWidth, 0, "EMAIL TO:", 'LTRB', 0, 'L', 0, null, 0, false);
|
$this->Cell($firstColWidth, 0, "EMAIL TO:", 'LTRB', 0, 'L', 0, null, 0, false);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,10 @@ $tcpdf = new XTCPDF();
|
||||||
|
|
||||||
$textfont = 'times'; // looks better, finer, and more condensed than 'dejavusans'
|
$textfont = 'times'; // looks better, finer, and more condensed than 'dejavusans'
|
||||||
|
|
||||||
$tcpdf->SetTopMargin(0);
|
//$tcpdf->SetTopMargin();
|
||||||
|
//$tcpdf->SetLeftMargin(29);
|
||||||
|
//$tcpdf->SetMargins(1, 1);
|
||||||
|
|
||||||
|
|
||||||
$tcpdf->SetAuthor("CMC Technologies");
|
$tcpdf->SetAuthor("CMC Technologies");
|
||||||
$tcpdf->SetTitle("CMC Technologies Quote");
|
$tcpdf->SetTitle("CMC Technologies Quote");
|
||||||
|
|
@ -19,7 +22,11 @@ $tcpdf->xheadercolor = array(150,0,0);
|
||||||
$tcpdf->xheadertext = 'CMC TECHNOLOGIES';
|
$tcpdf->xheadertext = 'CMC TECHNOLOGIES';
|
||||||
$tcpdf->xfootertext = 'Copyright © %d CMC Technologies. All rights reserved.';
|
$tcpdf->xfootertext = 'Copyright © %d CMC Technologies. All rights reserved.';
|
||||||
|
|
||||||
//$tcpdf->Header();
|
$tcpdf->setPrintHeader(false);
|
||||||
|
$tcpdf->setPrintFooter(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
// Now you position and print your page content
|
// Now you position and print your page content
|
||||||
|
|
@ -30,7 +37,7 @@ $tcpdf->Cell(0,14, "Hello World", 0,1,'L');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$tcpdf->AddPage();
|
$tcpdf->AddPage();
|
||||||
|
$tcpdf->Page1Header();
|
||||||
|
|
||||||
$tcpdf->DetailsBox();
|
$tcpdf->DetailsBox();
|
||||||
$content = <<<ENDCONTENT
|
$content = <<<ENDCONTENT
|
||||||
|
|
@ -107,4 +114,8 @@ $tcpdf->lastPage();
|
||||||
$tcpdf->Output('/home/karl/public_html/cake/quotenik-working/webroot/pdf/filename2.pdf', 'F');
|
$tcpdf->Output('/home/karl/public_html/cake/quotenik-working/webroot/pdf/filename2.pdf', 'F');
|
||||||
|
|
||||||
//$tcpdf->Output('cmcquote.pdf', 'D');
|
//$tcpdf->Output('cmcquote.pdf', 'D');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in a new issue