<?php

$dir = dirname(__FILE__); 
require_once ($dir.'/../lib/PHPRtfLite.php');

//register PHPRtfLite class loader 
PHPRtfLite::registerAutoloader();

$rtf = new PHPRtfLite();
$sect = $rtf->addSection();
$sect->writeText('<i>Hello <b>world</b></i>.', new PHPRtfLite_Font(12), new PHPRtfLite_ParFormat(PHPRtfLite_ParFormat::TEXT_ALIGN_CENTER));

//save rtf document
$rtf->save('Hello.rtf');

