/** * adds empty paragraph to container. * * @param PHPRtfLite_Font $font * @param PHPRtfLite_ParFormat $parFormat * @return PHPRtfLite_Element */ public function addEmptyParagraph(PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) { if ($parFormat === null) { $parFormat = new PHPRtfLite_ParFormat(); } $element = new PHPRtfLite_Element($this->_rtf, '\\par', $font, $parFormat); $element->setIsRtfCode(); $this->_elements[] = $element; return $element; }
/** * adds element with rtf code directly * (no converting will be made by PHPRtfLite) * * @param string $code * @param PHPRtfLite_Font $font * @param PHPRtfLite_ParFormat $font * @return PHPRtfLite_Element */ public function writeRtfCode($code, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null) { $element = new PHPRtfLite_Element($this->_rtf, $code, $font, $parFormat); $element->setIsRtfCode(); $this->_elements[] = $element; return $element; }