TCPDF::writeHTMLCell( $w,  $h,  $x,  $y,  $html = '',  $border,  $ln,  $fill = false,  $reseth = true,  $align = '',  $autopadding = true )

Prints a cell (rectangular area) with optional borders, background color and html text string.


Description Description

The upper-left corner of the cell corresponds to the current position. After the call, the current position moves to the right or to the next line.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. IMPORTANT: The HTML must be well formatted – try to clean-up it using an application like HTML-Tidy before submitting. Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul NOTE: all the HTML attributes must be enclosed in double-quote.

See also See also


Top ↑

Parameters Parameters

$w

(Required) (float) Cell width. If 0, the cell extends up to the right margin.

$h

(Required) (float) Cell minimum height. The cell extends automatically if needed.

$x

(Required) (float) upper-left corner X coordinate

$y

(Required) (float) upper-left corner Y coordinate

$html

(Optional) (string) html text to print. Default value: empty string.

Default value: ''

$border

(Required) (mixed) Indicates if borders must be drawn around the cell. The value can be a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul> or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))

$ln

(Required) (int) Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL language)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul> Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.

$fill

(Optional) (boolean) Indicates if the cell background must be painted (true) or transparent (false).

Default value: false

$reseth

(Optional) (boolean) if true reset the last cell height (default true).

Default value: true

$align

(Optional) (string) Allows to center or align the text. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul>

Default value: ''

$autopadding

(Optional) (boolean) if true, uses internal padding and automatically adjust it to account for line width.

Default value: true


Top ↑

Source Source

File: includes/lib/tcpdf/tcpdf.php


			

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.