Show
Ignore:
Timestamp:
05/05/08 19:14:49 (8 months ago)
Author:
aarkerio
Message:

PDF support

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/helpers/fpdf.php

    r455 r456  
    1414   * @param string $format values: A3, A4, A5, Letter, Legal or a two element array with the width and height in unit given in $unit 
    1515   */ 
    16   public function __construct($orientation='P',$unit='mm',$format='A4')  
     16  public function __construct($orientation='P',$unit='mm',$format='Letter')  
    1717  {  
    1818    $this->pdf = new myFPDF($orientation, $unit, $format); 
    19     //$this->pdf->FPDF($orientation, $unit, $format); // method 
    20     $this->pdf->AddPage(); 
    2119    $this->pdf->SetFont('Arial','B',14); 
    2220  } 
     
    2422  public function setData($data) 
    2523  { 
    26     $this->pdf->Cell(40,10,$data); 
     24    $this->pdf->Cell(0,10,$data,1,1,'L'); 
     25    $this->pdf->Ln(10); 
    2726  } 
    28     
     27 
     28  public function newPage() 
     29  { 
     30     $this->pdf->AddPage(); 
     31  } 
    2932  /** 
    3033   * Allows you to control how the pdf is returned to the user, most of the time in CakePHP you probably want the string