below for stretching text in to cell
// test Cell stretching
$pdf->Cell(0, 10, "TEST CELL STRETCH: no stretch", 1, 1, 'C', 0, '', 0);
$pdf->Cell(0, 10, "TEST CELL STRETCH: scaling", 1, 1, 'C', 0, '', 1);
$pdf->Cell(0, 10, "TEST CELL STRETCH: force scaling", 1, 1, 'C', 0, '', 2);
$pdf->Cell(0, 10, "TEST CELL STRETCH: spacing", 1, 1, 'C', 0, '', 3);
$pdf->Cell(0, 10, "TEST CELL STRETCH: force spacing", 1, 1, 'C', 0, '', 4);
and the detail format:
method Cell [line 3093]
void Cell( float $w, [float $h = 0], [string $txt = ''], [mixed $border = 0], [int $ln = 0], [string $align = ''], [int $fill = 0], [mixed $link = ''], [int $stretch = 0])
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.
Tags:
see: TCPDF::SetFont(), TCPDF::SetDrawColor(), TCPDF::SetFillColor(), TCPDF::SetTextColor(), TCPDF::SetLineWidth(), TCPDF::AddLink(), TCPDF::Ln(), TCPDF::MultiCell(), TCPDF::Write(), TCPDF::SetAutoPageBreak()
since: 1.0
access: public
Parameters:
float $w Cell width. If 0, the cell extends up to the right margin.
float $h Cell height. Default value: 0.
string $txt String to print. Default value: empty string.
mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:
* 0: no border (default)
* 1: frame
or a string containing some or all of the following characters (in any order):
* L: left
* T: top
* R: right
* B: bottom
int $ln Indicates where the current position should go after the call. Possible values are:
* 0: to the right (or left for RTL languages)
* 1: to the beginning of the next line
* 2: below
string $align Allows to center or align the text. Possible values are:
* L or empty string: left align (default value)
* C: center
* R: right align
* J: justify
int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
mixed $link URL or identifier returned by AddLink().
int $stretch stretch carachter mode:
* 0 = disabled
* 1 = horizontal scaling only if necessary
* 2 = forced horizontal scaling
* 3 = character spacing only if necessary
* 4 = forced character spacing
Monday, January 26, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment