Hi all,
Can anyone see where i might be going wrong?
I can't get the last two Cell's to sit correctly...eg.
$pdf->Cell(15);
$code = "46565643";
$pdf->Cell(0,30,$code,0,1);
$pdf->Cell(15);
$expiry = "20-06-2004";
$pdf->Cell(0,0,$expiry,0,1);
Here is the complete script:
<?php
session_cache_limiter('private');
session_start();
define('FPDF_FONTPATH','fpdf/font/');
require('fpdf/fpdf.php');
class PDF extends FPDF
{
//Page header
function Header()
{
//Logo
$this->Image('voucher_1.png',0,0,210);
//Arial bold 15
$this->SetFont('Arial','',70);
//Move to the right
$this->Cell(168);
//Title
$this->Cell(0,37,$_SESSION['gv_1'][2],0,1);
//Line break
$this->Ln(0);
}
}
//Instanciation of inherited class
$pdf=new PDF('P','mm','voucher');
$pdf->Open();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Arial','B',12);
$pdf->Cell(4);
$pdf->Cell(0,-18,$_SESSION['gv_1'][0],0,1);
$pdf->Cell(8);
$pdf->Cell(0,37,$_SESSION['gv_1'][1],0,1);
$pdf->Cell(10);
$pdf->Cell(0,-18,"AUD $" . $_SESSION['gv_1'][2] . "",0,1);
$pdf->Cell(15);
$code = "46565643";
$pdf->Cell(0,30,$code,0,1);
$pdf->Cell(15);
$expiry = "20-06-2004";
$pdf->Cell(0,0,$expiry,0,1);
$pdf->Output();
?>
With the following:
$pdf->Cell(15);
$code = "46565643";
$pdf->Cell(0,30,$code,0,1);
...if i change the value of 30 to anything greater it creates another page or more depending on the value.
The last five Cell's should be evenly spaced apart.
Cheers,
micmac