Cell

Cell(double w [, double h [, string txt [, int border [, int ln [, string align [, int fill]]]]]])

Description

Prints a cell (rectangular area) with an optional border and a character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line.
The string uses the Windows character set (Cp1252, Western-European).
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.

Parameters

w
Cell width. If 0, the cell extends up to the right margin (the right margin equals the left one).
h
Cell height. Default value: 0.
txt
String to print. Default value: empty string.
border
Indicates if a border must be drawn around the cell (0: no, 1: yes). Default value: 0.
ln
Indicates if the current position must go to the right (0) or to the beginning of the next line (1). Putting 1 is equivalent to calling Ln() just after Cell(). Default value: 0.
align
Allows to center or align the text. Possible values are:
fill
Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.

Example

//Set font
$pdf->SetFont('Arial','B',16);
//Move to 8 cm to the right
$pdf->Cell(80);
//Centered text in a framed 20*10 mm cell and line break
$pdf->Cell(20,10,'Title',1,1,'C');

See also

SetFont(), SetDrawColor(), SetFillColor(), SetTextColor(), SetLineWidth(), Ln(), MultiCell(), SetAutoPageBreak().

Index