Showing posts with label PDF. Show all posts
Showing posts with label PDF. Show all posts

Friday, January 21, 2011

Generating a PDF using FPDF


 require('fpdf.php');

class PDF extends FPDF
{
//Page header
function Header()
{
    //Logo
    $this->Image('logo.png',20,10,20,20);
    //Arial bold 15
    $this->SetFont('Arial','B',15);
    //Move to the right
    $this->Cell(70);
    //Setting the text in the centre 'C'
    $this->Cell(50,10,'Generating PDF',0,0,'C');
    //Line break
    $this->Ln(20);
}
}

//Instanciation of inherited class
$pdf=new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Arial','',12);
for($i=1;$i<=10;$i++)
    // printing a text center aligned.
    $pdf->Cell(100,10,'Printing line number '.$i,0,1,'C');
$pdf->Output();
?>

Customizing the Search form - Drupal

To change the label text and text inside the search box and the text on the submit and changing the Submit button image, you can use the fo...