Rtf constructor.
Rtf
Rtf
()
Adds color to rtf document. Internal use.
void
addColor
(string $color)
Adds font to rtf document. Internal use.
void
addFont
(string $font)
Creates footer for document pages.
Footer
&addFooter
([
string $type =
'all'])
-
string
$type: Possible values:
'all' => all pages (different odd and even headers/footers must be not set)
'left' => left pages (different odd and even headers/footers must be set)
'right' => right pages (different odd and even headers/footers must be set)
'first' => first page
Creates header for document pages.
Header
&addHeader
([
string $type =
'all'])
-
string
$type: Possible values:
'all' => all pages (different odd and even headers/footers must be not set)
'left' => left pages (different odd and even headers/footers must be set)
'right' => right pages (different odd and even headers/footers must be set)
'first' => first page
Adds section to rtf document.
Gets rtf code of background color. Internal use.
string
getBackColor
(string $backColor)
-
string
$backColor: Background color
Gets rtf code of color. Internal use.
string
getColor
(string $color)
Gets rtf code of font. Internal use.
string
getFont
(string $font)
Gets rtf code of font color. Internal use.
string
getFontColor
(string $fontColor)
-
string
$fontColor: Font color
Saves rtf document to file.
void
save
(string $fileName)
-
string
$fileName: Name of file
Sends rtf content as file attachment.
void
sendRtf
([string $fileName = "simple"])
-
string
$fileName: Name of file
Sets borders of document pages. Sections can override this borders.
void
setBorders
(
BorderFormat &$borderFormat, [
boolean $left =
true], [
boolean $top =
true], [
boolean $right =
true], [
boolean $bottom =
true])
-
BorderFormat
&$borderFormat
-
boolean
$left: If false, left border is not set (default true)
-
boolean
$top: If false, top border is not set (default true)
-
boolean
$right: If false, right border is not set (default true)
-
boolean
$bottom: If false, bottom border is not set (default true)
Sets default tab width of the document.
void
setDefaultTabWidth
(float $defaultTabWidth)
-
float
$defaultTabWidth: Default tab width
Sets the gutter width.
NOTICE: OpenOficce doesn't understant.
void
setGutter
(float $gutter)
-
float
$gutter: Gutter width
SetS document information properties.
void
setInfo
(string $property, mixed $value)
-
string
$property: Property of document. Possible properties:
'title' => title of the document (value string)
'subject' => subject of the document (value string)
'author' => author of the document (value string)
'manager' => manager of the document (value string)
'company' => company of author (value string)
'operator' => operator of document. Operator is a person who last made changes to the document. (value string)
'category' => category of document (value string)
'keywords' => keywords of document (value string)
'doccomm' => comments of document (value string)
'creatim' => creation time (value int)
'revtim' => last revision time (value int)
'buptim' => last backup time (value int)
'printim' => last print time (value int)
-
mixed
$value: Value
Sets landscape orientation of paper.
void
setLandscape
()
Sets the margins of document pages.
void
setMargins
(float $marginLeft, float $marginTop, float $marginRight, float $marginBottom)
-
float
$marginLeft: Margin left (default 3 cm)
-
float
$marginTop: Margin top (default 1 cm)
-
float
$marginRight: Margin right (default 3 cm)
-
float
$marginBottom: Margin bottom (default 2 cm)
Sets the margin definitions on left and right pages.
NOTICE: OpenOficce doesn't Understant.
void
setMirrorMargins
()
Sets if odd and even headers/footers are different
void
setOddEvenDifferent
()
Sets the paper height of document.
void
setPaperHeight
(float $paperHeight)
-
float
$paperHeight: Paper height
Sets the paper width of document.
void
setPaperWidth
(float $paperWidth)
-
float
$paperWidth: Paper width
Sets the beginning page number.
void
setStartPage
(float $startPage)
-
float
$startPage: Beginning page number (if not defined, Word understands as 1)
Sets the view mode of the document.
void
setViewMode
(integer $viewMode)
-
integer
$viewMode: (0 - 5) $viewMode View Mode. Possible values:
'0' => None
'1' => Page Layout view
'2' - Outline view
'3' - Master Document view
'4' - Normal view
'5' - Online Layout view
Sets the zoom level (in percents) of the document. By default word understands as 100%.
NOTICE: if zoom kind is defined, zoom level is not used.
void
setZoom
(integer $zoom)
-
integer
$zoom: Zoom Level
Sets the zoom kind of the document.
void
setZoomKind
(integer $zoomKind)
-
integer
$zoomKind: Zoom kind. Possible values:
'0' => None
'1' => Full Page
'2' => Best Fit