TCPDF::Text( $x,  $y,  $txt,  $fstroke = false,  $fclip = false,  $ffill = true,  $border,  $ln,  $align = '',  $fill = false,  $link = '',  $stretch,  $ignore_min_height = false,  $calign = 'T',  $valign = 'M',  $rtloff = false )

Prints a text cell at the specified position.


Description Description

This method allows to place a string precisely on the page.

See also See also

  • Cell(),: Write(), MultiCell(), WriteHTML(), WriteHTMLCell()

Top ↑

Parameters Parameters

$x

(Required) (float) Abscissa of the cell origin

$y

(Required) (float) Ordinate of the cell origin

$txt

(Required) (string) String to print

$fstroke

(Optional) (int) outline size in user units (false = disable)

Default value: false

$fclip

(Optional) (boolean) if true activate clipping mode (you must call StartTransform() before this function and StopTransform() to stop the clipping tranformation).

Default value: false

$ffill

(Optional) (boolean) if true fills the text

Default value: true

$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 languages)</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.

$align

(Optional) (string) Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul>

Default value: ''

$fill

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

Default value: false

$link

(Optional) (mixed) URL or identifier returned by AddLink().

Default value: ''

$stretch

(Required) (int) font stretch mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if text is larger than cell width</li><li>2 = forced horizontal scaling to fit cell width</li><li>3 = character spacing only if text is larger than cell width</li><li>4 = forced character spacing to fit cell width</li></ul> General font stretching and scaling values will be preserved when possible.

$ignore_min_height

(Optional) (boolean) if true ignore automatic minimum height value.

Default value: false

$calign

(Optional) (string) cell vertical alignment relative to the specified Y value. Possible values are:<ul><li>T : cell top</li><li>A : font top</li><li>L : font baseline</li><li>D : font bottom</li><li>B : cell bottom</li></ul>

Default value: 'T'

$valign

(Optional) (string) text vertical alignment inside the cell. Possible values are:<ul><li>T : top</li><li>C : center</li><li>B : bottom</li></ul>

Default value: 'M'

$rtloff

(Optional) (boolean) if true uses the page top-left corner as origin of axis for $x and $y initial position.

Default value: false


Top ↑

Source Source

File: includes/lib/tcpdf/tcpdf.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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