Function executed AFTER a new page is added for pre - actions on the current page.
Usually overwritted.
void
afterAddPage
()
Function executed BEFORE a new page is added for further actions on the current page.
Usually overwritted.
void
beforeAddPage
()
Sets current tag to specified style
- if the tag name is not in the tag list then de "DEFAULT" tag is saved.
This includes a fist call of the function mt_SaveCurrentStyle()
void
mt_ApplyStyle
(string $tag)
This method divides the string into the tags and puts the result into wt_DataInfo variable.
struct
mt_DivideByTags
(string $pStr, [boolean $return = false])
-
string
$pStr: - string to be parsed
-
boolean
$return: - ==TRUE if the result is returned or not
Divides $this->wt_DataInfo and returnes a line from this variable
array
mt_MakeLine
(numeric $w)
-
numeric
$w: - the width of the text
Draws a Tag Based formatted line returned from mt_MakeLine function into the pdf document
void
mt_PrintLine
(numeric $w, numeric $h, string $aTxt, [string $align = 'J'])
-
numeric
$w: - width of the text
-
numeric
$h: - height of a line
-
string
$aTxt: - text to be draw
-
string
$align: - align of the text
Resets the current class internal variables to default values
void
mt_Reset_Datas
(none 0)
Save the current settings as a tag default style under the DEFAUTLT tag name
void
mt_SaveCurrentStyle
(none 0)
This method parses the current text and return an array that contains the text information for each line that will be drawed.
array
mt_StringToLines
([numeric $w = 0], string $pStr)
-
numeric
$w: - width of the line
-
string
$pStr: - String to be parsed
Draws a MultiCell with TAG recognition parameters
void
MultiCellTag
(numeric $w, numeric $h, string $pData, [string $border = 0], [string $align = 'J'], [numeric $fill = 0], [numeric $pad_left = 0], [numeric $pad_top = 0], [numeric $pad_right = 0], [numeric $pad_bottom = 0], [boolean $pDataIsString = true])
-
numeric
$w: - with of the cell
-
numeric
$h: - height of the lines in the cell
-
string
$pData: - string or formatted data to be putted in the multicell
-
string
$align: - Sets the text alignment Possible values: L: left R: right C: center J: justified
-
numeric
$fill: - Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
-
numeric
$pad_left: - Left pad
-
numeric
$pad_top: - Top pad
-
numeric
$pad_right: - Right pad
-
numeric
$pad_bottom: - Bottom pad
-
boolean
$pDataIsString:
- true if $pData is a string
- false if $pData is an array containing lines formatted with $this->mt_MakeLine($w) function
(the false option is used in relation with mt_StringToLines, to avoid double formatting of a string
-
string
$border: or numeric $border Indicates if borders must be drawn around the cell block. The value can be either a number:
- = no border
- = frame border
or a string containing some or all of the following characters (in any order): L: left T: top R: right B: bottom
Draws a MultiCell with TAG recognition parameters
void
MultiCellTagSec
(numeric $w, numeric $h, string $pData, [string $border = 0], [string $align = 'J'], [numeric $fill = 0], [numeric $pad_left = 0], [numeric $pad_top = 0], [numeric $pad_right = 0], [numeric $pad_bottom = 0], [boolean $pDataIsString = true])
-
numeric
$w: - with of the cell
-
numeric
$h: - height of the lines in the cell
-
string
$pData: - string or formatted data to be putted in the multicell
-
string
$align: - Sets the text alignment Possible values: L: left R: right C: center J: justified
-
numeric
$fill: - Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
-
numeric
$pad_left: - Left pad
-
numeric
$pad_top: - Top pad
-
numeric
$pad_right: - Right pad
-
numeric
$pad_bottom: - Bottom pad
-
boolean
$pDataIsString:
- true if $pData is a string
- false if $pData is an array containing lines formatted with $this->mt_MakeLine($w) function
(the false option is used in relation with mt_StringToLines, to avoid double formatting of a string
-
string
$border: or numeric $border Indicates if borders must be drawn around the cell block. The value can be either a number:
- = no border
- = frame border
or a string containing some or all of the following characters (in any order): L: left T: top R: right B: bottom
Sets current tag to specified style
void
SetStyle
(string $tag, string $family, string $style, numeric $size, array $color)
-
string
$tag: - tag name
-
string
$family: - text font family name
-
string
$style: - text font style
-
numeric
$size: - text font size
-
array
$color: - text color
Sets the Tags Maximum width
void
setTagWidthMax
([numeric $iWidth = 10])
-
numeric
$iWidth: - the width of the tags