Container
Container
( &$rtf)
Adds image to element container.
Image
&addImage
(
string $fileName,
&$parFormat,
float $width,
float $height,
mix $parFormat)
-
string
$fileName: Name of image file.
-
mix
$parFormat: Paragraph format or null object. If null object immage is in the same paragraph.
-
float
$width: Default 0. If 0 image is displayed by it's height.
-
float
$height: Default 0. If 0 image is displayed by it' width. If boths parameters are 0, image is displayed as is.
-
&$parFormat
Adds table to element container.
Table
&addTable
([
string $alignment =
'left'])
-
string
$alignment: Alingment of table. Possible values: 'left', 'center', 'right'
Redefined in descendants as:
-
Cell::addTable()
: Overriden. Does nothing. Nesting cells are not suported in current version.
Adds empty paragraph to container.
void
emptyParagraph
(
&$font,
&$parFormat,
Fonf $font,
ParFormat $parFormat)
-
Fonf
$font: Font of text.
-
ParFormat
$parFormat: Paragraph format.
-
&$font
-
&$parFormat
Gets rtf code of Container. Internal use.
string
getContent
()
Redefined in descendants as:
Writes hyperlink to container.
void
writeHyperLink
(
string $hyperlink,
string $text,
&$font,
&$parFormat,
Font $font,
mix $parFormat)
-
string
$hyperlink: Hyperlink url (etc. "http://www.phprtf.com")
-
string
$text: Hyperlinks text If false, hyperlink is writen in previous paragraph format.
-
Font
$font: Font
-
mix
$parFormat: Paragraph format or null object. If null object hyperlink is written in the same paragraph.
-
&$font
-
&$parFormat
Writes rtf code to container.
void
writeRtfCode
(string $text)
Writes text to container.
void
writeText
(
string $text,
&$font,
&$parFormat, [
bool $replaceTags =
true],
Font $font,
mix $parFormat)
-
string
$text: 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
$font: Font of text.
-
mix
$parFormat: Paragraph format. Use ParFormat object or null object. If null object, text is written in the same paragraph.
-
bool
$replaceTags: If false, then html style tags are not replaced with rtf code.
-
&$font
-
&$parFormat