Cell with background fill

Cell with background fill


Posted in : PHP Posted on : January 19, 2011 at 5:53 PM Comments : [ 0 ]

This section contains the detail about the Cell with background fill in PDF.

Cell with background fill

In this tutorial you will learn how to generate Cell with background fill in PDF  in a PHP web application. The code of                 " cell-with-background-fill.htm " given below :

<?php
require('fpdf16/fpdf.php');

$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Times','I',16);
$pdf->cell(100,10,"This is a cell without background fill",1,1,'C');
$pdf->ln();
$pdf->Cell(100,10,'This is a cell with background fill',1,1,'',true);
$pdf->SetFillColor(976,245,458);
$pdf->ln();
$pdf->cell(100,10,"This is a cell with background fill",1,1,'C',true);

$pdf->Output();
?>

Cell also supports background fill color , by default background color black . In this tutorial use three cell

  • First cell without background fill color .
  • Second cell with background fill color , by default background fill color black.
  • SetFillColor method that set background fill color.
  • Third cell display with background fill color.. 

Output :

Download Source Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics