Text Align in Cell

Text Align in Cell


Posted in : PHP Posted on : January 17, 2011 at 6:56 PM Comments : [ 0 ]

This section contains the detail about the Text Align of Cell in pdf

Text Align in Cell

In this tutorial you will learn how to text align in cell in PDF in a PHP web application . The code of  "text-align-in-cell.php"  given below :

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

$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Times','I',16);
$pdf->Cell(0,10,'Left Aligned Text',1,1,'L');
$pdf->ln();
$pdf->Cell(0,10,'Center Aligned Text',1,1,'C');
$pdf->ln();
$pdf->Cell(0,10,'Right Aligned Text',1,1,'R');
$pdf->ln(); 

$pdf->Output();
?>

In this tutorial tutorial use three cell and all with width 0 (100 % width ) and  height 10. In the first cell   text align in left , second cell text align in center and third cell text align in right.

Output :

When run  "text-align-in-cell.php" file display output as :

Download Source Code

Go to Topic «PreviousHomeNext»

Your Comment:


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

 
Tutorial Topics