PHPRtfLite::getContent PHP Method

getContent() public method

gets rtf document code
public getContent ( boolean $free = true ) : string
$free boolean
return string
    public function getContent($free = true)
    {
        $this->createWriter();
        $this->render();
        if ($free) {
            $this->free();
        }
        return $this->_writer->getContent();
    }

Usage Example

Example #1
0
 /**
  * tests addHeader with expected exception for all page header
  * @expectedException PHPRtfLite_Exception
  */
 public function testAddHeaderAllException()
 {
     $this->_rtf->setOddEvenDifferent();
     $this->_rtf->addHeader(PHPRtfLite_Container_Header::TYPE_ALL);
     $this->_rtf->getContent();
 }