Portfolio / oncall / www / php / fpdf / doc / cell.htm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link type="text/css" rel="stylesheet" href="../fpdf.css">
<code>Cell(<b>float</b> w [, <b>float</b> h [, <b>string</b> txt [, <b>mixed</b> border [, <b>int</b> ln [, <b>string</b> align [, <b>boolean</b> fill [, <b>mixed</b> link]]]]]]])</code>
Prints a cell (rectangular area) with optional borders, background color and 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. It is
possible to put a link on the text.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is
done before outputting.
<dl class="param">
Cell width. If <code>0</code>, the cell extends up to the right margin.
Cell height.
Default value: <code>0</code>.
String to print.
Default value: empty string.
Indicates if borders must be drawn around the cell. The value can be either a number:
<li><code>0</code>: no border</li>
<li><code>1</code>: frame</li>
or a string containing some or all of the following characters (in any order):
<li><code>L</code>: left</li>
<li><code>T</code>: top</li>
<li><code>R</code>: right</li>
<li><code>B</code>: bottom</li>
Default value: <code>0</code>.
Indicates where the current position should go after the call. Possible values are:
<li><code>0</code>: to the right</li>
<li><code>1</code>: to the beginning of the next line</li>
<li><code>2</code>: below</li>
Putting <code>1</code> is equivalent to putting <code>0</code> and calling Ln() just after.
Default value: <code>0</code>.
Allows to center or align the text. Possible values are:
<li><code>L</code> or empty string: left align (default value)</li>
<li><code>C</code>: center</li>
<li><code>R</code>: right align</li>
Indicates if the cell background must be painted (<code>true</code>) or transparent (<code>false</code>).
Default value: <code>false</code>.
URL or identifier returned by AddLink().
<div class="doc-source">
<pre><code>// Set font
// Move to 8 cm to the right
// Centered text in a framed 20*10 mm cell and line break
<h2>See also</h2>
<a href="setfont.htm">SetFont()</a>,
<a href="setdrawcolor.htm">SetDrawColor()</a>,
<a href="setfillcolor.htm">SetFillColor()</a>,
<a href="settextcolor.htm">SetTextColor()</a>,
<a href="setlinewidth.htm">SetLineWidth()</a>,
<a href="addlink.htm">AddLink()</a>,
<a href="ln.htm">Ln()</a>,
<a href="multicell.htm">MultiCell()</a>,
<a href="write.htm">Write()</a>,
<a href="setautopagebreak.htm">SetAutoPageBreak()</a>.
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>