Property | Type | Description | |
---|---|---|---|
$_elements | PHPRtfLite_Table_Cell[] | PHPRtfLite_Element[] | PHPRtfLite_Image[] | PHPRtfLite_FormField[] | ||
$_pard | string | ||
$_rtf | PHPRtfLite |
Method | Description | |
---|---|---|
__construct ( PHPRtfLite $rtf ) | constructor | |
addElement ( $element ) | adds element | |
addEmptyParagraph ( PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null ) : PHPRtfLite_Element | adds empty paragraph to container. | |
addImage ( string $fileName, PHPRtfLite_ParFormat $parFormat = null, float $width = null, float $height = null ) : PHPRtfLite_Image | adds image to element container. | |
addImageFromString ( string $string, string $type, PHPRtfLite_ParFormat $parFormat = null, float $width = null, float $height = null ) : PHPRtfLite_Image | adds image to element container. | |
addTable ( string $alignment = PHPRtfLite_Table::ALIGN_LEFT ) : PHPRtfLite_Table | adds table to element container. | |
countElements ( ) : integer | counts container elements | |
free ( ) | ||
getElements ( ) : array | gets container elements | |
getRtf ( ) : PHPRtfLite | gets rtf object | |
render ( ) : string | renders rtf code for that container | |
writeHyperLink ( string $hyperlink, string $text, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null, boolean $convertTagsToRtf = true ) : PHPRtfLite_Element | writes hyperlink to container. | |
writePlainRtfCode ( string $code ) : PHPRtfLite_Element | adds element with plain rtf code directly (no converting will be made by PHPRtfLite - even no opening and closing curly brackets) | |
writeRtfCode ( string $code, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null ) : PHPRtfLite_Element | adds element with rtf code directly (no converting will be made by PHPRtfLite) | |
writeText ( string $text, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null, boolean $convertTagsToRtf = true ) : PHPRtfLite_Element | writes text to container. |
Method | Description | |
---|---|---|
getCellFont ( PHPRtfLite_Table $element ) : PHPRtfLite_Font | gets font if container is a cell | |
needToAddParagraphEnd ( integer $key ) : boolean | checks, if a \par has to be added |
public addEmptyParagraph ( PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null ) : PHPRtfLite_Element | ||
$font | PHPRtfLite_Font | |
$parFormat | PHPRtfLite_ParFormat | |
return | PHPRtfLite_Element |
public addImage ( string $fileName, PHPRtfLite_ParFormat $parFormat = null, float $width = null, float $height = null ) : PHPRtfLite_Image | ||
$fileName | string | name of image file. |
$parFormat | PHPRtfLite_ParFormat | paragraph format, ff null image will appear in the same paragraph. |
$width | float | if null image is displayed by it's height. |
$height | float | if null image is displayed by it's width. If boths parameters are null, image is displayed as it is. |
return | PHPRtfLite_Image |
public addImageFromString ( string $string, string $type, PHPRtfLite_ParFormat $parFormat = null, float $width = null, float $height = null ) : PHPRtfLite_Image | ||
$string | string | name of image file. |
$type | string | class constants of PHPRtfLite_Image: TYPE_JPEG, TYPE_PNG, TYPE_WMF |
$parFormat | PHPRtfLite_ParFormat | paragraph format, ff null image will appear in the same paragraph. |
$width | float | if null image is displayed by it's height. |
$height | float | if null image is displayed by it's width. If boths parameters are null, image is displayed as it is. |
return | PHPRtfLite_Image |
public addTable ( string $alignment = PHPRtfLite_Table::ALIGN_LEFT ) : PHPRtfLite_Table | ||
$alignment | string | Alingment of table. Represented by class constants PHPRtfLite_Table::ALIGN_* Possible values: PHPRtfLite_Table::ALIGN_LEFT => 'left', PHPRtfLite_Table::ALIGN_CENTER => 'center', PHPRtfLite_Table::ALIGN_RIGHT => 'right' |
return | PHPRtfLite_Table |
public countElements ( ) : integer | ||
return | integer |
public writeHyperLink ( string $hyperlink, string $text, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null, boolean $convertTagsToRtf = true ) : PHPRtfLite_Element | ||
$hyperlink | string | hyperlink url (etc. "http://www.phprtf.com") |
$text | string | hyperlink text, if empty, hyperlink is written in previous paragraph format. |
$font | PHPRtfLite_Font | |
$parFormat | PHPRtfLite_ParFormat | |
$convertTagsToRtf | boolean | if false, then html style tags are not replaced with rtf code |
return | PHPRtfLite_Element |
public writePlainRtfCode ( string $code ) : PHPRtfLite_Element | ||
$code | string | |
return | PHPRtfLite_Element |
public writeRtfCode ( string $code, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null ) : PHPRtfLite_Element | ||
$code | string | |
$font | PHPRtfLite_Font | |
$parFormat | PHPRtfLite_ParFormat | |
return | PHPRtfLite_Element |
public writeText ( string $text, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null, boolean $convertTagsToRtf = true ) : PHPRtfLite_Element | ||
$text | string | Text. Also you can use html style tags. Possible tags: strong, b- bold; em - ; i - italic; u - underline; br - line break; chdate - current date; chdpl - current date in long format; chdpa - current date in abbreviated format; chtime - current time; chpgn, pagenum - page number ; tab - tab sectnum - section number; line - line break; page - page break; sect - section break; |
$font | PHPRtfLite_Font | font of text |
$parFormat | PHPRtfLite_ParFormat | paragraph format, if null, text is written in the same paragraph. |
$convertTagsToRtf | boolean | if false, then html style tags are not replaced with rtf code |
return | PHPRtfLite_Element |
protected PHPRtfLite_Table_Cell[]|PHPRtfLite_Element[]|PHPRtfLite_Image[]|PHPRtfLite_FormField[] $_elements | ||
return | PHPRtfLite_Table_Cell[] | PHPRtfLite_Element[] | PHPRtfLite_Image[] | PHPRtfLite_FormField[] |