PhpRtf on SourceForge

May 1st, 2008

I created PhpRtf project on sourceforge. I moved sources of library to SVN repository. You can check out using command:

svn co https://phprtf.svn.sourceforge.net/svnroot/phprtf phprtf

Here you will find most up-to-date copy of library. Also, you can join development.

Support of merging cells in PhpRtf Lite

January 28th, 2008

PhpRtf Lite 0.3.0 released. The main feature added is support of merging cells in table. This feature is implemented in Table->mergeCells() method. Library can be downloaded from Download page.

Usage of cells merging can be found in Sample scripts.

PhpRtf tutorials in Italian

January 21st, 2008

Two PhpRtf tutorials in Italian are published on www.codicefacile.it/.

One is about creating simple .rtf document. Second is about creating tables in .rtf documents using PhpRtf.

PhpRtf Lite 0.2.1 released

October 27th, 2007

• Added method Rtf::setLandscape() for setting landscape orientation of rtf document.

PhpRtf Lite 0.2.0 released

August 12th, 2007

Some very strong bugs fixed.

Note: It’s possible, that after updating, your code which is using library will throw errors, and should be refactored.

• Documents with tables generated using PhpRtf Lite crashed in Microsoft Word 2000. Fix in Table::getContent method.

• Removed all call-times pass-by-reference from the library. Because with allow_call_time_pass_reference = false setting in php.ini, warnings were frown.

Also is changed Container::writeText() method declaration. Instead of variables are used instances:
Old declaration:
function writeText($text, $font, $parFormat = false, $replaceTags = true);
New declaration:
function writeText($text, &$font, &$parFormat, $replaceTags = true)

PHP 4 doesn’t let writing &$parFormat = 0 in declaration. So after updating library, your code, which is using library, should be refactored.

Instead of writing:
$sect->writeText(‘RTF PHP’, new Font());
or
$section->writeText(‘RTF PHP’, new Font(), false);

You have to write:
$null = null;
$sect->writeText(‘RTF PHP’, new Font(), $null);

As third argument is used null reference. Look at the samples for more information.

• Also removed possibility to use <page> and <section> tags in Container:writeText() method.
Instead of using <section>, you should create new section. Instead of using <page> tag, you should use Section::insertPageBreak() method (that’s done, because, page breaking shouldn’t be used in headers, footers and cells).

PhpRtf Lite 0.1.1 released

July 6th, 2007

Just few bug fixes:

• In Rtf->sendRtf method added line: header(’Content-type: application/msword’).
• Fixed bug in ParFormat constructor. Didn’t work well with justify alignment.
• In Cell->setDefaultAlignment added possibility to set justify alignment.

PhpRtf Lite First Beta released

May 15th, 2007

We are proud to announce that PhpRtf Lite First Beta is currently released and is available to download from our site.